Tuesday, April 25, 2023

How to Call Cognitive Service Translator API With Postman

This blog explains how to setup postman to test cognitive service translator. 

Pre-requisites: Cognitive service translator, access to postman

Open postman, add a new post request and add following configurations.

If the translator access limited to VNet use following URL format.

URL : https://your-translate-service-name.cognitiveservices.azure.com/translator/text/v3.0/translate?to=fr

ex: https://my-demo-translator.cognitiveservices.azure.com/translator/text/v3.0/translate?from=en&to=fr

Monday, April 3, 2023

Resolve Pipeline Execution User Lacks Permission Error in Azure DevOps Release Pipeline

In Azure DevOps you might have encountered the situations where pipelines failing with error message mentioning the user with a given GUID does not have permission to run the pipeline or access Azure DevOps artifacts. Solution is giving the right permission to the user. This blog explains how to find the right user who need the permission.

Copy the GUID of the user from Azure DevOps pipeline logs.

Wednesday, February 22, 2023

Scan Code in Azure DevOps Build Pipelines Using Microsoft Security DevOps

Static code analysis is a mechanism to find and fix security vulnerabilities in source code without running the software. This blog explains how to integrate Microsoft Security DevOps to a build pipeline, which installs and configures static code analysis tools against your source code.

Pre-requisites: 

  • Azure DevOps build pipeline
  • Build agent which has .NET 6 (for MicrosoftSecurityDevOps build task) and NET 3.1 (CredScan analyzer) installed.

Saturday, January 28, 2023

The New Pre-defined System Variable in Azure DevOps Build Pipeline

There could be requirement to get Azure DevOps build definition location when developing scripts to use with Azure DevOps. In such script, you can hardcode build definition location or use recently introduced pre-defined system variable, Build.DefinitionFolderPath in Azure DevOps.


Pre requirement: Azure DevOps build definition

The build definition we use for this blog post is under Demo Build Pipeline.

Thursday, January 26, 2023

Disabling Creation of Classic Pipeline in Azure DevOps

Azure DevOps has introduced new toggle which can be used to disable classic pipeline creation in team projects. If your organization decided to use only YAML pipelines, you can use this feature. It will disable classic build pipelines, classic release pipelines, task groups and deployment groups from Azure DevOps.

Before enable the toggle, you would be able to see the option to create a new classic pipeline as shown in below.

Tuesday, November 22, 2022

Enabling Clean Deployment with zipDeploy in Azure App Service Deploy Task

Azure App Service deploy task capable of doing several deployments such as web deploy, and zip deploy. Web deploy method supports clean deployments to the Azure app service app, but zip deploy doesn't have option to do a clean deployment. But we may want to use zipDeploy specially with Linux hosted agents as described in the post here

To enable clean deployment with zipdeploy, we need to add cleanup step to deployment pipeline before doing the deployment with Azure app service deploy task.  This blog has a PowerShell script which can be used to cleanup wwwroot folder of the app service before new deployment. We can modify the script in that blog, to work with multiple slots in Azure app services and use as a task in Linux agents.

Monday, November 14, 2022

Resolve "Error: Publish using webdeploy options are supported only when using Windows agent"

This blog explains how to resolve "Error: Publish using web deploy options are supported only when using Windows agent", in Azure App Service deploy task, with web deploy as deployment type and Linux as release agent.

Error: 

"Publish using webdeploy options are supported only when using Windows agent"

Wednesday, November 9, 2022

Enable Debug Logging in GitHub Actions

Trouble shooting automation pipelines are getting easier when we have enough details of the steps in the logs. In GitHub workflows, we can enable step debug logs to get detailed logs for job. This blog explains how to enable step debug logging in GitHub workflows.

Before enable step loggings, you will get less logs as shown in below image.