Run jenkins job if only SCM comment match pattern

别来无恙 提交于 2019-12-23 14:21:45

问题


I would like to run a Jenkins job only if the svn message matches a certain pattern i.e.

When I release a new application version and commit it

svn commit -m "release version 0.x"

Jenkins matches the message and runs a job called "release". If the message does not match then this commit is ignored.


回答1:


You could try it by using the "Excluded Commit comments" field in the job configuration. It is only visible when you click on the "Extended" Button next to the Subversion options.

You need to write a regular expression that will match everything, but the comment you want to capture (e.g. "[^(?:release)]" might work, assuming you meant release, not realize). Give this a shot.



来源:https://stackoverflow.com/questions/8037230/run-jenkins-job-if-only-scm-comment-match-pattern

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!