简体   繁体   English

Docker 图像选择与 Azure Devops 管道

[英]Docker image selection with Azure Devops pipelines

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).如果工件是 Docker 图像,您可以在创建新版本时使用 select 图像标签(屏幕截图显示示例)。

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? 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?

在此处输入图像描述

Is there any way to replicate the ability to select a Docker image tag at the start of a YAML pipeline in Azure Devops?有没有办法在 YAML 管道的开头复制 select 和 Docker 图像标签的能力?

From the screenshot, you are using the build artifact.从屏幕截图中,您正在使用构建工件。 So this ability is to select the relevant build version when create release.所以这个能力是select创建发布时的相关构建版本。

In Yaml Pipeline, you could try to use Pipeline Resources .在 Yaml Pipeline 中,您可以尝试使用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.创建构建时,您可以 select Resources字段。

在此处输入图像描述

Then you could select the specific pipeline runs.然后你可以 select 运行特定的管道。

在此处输入图像描述

In this case, the Yaml pipeline will use artifacts resource from selected pipeline run.在这种情况下,Yaml 管道将使用来自选定管道运行的工件资源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM