Azure DevOps JSON file passed to AppSettings within Deployment task

The problem that I faced was that I wanted to pass a JSON to the application deployment task in the deployment task, I used the YAML deployment template.

I stored the JSON variables as part of the pipelines folder.

Issues faced

  • The relative path to the JSON file does not work to be passed to the app settings, the absolute JSON path is required.
  • Token replacement in the JSON file as it contained variables from the variables group. Added a new task to perform JSON token replacement. The task will perform replacement based on the prefix and suffix chars.

After solving all the issues, the only thing left it to set the application settings using a Azure CLI and remove the ‘AppSettings’ parameter from the deployment task.

Reference:

Pause
Isache, P. (2022). Azure DevOps JSON file passed to AppSettings within Deployment task. Available at: https://medium.com/@paulisache/azure-devops-json-file-passed-to-appsettings-within-deployment-task-1c40c4ae4d19 [Accessed: July 12th 2022]. 

Share this on...

Rate this Post:

Share:

Topics:

Azure

Tags: