• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 0.6.5

      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.

          [JENKINS-20608] Cannot use Env Var in Task Name

          Do you mean setting stage name or task name value from a global property?
          Manage Jenkins > Configure System > Global properties.

          Patrik Boström added a comment - Do you mean setting stage name or task name value from a global property? Manage Jenkins > Configure System > Global properties.

          Alex Gray added a comment -

          Setting Task Name from an environment variable, not a global property.
          Thanks for the quick reply!

          Alex Gray added a comment - Setting Task Name from an environment variable, not a global property. Thanks for the quick reply!

          Glenn Poston added a comment -

          I'd also like to see this implemented. Just to be clear I'd like to use a build parameter as the value for the task name.

          Glenn Poston added a comment - I'd also like to see this implemented. Just to be clear I'd like to use a build parameter as the value for the task name.

          I can look in to it.
          I have one question:
          What should be the taskname value be if the build parameter is not set?

          Patrik Boström added a comment - I can look in to it. I have one question: What should be the taskname value be if the build parameter is not set?

          Alex Gray added a comment -

          Good question! Either "" or maybe even "NONE|NOT_SET|NULL|". Thanks for looking into this, Patrik.

          Alex Gray added a comment - Good question! Either "" or maybe even "NONE|NOT_SET|NULL|". Thanks for looking into this, Patrik.

          Glenn Poston added a comment -

          Hey Patrik,

          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)

          Glenn Poston added a comment - Hey Patrik, 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)

          Glenn Poston added a comment -

          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.

          Glenn Poston added a comment - 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?

          Carlos Adsuara added a comment - Is there any possibility of implementing something like JENKINS-25377 (Ability to add variables to stage and task name) soon?

          Patrik Boström added a comment - Fixed in: https://github.com/Diabol/delivery-pipeline-plugin/pull/138

          Released in 0.9.6

          Patrik Boström added a comment - Released in 0.9.6

            Unassigned Unassigned
            grayaii Alex Gray
            Votes:
            8 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: