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

JIRA_ISSUES variable is empty in downstream jobs

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Jenkins v2.6.1
      jira-plugin v2.3
      delivery-pipeline-plugin v1.0.0
      OS: RHEL

      The JIRA_ISSUES variable is empty in downstream jobs past the first one.

      I'm trying to update the related issues as they flow through a series of chained downstream jobs. For Example: BUILD --> QA Deploy --> STAGING Deploy. I'm able to capture accumulated issues from multiple BUILD runs when running the first downstream job (QA Deploy) using the JIRA: Add related environment variables to build in the QA job and referencing the $JIRA_ISSUES variable. However, when I run the next downstream job (STAGING Deploy), $JIRA_ISSUES is empty.

      How can I capture the accumulated JIRA issues in a variable in the STAGING job just like it does in the QA job?

      STAGING Deploy job configuration:

       

        1. jira_plugin_empty_parameter.png
          jira_plugin_empty_parameter.png
          88 kB
        2. related-JIRA.PNG
          related-JIRA.PNG
          13 kB
        3. expect-jiraIssues-parameter.PNG
          expect-jiraIssues-parameter.PNG
          22 kB
        4. downstream-jobParameters.PNG
          downstream-jobParameters.PNG
          20 kB
        5. empty-jiraIssues.PNG
          empty-jiraIssues.PNG
          6 kB
        6. jira-issue-setup.PNG
          jira-issue-setup.PNG
          29 kB
        7. deliveryPipeline-issues.PNG
          deliveryPipeline-issues.PNG
          17 kB

          [JENKINS-43701] JIRA_ISSUES variable is empty in downstream jobs

          Joe Levis created issue -
          Joe Levis made changes -
          Environment Original: Jenkins v2.6.1
          JIRA-plugin v2.3
          OS: RHEL
          New: Jenkins v2.6.1
          JIRA-plugin v2.3
          Delivery Pipeline Plugin v1.0.0
          OS: RHEL
          Joe Levis made changes -
          Environment Original: Jenkins v2.6.1
          JIRA-plugin v2.3
          Delivery Pipeline Plugin v1.0.0
          OS: RHEL
          New: Jenkins v2.6.1
          jira-plugin v2.3
          delivery-pipeline-plugin v1.0.0
          OS: RHEL

          Tommy Tynjä added a comment -

          jlevis Have you used this functionality before and it has worked? Have you upgraded your Jenkins version recently? I noticed that the same thing happened to me when I upgraded Jenkins version. All of a sudden parameters were no longer propagated. In our case we assured that we declared every input parameter expected in every job configuration of the pipeline (so that they could be passed downstream) and that solved the problem, thus I did not see any relation to the functionality in the delivery pipeline plugin. Could you reproduce this with a simple pipeline with an example configuration?

          Tommy Tynjä added a comment - jlevis Have you used this functionality before and it has worked? Have you upgraded your Jenkins version recently? I noticed that the same thing happened to me when I upgraded Jenkins version. All of a sudden parameters were no longer propagated. In our case we assured that we declared every input parameter expected in every job configuration of the pipeline (so that they could be passed downstream) and that solved the problem, thus I did not see any relation to the functionality in the delivery pipeline plugin. Could you reproduce this with a simple pipeline with an example configuration?
          Tommy Tynjä made changes -
          Assignee Original: Patrik Boström [ patbos ] New: Tommy Tynjä [ tommysdk ]
          Joe Levis made changes -
          Attachment New: downstream-jobParameters.PNG [ 37283 ]
          Joe Levis made changes -
          Attachment New: expect-jiraIssues-parameter.PNG [ 37284 ]

          Joe Levis added a comment -

          Hi tommysdk,

          This is the first time I'm implementing something like this in Jenkins, so nothing to compare it to.

          I've tried passing the JIRA_ISSUES value as a Predefined parameter to the downstream jobs:

          Then having the downstream job expect the parameter:


          I think the question I'm looking to answer is "Can Jenkins update the related JIRA issues as they are reflected in the Delivery Pipeline view?" Which means, I'd need Jenkins jobs to be aware of aggregated tickets, not just the specific ones related to a single build. So that when multiple issues accumulate in the QA stage for example, they are all updated to "In Staging" when I push the latest build to the STAGING stage. I hope that makes sense?

          Joe Levis added a comment - Hi tommysdk , This is the first time I'm implementing something like this in Jenkins, so nothing to compare it to. I've tried passing the JIRA_ISSUES value as a Predefined parameter to the downstream jobs: Then having the downstream job expect the parameter: I think the question I'm looking to answer is "Can Jenkins update the related JIRA issues as they are reflected in the Delivery Pipeline view?" Which means, I'd need Jenkins jobs to be aware of aggregated tickets, not just the specific ones related to a single build. So that when multiple issues accumulate in the QA stage for example, they are all updated to "In Staging" when I push the latest build to the STAGING stage. I hope that makes sense?
          Joe Levis made changes -
          Component/s Original: delivery-pipeline-plugin [ 18134 ]
          Joe Levis made changes -
          Description Original: The JIRA_ISSUES variable is blank for any downstream jobs past the first one. I'm trying to update the related JIRA issues as they flow through the Delivery Pipeline:

          !deliveryPipeline-issues.PNG|width=459,height=107!

          I'm using the *JIRA: Add related environment variables to build* with the *JIRA: Progress issues by workflow action* build steps:

          !jira-issue-setup.PNG|width=523,height=179!

          This works for the first downstream job (QA Deploy), but not for the next job (STAGING Deploy):

          !empty-jiraIssues.PNG|width=227,height=31!
          New: The JIRA_ISSUES variable is empty in downstream jobs past the first one.

          I'm trying to update the related issues as they flow through a series of chained downstream jobs. For Example: BUILD --> QA Deploy --> STAGING Deploy. I'm able to capture accumulated issues from multiple BUILD runs when running the first downstream job (QA Deploy) using the *JIRA: Add related environment variables to build* in the QA job and referencing the $JIRA_ISSUES variable. However, when I run the next downstream job (STAGING Deploy), $JIRA_ISSUES is empty.

          How can I capture the accumulated JIRA issues in a variable in the STAGING job just like it does in the QA job?

          *STAGING Deploy job configuration:*

          !jira-issue-setup.PNG|width=523,height=179!

           

            tommysdk Tommy Tynjä
            jlevis Joe Levis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: