Pass the variables as a parameter for a Release build in Azure DevOps pipeline

Started by Santosh, February 20, 2022, 06:23:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Santosh

Pass the variables as a parameter for a Release build in Azure DevOps pipeline.

I have a file named "Generate-manifest.ps1" file which after executing it creates manifest.json file which is a collection of different packages from artifactory.
Now I want to rename a file with some version values like "1.0.0" Eg: manifest-1.0.0.json file and use it for the next build.

Basically I have a repo named Deploy-scripts which contains Generate-manifest.ps1 script. Once we execute them it will create manifest.json file.
But I want to pass some variables during runtime in such a way that manifest.json file should update with version info.

manifest.json:
{
"version":  "1.0.0",
"timeStamp":  "2021-05-07T09:41:34+00:00",
"packages":  [
                 {
                     "name":  "data-service",
                     "type":  "docker-image",
                     "version":  "REL-1.0.5367"
                 },
                 {
                     "name":  "feedback-service",
                     "type":  "docker-image",
                     "version":  "REL-1.0.6099"
                 },
             ]
}