Search code examples
gitjenkinshudson

Hudson/Jenkins Git build all branches


We have a lot of developers creating feature branches that I would like to build. Nightly we run a code quality tool that needs to run on every branch. I also would not like a static configuration because the number of branches changes every few weeks.


Solution

  • In Git configuration there is a field 'Branch Specifier (blank for default): ' if you put there ** it will build all branches from all remotes.

    having that you can use an environment variable ${GIT_BRANCH} e.g. to set a title for the build using https://wiki.jenkins-ci.org/display/JENKINS/Build+Name+Setter+Plugin or for other purposes