Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58751

TAG_NAME is not populated in declarative multibranch pipeline

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

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

      However I can't use the when condition with tags as outlined here (https://jenkins.io/blog/2018/05/16/pipelines-with-git-tags/). According to the docs (https://jenkins.io/doc/book/pipeline/syntax/#when) when depends on the variable TAG_NAME which I assume should be set by Jenkins. But both  params.TAG_NAME, env.TAG_NAME are null.

      Thus my when condition 'when { tag "" }' never triggers.

        Attachments

          Activity

          jenkinsuser12345678 John Doe created issue -
          markewaite Mark Waite made changes -
          Field Original Value New Value
          Assignee Mark Waite [ markewaite ]
          markewaite Mark Waite made changes -
          Summary TAG_NAME is not populated in descriptive multibranch pipeline TAG_NAME is not populated in declarative multibranch pipeline
          jenkinsuser12345678 John Doe made changes -
          Issue Type Bug [ 1 ] Improvement [ 4 ]
          jenkinsuser12345678 John Doe made changes -
          Component/s declarative-pipeline-when-conditions-plugin [ 23168 ]
          Component/s git-plugin [ 15543 ]
          markewaite Mark Waite made changes -
          Resolution Not A Defect [ 7 ]
          Status Open [ 1 ] Fixed but Unreleased [ 10203 ]
          markewaite Mark Waite made changes -
          Status Fixed but Unreleased [ 10203 ] Closed [ 6 ]

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jenkinsuser12345678 John Doe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: