Details
-
Type:
Improvement
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Not A Defect
-
Component/s: declarative-pipeline-when-conditions-plugin
-
Labels:
-
Environment:Windows 10, Jenkins ver. 2.176.2
-
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.
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:
You didn't say:
Assumptions I made: