Jenkins:成功构建后增加参数 [英] Jenkins: Increase Parameter after successful build
本文介绍了Jenkins:成功构建后增加参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我习惯于詹金斯根据需要部署版本. 所以我有构建参数,例如
I am using to Jenkins to deploy versions as needed. So I have build parameter eg
VERSION 0.0.1
如果作业成功并且下一次将运行0.0.1,则我将手动更改版本,即
If job is successful and 0.0.1 has been deployed the next time job will be run I manually change version ie
VERSION 0.0.2
再次构建并重复等等. 成功构建后,有没有办法自动增加这个数字?
Build again and repeat etc. Is there a way to automatically increase this number after a successful build?
推荐答案
您可以使用 EnvInject插件来访问该文件中的版本号.从工作上来.
You can create a post build script using the Post Build Script plugin which will update the version number and stores that in a file. Then you can access the version number in that file using the EnvInject plugin from your job.
这篇关于Jenkins:成功构建后增加参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文