Azure Devops - YAML Release Pipelines - How to select a specific artefact from a build pipeline using a dropdown list

Viewed 659

So, recently I set about migrating our Azure Devops Classic Release pipeline to a YAML based one.

What I'm struggling to reproduce is the ability you have with a Classic Release pipeline to select a specific artefact from an associated build pipeline using a dropdown list.

enter image description here

The only way I've found to allow a user to specify a specific artefact is via a parameter, but the definition of dropdown lists is only possible if you know all of the values that will be in the list.

This link is the closest thing I've found that resolves the issue, but even this doesn't allow the specification of a dropdown: https://www.huuhka.net/runtime-artifact-selection-in-azure-pipelines-yaml/

Anyone know how to do this, or even if it is possible?

1 Answers

Ok, so I didn't quite answer the question I posed, but I found an answer that solves the issue I have.

The problem I had is that I want a user to be able to select a specific build at release time.

This is poorly documented and it was a surprise when I saw it working.

In your release pipeline specify a resource:

resources:   
  pipelines:
  - pipeline: YourBuildPipelineReference
    source: "Your Build Pipeline Name"

Now when you come to run your pipeline you see the following:

enter image description here

Click Resources and you are now taken to list where you can select a specific build.

Didn't see this before, but I figure lots of people will need this.

Related