无论如何,是否有在詹金斯(Jenkins)进行特殊提交的应用程序?
我已经使用Jenkins自动化了一个应用程序。当我将代码推向主分支时,Jenkins脚本会运行并重建应用程序。这是我目前的情况。
我现在需要做的事情,当我只使用特定的提交消息推动时,我需要触发詹金斯的构建。 (例如,提交消息由“构建”键合成只能再次构建应用程序。)
Ex:-
git commit -m "Build | this is demo commit" - should be build the application.
git commit -m "this is demo commit" - should not be rebuild.
我有可能做到吗?
I have automated an application using Jenkins. When I push my code to master branch, Jenkins script runs and rebuild the application. This is my current situation.
What I need to do now, When I push with specific commit message only, I need to trigger the Jenkins build. (For an example, Commit message consist of "Build" keywork can only build the application again.)
Ex:-
git commit -m "Build | this is demo commit" - should be build the application.
git commit -m "this is demo commit" - should not be rebuild.
Am I possible to do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是您可以使用声明的管道来执行此操作的方法。请注意条件
当{ChangElog'build |。*'}
时Here is how you can do this with a declarative pipeline. Note the condition
when { changelog 'Build |.*'}