2

I am using Jenkins2 and GitHub plugin for triggering Push events.

I have the next service (Jenkins Github): http://myjenkinsmaster/github-webhook/

I also have 3 branches: dev, stage, master which need to be built.

But I require only the branch with changes to be built.

For example if changes were pushed to dev, only dev branch will be built, and others ignored.

However, Jenkins builds all 3 branches which I specified in branch field in job config.

How can I achieve a Jenkins build that builds only the branch where changes were pushed?

1
  • Do you use pipelines for jenkins jobs? Commented Jun 6, 2018 at 14:22

1 Answer 1

1

Finally I have resolved it with the help of "strategy of choosing what to build" with "Default behavior" for each branch.

1
  • Please elaborate your answer. Your answer will help others as well, so adding more explanation and a screenshot always helps :)
    – Vish
    Commented Apr 6, 2018 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.