-
Bug
-
Resolution: Not A Defect
-
Minor
-
None
-
Jenkins 2.73.2, Git Plugin 3.6.0, Pipeline: Multibranch 2.16
After upgrading to the Git Plugin 3.6.0 I activated the "Discover Tags" option in a Multibranch Pipeline Job. The tag is also discovered as expected, but no build is triggered.
Checking tags... Checking tag PNR-12345 ‘Jenkinsfile’ found Met criteria Changes detected: PNR-12345 (null → d56c6578f5f04403f4bd64bf2647f3dd0f36e826) No automatic builds for PNR-12345 Processed 1 tags
I expected that a new build is triggered, when a new tag is found. How to achieve this?
- is related to
-
JENKINS-53432 Unable to automatically discover and build git tags with Jenkins multibranch pipelines and the Git Plugin
-
- Open
-
-
JENKINS-58477 Automatic builds for tags
-
- Fixed but Unreleased
-
[JENKINS-47496] No automatic builds for tags
Component/s | New: branch-api-plugin [ 18621 ] | |
Component/s | Original: pipeline [ 21692 ] |
Resolution | New: Not A Defect [ 7 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Tags are not built by default (because otherwise you could have a build storm when checking out a repository) and worse, the order tags will be built in is unpredictable... and you might have a Jenkinsfile that deploys to production when a tag is built.
There is an extension point in branch-api called BranchBuildStrategy which - if implemented - will allow deciding whether to build tags.
See https://github.com/jenkinsci/github-branch-source-plugin/pull/158#issuecomment-332773194 for starting point on how to create such an extension plugin... I believe there is some work on one at https://github.com/AngryBytes/jenkins-build-everything-strategy-plugin