[英]Prevent Jenkins from creating git tag on every successful build
我想避免在每次成功构建时都创建git标签。 是否有任何选项仅在手动运行构建时才创建git标签,而避免在自动生成时创建标签?
新的解决方案(我想念这个问题):)
要测试它是否是手动构建,可以查询以下变量:
$BUILD_CAUSE --> MANUALTRIGGER
接下来,使用条件BuildStep插件执行以下操作:
它不是完美的,但是可以用:)
Strings match run condition: string 1=[MANUALTRIGGER], string 2=[MANUALTRIGGER]
Run condition [Strings match] enabling perform for step [BuilderChain]
[workspace] $ /bin/sh -xe /tmp/hudson1606993297619177453.sh
+ git tag MY_TAG
+ git push origin --tags
To ssh://git@my_server:7999/my_repo.git
* [new tag] MY_TAG -> MY_TAG
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.