问题
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