Status: In Progress (View Workflow)
I'm not sure if this is a bug or not, but I tried putting an environment variable in the Task Name, and it's not consuming it.
The reason is that we have 1 job (deploy) that deploys based on a parameter (env var), but the pipeline does not expand that environment variable.
- is related to
JENKINS-25377 Ability to add variables to stage and task name
JENKINS-25685 Parameterized Trigger - Delivery Pipeline compatibilety
JENKINS-29637 Ability to provide description for the task
In response to your question about what to do if the param is not set... I would expect the value of task and stage to act as if the field itself was empty in the case that the param is not set.
Right now, I believe that task and stage default to the build name (not 100% sure) if the user leaves these fields blank.
Is there any possibility of implementing something like
JENKINS-25377 (Ability to add variables to stage and task name) soon?
I have a particular build scenario would make what I'm trying to do work (Note that my example is fictitious just to get my idea accross).
I have a matrix job with a 'User Defined Axis' named 'arguments.' Arguments has two values ('arg1' 'arg2'). The matrix job triggers a parameterized job (let's call this 'param_job') for each value of 'arguments' and passes the AXIS value as a parameter. 'param_job' has it's 'stage' set to 'deploy' and it's 'task' set to '$arguments'.
Right now when I look at the dashboard with the matrix job as the starting job it looks like this:
(matrix_job) -> param_job(stage: deploy, task: $arguments)
The issue here is that this doesn't show that matrix_job kicked of two builds of param_job.
Once this fix is in, should I expect the dashboard to show this:
(matrix_job) -> param_job(stage: deploy, task: arg1)
-> param_job(stage: deploy, task: arg2)