I need to configure Jenkins 2 to build all tags and branches available in the origin git repository with a certain frequency, even when they didn't have any modifications. To make it complete, I would like it to also delete local build of branches that do not exist in the origin anymore.

With my current configuration, I am able to build branches but only when changes are detected, which causes some important branches that don't get modification so often to not be built yet. Tags aren't build but it would be a powerful tool to have them built as well.

I found the Multi-Branch Project Plugin which seems to be able to to almost everything I need to but it is incompatible with Jenkins 2.


The project must be configured as a Pipeline for this to work.

Since Pipelines are not configurable through Jenkins' UI, there must contain a Jenkinsfile in the root of the project, which will contain instructions for Jenkins on how to build the project.

This file can be different per branch, and Jenkins will respect different configuration per branch, which makes this a very elastic approach to this solution.

  • @BrunoFinger this still won't build all the tags though – Bruno Finger Apr 3 '18 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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