[JIRA] (JENKINS-58751) TAG_NAME is not populated in declarative multibranch pipeline

14 views
Skip to first unread message

mark.earl.waite@gmail.com (JIRA)

unread,
Aug 1, 2019, 3:50:03 PM8/1/19
to jenkinsc...@googlegroups.com
Mark Waite updated an issue
 
Jenkins / Bug JENKINS-58751
TAG_NAME is not populated in declarative multibranch pipeline
Change By: Mark Waite
Summary: TAG_NAME is not populated in descriptive declarative multibranch pipeline
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

mark.earl.waite@gmail.com (JIRA)

unread,
Aug 1, 2019, 3:58:01 PM8/1/19
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-58751
 
Re: TAG_NAME is not populated in declarative multibranch pipeline
Please provide more details on the multibranch pipeline that you created.  Preferably, provide step-by-step instructions that someone else can use to duplicate the problem.

You said:

{quote}I configured a multibranch pipeline to check out via git, discover branches, discover tags and the added clone behaviour to fetch tags.{quote}

You didn't say:
* What version of the git client plugin, git plugin, github branch source, bitbucket branch source, Gitea, pipeline, and other plugins you're using
* Which SCM implementation you used to create the multibranch pipeline (git, GitHub branch source, Bitbucket, Gitea, something else)
* What other options you configured as part of defining the multibranch pipeline
* The configuration file ( {{config.xml}} ) of the multibranch pipeline that is showing the problem


Assumptions I made:
* {{Windows 10}} means that the Jenkins server is running on Windows 10.
* Git for Windows 2.22 is being used on the Windows 10 Jenkins server.  I don't see anything that hints this is somehow connected to a specific version of command line git on Windows, so I assumed the version I have installed on my Windows computer
* Java 8 as provided by AdoptOpenJDK, since that is what I have installed on my Windows computer now that Oracle JDK requires a license purchase from Oracle for commercial use
* Latest releases of all the relevant plugins
* GitHub as the provider for the multibranch pipeline definition (not git, not Bitbucket, and not Gitea)

julius.neuffer@opv.engineering (JIRA)

unread,
Aug 2, 2019, 8:42:02 AM8/2/19
to jenkinsc...@googlegroups.com
John Doe updated an issue
 
Jenkins / Improvement JENKINS-58751
Change By: John Doe
Component/s: declarative-pipeline-when-conditions-plugin
Component/s: git-plugin

julius.neuffer@opv.engineering (JIRA)

unread,
Aug 2, 2019, 8:42:03 AM8/2/19
to jenkinsc...@googlegroups.com
John Doe updated an issue
Change By: John Doe
Issue Type: Bug Improvement

julius.neuffer@opv.engineering (JIRA)

unread,
Aug 2, 2019, 8:46:02 AM8/2/19
to jenkinsc...@googlegroups.com
John Doe commented on Improvement JENKINS-58751
 
Re: TAG_NAME is not populated in declarative multibranch pipeline

Yes, thank you, you're assumptions are mostly correct. It turned out the problem is that 'TAG_NAME' is only populated when the build is triggered because of a tag. In order to get builds triggered by tags one needs the Basic Branch Build Strategies plugin (https://wiki.jenkins.io/display/JENKINS/Basic+Branch+Build+Strategies+Plugin). I think the docs on the when condition (https://jenkins.io/doc/book/pipeline/syntax/#when)  could be improved upon by mentioning this.

mark.earl.waite@gmail.com (JIRA)

unread,
Aug 2, 2019, 9:33:02 AM8/2/19
to jenkinsc...@googlegroups.com

Thanks for the suggestion on the documentation. I've added it to my "Jenkins Git Use Cases" document to remind me of things that need to be documented and where they need to be documented.

If you'd like to submit a pull request, the documentation is open for contributions as pull requests. The GitHub interface makes it easy to contribute even without cloning or building locally. Refer to the when directive in the pipeline syntax.

mark.earl.waite@gmail.com (JIRA)

unread,
Aug 2, 2019, 9:33:03 AM8/2/19
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Improvement JENKINS-58751
Thanks for the suggestion on the documentation.  I've added it to my "[Jenkins Git Use Cases|https://docs.google.com/document/d/1FNofpRVFe8WTtMpKb7exftsBOLS_qJydULlUMePswbY/edit#]" document to remind me of things that need to be documented and where they need to be documented.

If you'd like to submit a pull request, the documentation is open for contributions
as pull requests .  The GitHub interface makes it easy to contribute even without cloning or building locally.  Refer to the [when directive in the pipeline syntax|https://github.com/jenkins-infra/jenkins.io/blob/master/content/doc/book/pipeline/syntax.adoc#when].

mark.earl.waite@gmail.com (JIRA)

unread,
Aug 3, 2019, 9:10:01 AM8/3/19
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Aug 3, 2019, 9:10:03 AM8/3/19
to jenkinsc...@googlegroups.com
Change By: Mark Waite
Status: Open Fixed but Unreleased
Resolution: Not A Defect
Reply all
Reply to author
Forward
0 new messages