0
votes

With release pipelines you have the option to add an artifact. If the artifact is a Docker image, you can select the image tag when creating a new release (the screenshot shows an example).

With multi-stage pipelines being recommended as the future for deployments, is there any way to replicate the ability to select a Docker image tag at the start of a YAML pipeline in Azure Devops?

enter image description here

1
How your YAML looks like now? - Shayki Abramczyk
Hi @Phyxx. Please check if the answer could meet your requirements. Although it is a little different from the release pipeline, it could be able to achieve this function. - Kevin Lu-MSFT

1 Answers

0
votes

Is there any way to replicate the ability to select a Docker image tag at the start of a YAML pipeline in Azure Devops?

From the screenshot, you are using the build artifact. So this ability is to select the relevant build version when create release.

In Yaml Pipeline, you could try to use Pipeline Resources.

Here is an example:

resources:
  pipelines:
  - pipeline: test
    project : Projectname
    source: Pipeline name

pool:
  vmImage: 'ubuntu-latest'

steps:

- download: test   
  artifact: "artifactname"

When you create a build, you could select the Resources field.

enter image description here

Then you could select the specific pipeline runs.

enter image description here

In this case , the Yaml pipeline will use artifacts resource from selected pipeline run.