Trigger build in Jenkins/Hudson using hashtag in commit-message

后端 未结 2 1934
臣服心动
臣服心动 2021-01-13 11:58

Is it possible to trigger a Hudson/Jenkins build only when a certain string appears in a commit-message?

For instance, I want to trigger a build that rolls out my ap

相关标签:
2条回答
  • 2021-01-13 12:02

    I don't know of an out of the box way you can parse the SCM message as part of the trigger. You have a couple of options that might achieve what you want though

    1. Write your own Hudson SCM plugin
    2. Chain your jobs together into a build pipeline. The first job could simply look for that message in the changelog.xml to determine if the next build is triggered or not.

    If you are looking at building a pipeline of build jobs, check out the build-pipeline-plugin. http://www.centrumsystems.com.au/blog/?p=121

    Anyone got a more elegant solution??

    Cheers,

    Geoff

    0 讨论(0)
  • 2021-01-13 12:06

    There is a plugin called Commit Message Trigger Plugin, but it had just a 0.1 release.

    Maybe the easiest way is to use a version control post commit (or push) trigger to start a Hudson Job. You'd one anyway to automatically start your build.

    0 讨论(0)
提交回复
热议问题