[英]Jenkins build promotion: How do I get the build id of the build I want to promote?
It seems that, when doing a build promotion in Jenkins using the Promoted Builds Plugin, it generates a new BUILD_ID environment variable. 看起来,当使用Promoted Builds插件在Jenkins中进行构建升级时,它将生成一个新的BUILD_ID环境变量。 Is there a way, or a plugin that lets you access the current BUILD_ID of the build you are trying to promote? 有没有办法或插件可以让您访问您要升级的构建的当前BUILD_ID?
Basically, the functionality I need is to: Navigate to a build in Jenkins, be able to launch an ant or gradle script to promote an already built artifact that is archived under the build I'm currently in. 基本上,我需要的功能是:导航到Jenkins中的构建,能够启动ant或gradle脚本来提升已构建的工件,该工件存储在我当前使用的构建下。
Use the PROMOTED_JOB_NAME and PROMOTED_NUMBER variables to get the name and build number of the build being promoted. 使用PROMOTED_JOB_NAME和PROMOTED_NUMBER变量来获取要升级的内部版本的名称和内部版本号。 These two values are only set DURING the promotion process; 这两个值仅在升级过程中设置; they are part of the jobs build. 它们是工作机会的一部分。 This doesn't exactly map to BUILD_ID, but it does allow access to that build. 这并不完全映射到BUILD_ID,但确实允许访问该版本。
When I had this problem in the past, I did the following. 过去遇到此问题时,我做了以下事情。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.