1

So, one option is create a file during the build with all the build variables and attach it as an artifact to the build.

Not a big deal, but I am wondering if this is the natural way to do it in Azure DevOps. Maybe there is some feature to enable it easily and I just do not see it?

mark
  • 59,016
  • 79
  • 296
  • 580

1 Answers1

0

According to your description, seems you just want to access the Build variables from Release pipeline.

The is no official way to pass variables from Build to Release. What you are doing is the right way.

Alternative, you could use some 3rd-party Azure DevOps extension such as this one--Variable Tools for Azure DevOps Services.

  • In the "build pipeline" you can create a JSON file using "save variables". This file needs to be published as artifact or with existing artifact.
  • In the "release pipeline" you can restore the variables using "load variables" from the JSON file.

Also take a look at this similar question here: How to get the variable value in TFS/AzureDevOps from Build to Release Pipeline?

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • So this is exactly what I am doing today - creating a json file, attaching to build, unfolding in release. I was hoping for a more natural support for it. – mark Jun 12 '20 at 13:48