Status: Closed (View Workflow)
Resolution: Not A Defect
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
JENKINS-58477 Automatic builds for tags
- Fixed but Unreleased
Sure, thanks i have opened up the ticket : https://issues.jenkins-ci.org/browse/JENKINS-57772
This article clearly states that if we add "Discover tags" to multibranch pipeline, Jenkins will trigger builds when tags are pushed into repo. But this bug (
JENKINS-47496 ) says that tags are not supposed to trigger a build automatically. Could you please decide somehow which one of you is right?
As a Jenkins user, I +1 for tag triggering. We want to use this to build/publish releases whenever Git tag is created. This is the way all other major CI systems work: Travis CI, CircleCI, AppVeyour.
Please use the Basic Branch Build Strategies plugin.
stephenconnolly the are usecases where building all the tags in a random order (build storm) is not a problem.
Indeed, if the pipeline build an artefact which is published in an artefact repository like nexus, there are no problem (except may be the extra workload for jenkins). If the tags is already built (already present in the artefact repository), the pipeline will fail as expected, and if the tag has never been built, the pipeline will succeed as expected.
So adding this behaviour in the multibranch pipeline makes sense for me (with any warnings you want about the potential risks)
Please open a new JIRA for that.