从特定升级的构建复制工件

问题描述:

我在Jenkins有两个工作。第一个名称Build,第二个名称Deploy to test environment。在第一个作业中,测试人员手动设置升级,然后只能部署升级的构建。在第二个作业中,我添加了推荐构建参数,它生成带有升级构建的组合框,但是我无法将此参数的值与从另一个项目复制构件构建步骤连接。

I have two jobs in Jenkins. First of the name "Build" and the second of the name "Deploy to test environment". In the first job, tester sets promotion manually, and then only promoted builds can be deployed. In second job I added "Promoted Build Parameter" which generates combobox with promoted builds but I can’t connect the value of this parameter with "Copy artifact from another project" build step. So how can I copy artifacts from the selected promoted build?

在您的部署项目中:

In your deploy project:


  1. 配置名为的推荐构建参数(例如) PromotedBuild

  2. 将工件从另一个项目复制到特定版本版本号 $ {PromotedBuild_NUMBER} b>

  1. Configure a Promoted Build Parameter named (for example) PromotedBuild
  2. Configure Copy artifacts from another project to Specific build with Build number as ${PromotedBuild_NUMBER}

此外,如果要从构建项目中触发deploy项目,可以执行以下操作:



Also, if you want to trigger the deploy project from your build project, you can do this:


  1. 在您的构建项目的宣传过程中,将在其他项目上触发参数化构建添加到预定义参数 PromotedBuild_NUMBER = $ PROMOTED_NUMBER
  1. In your promotion process of your build project add Trigger parameterized build on other projects with a Predefined parameter of PromotedBuild_NUMBER=$PROMOTED_NUMBER.