简体   繁体   English

如何使用发布管道在预发布视图中部署 Nuget

[英]How to Deploy Nuget in Prerelease View With Release Pipeline

I am setting up a DevOps release pipeline that is triggered off a build pipeline.我正在设置一个由构建管道触发的 DevOps 发布管道。

The build pipeline uses the Nuget Pack to create a nupkg file and publishes it as an Artifact.构建管道使用 Nuget Pack 创建一个 nupkg 文件并将其作为工件发布。

The release pipeline is triggered and Nuget Push is used to deploy to the DevOps feed.发布管道被触发,Nuget 推送用于部署到 DevOps 源。

I have found the “Promote package to Release View” task, but how do I get the Package Version to provide in the step?我找到了“将 package 提升为发布视图”任务,但是如何获取步骤中提供的 Package 版本?

I should note that, in the build pipeline, the Nuget pack step uses the build number for the version.我应该注意到,在构建管道中,Nuget 打包步骤使用版本的构建号。

According to your description, the build pipeline uses Nuget pack with the build number for the version.根据您的描述,构建管道使用Nuget pack和版本的构建号。 So, you just need to enable the CD (Continuous deployment trigger) for your release pipeline.因此,您只需为发布管道启用 CD(持续部署触发器)。 Then use the predefined variable Build.BuildNumber in the “ Promote package to Release View ” task.然后在“ Promote package to Release View ”任务中使用预定义变量Build.BuildNumber

Select the package that you want to promote. Select 您要推广的 package。 Multiple packages may be supplied separated with a comma or semicolon.可以提供多个包,用逗号或分号分隔。 Note you may use either the name of the package or its GUID.请注意,您可以使用 package 的名称或其 GUID。

在此处输入图像描述

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

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