简体   繁体   English

构建名称设置器插件 Jenkins

[英]Build Name Setter Plugin Jenkins

The below command has been working for the past 8 months but now it throws error for the build Name and Description Setter plugin.以下命令在过去 8 个月内一直有效,但现在它会为构建名称和描述设置器插件抛出错误。

buildName "${app_name}"构建名称“${app_name}”

The plugin version is 2.1.0.插件版本为 2.1.0。 Jenkins version is 2.281. Jenkins 版本为 2.281。 Does the syntax needs to be changed?是否需要更改语法? If yes, please help with the same or any other solutions.如果是,请提供相同或任何其他解决方案的帮助。 Thanks in advance.提前致谢。

The Jenkins version doesn't support this syntax. Jenkins 版本不支持此语法。 The workaround is to use currentBuild.displayName inside the script{} like below.解决方法是在脚本{} 内使用 currentBuild.displayName,如下所示。

 script{ currentBuild.displayName = "${APP_SHORT_NAME} - ${VERSION_NUM} - ${build_triggered_by}" currentBuild.description = "ODP-DAAS-${APP_SHORT_NAME} in ${REPO_NAME} with ${VERSION_NUM} by ${build_triggered_by}" }

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

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