5

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?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Phillip Steele
  • 281
  • 2
  • 7

1 Answers1

8

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.

Phillip Steele
  • 281
  • 2
  • 7
  • 2
    Since you have a workaround, I suggest you could mark your own answer:) – Mr Qian May 18 '21 at 02:18
  • Reference for this workaround: https://learn.microsoft.com/en-us/azure/devops/release-notes/2020/sprint-169-update#pipeline-resource-version-picker-in-the-create-run-dialogue – P-L Jul 20 '23 at 14:57