Ahmet DAL
Ahmet DAL

Reputation: 4683

Pipeline - Parameterised Trigger Plugin

I have a pipeline type job in my Jenkins. What I am trying to do is to run some pipelines with a parameter like release. For example, I want to run this pipeline for version 1.3.5. I prepared a pipeline code for that and tried to use Parameterized Trigger Plugin to make it parameterised. This plugin was working for normal type tasks but, I couldn't make it works with pipelines.

Here is my definition of the variable;

enter image description here

I can't access the variable I defined with the plugin. Here is the pipeline part which tries to access it;

....
build_tag = "${TAG}"

enter image description here

But, build_tag variable is always null. I tried env.${TAG} and ${env.TAG} but no result.

Upvotes: 1

Views: 313

Answers (1)

Amityo
Amityo

Reputation: 6311

I defined String param named THIS_IS_TEST and was able to get the value with -

echo "${THIS_IS_TEST}"

Make sure that the plugin is updated

Upvotes: 2

Related Questions