FraS
FraS

Reputation: 31

Reference the Commits of Build Artifacts in Azure Pipelines

I have an Azure Pipeline which

I'm looking for a way to show in the "Source Code" tab the Source code link for the commit relative to each of pipeline builds, which artifacts have been downloaded during this run. To do this, I have to name each of the repositories and checkout the proper version.

What I can't get my head around is how to exploit the BuildId variable to get the SourceVersion variable.

I know that Build.BuildId variable is the one defining the run id of the pipeline, and we use this to choose which run to take the specific artifact from. At the same time, Build.SourceVersion contains the commit Id used for the pipeline run. But normally, Build is the current Build.

How can I reference Build_x, starting from Build_x.BuildId, so to be able to recover the Build_x.SourceVersion?

Thank you

Upvotes: 3

Views: 1173

Answers (0)

Related Questions