Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

For examplification purposes, let’s use 5 branches: (master, develop, test1, test2, test3).

We need to trigger a build only from two branches: (master, develop)

...

  1. Select “Build from“ and enter branch names separated by white space: “master develop“

  2. Select “Build RegExp“ and enter regexp based expression: “master|develop“

Note

Jenkins jobs must be configured for master branch.

Alternatively, branch parameter can be set when using integration with Git Plugin. On hook settings set “Parameters“ field to this: TARGET_BRANCH={BRANCH}That’s how you trigger multiple branch builds.