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

Jenkins parameters missing in build when using jira trigger

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: jira-trigger-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.89.3, JIRA Trigger plugin 0.5.1, JIRA Plugin 2.5.1
    • Similar Issues:

      Description

      I have several parameters defined for a Jenkins build through "The project is parameterized".  I created a JIRA trigger with a changelog matcher and also added parameter mapping for a custom field to be used in a later build step.  When I execute the build manually, the Jenkins parameters show up and the build runs.  When it executes via the trigger, the only parameter available is the parameter mapped in the JIRA Trigger.  The other parameters from "The project is parameterized" are not available in the build any longer.

        Attachments

          Activity

          Hide
          ceilfors Wisen Tanasa added a comment -

          Are these values entered manually?

          • OnDemand Static Content
          • Support2018
          • /app/SCM/StaticContentWorkspace/
          • Entirenet;BF_Common;BF_JSP
          Show
          ceilfors Wisen Tanasa added a comment - Are these values entered manually? OnDemand Static Content Support2018 /app/SCM/StaticContentWorkspace/ Entirenet;BF_Common;BF_JSP
          Hide
          calvinmichel Michel Calvin added a comment -

          They are constant values set as read-only string parameters in the build job.

          Show
          calvinmichel Michel Calvin added a comment - They are constant values set as read-only string parameters in the build job.
          Hide
          ceilfors Wisen Tanasa added a comment -

          I might not fully understand your setup, but doesn't that mean that the job is not "parameterized"? The usage of parameterized project (implies manual intervention) seems to contradict with the usage of jira-trigger (implied automated trigger) and I'm not sure what kind of behaviour should be defined.

          If you want to keep your job configuration that way, what about introducing a special job for jira-trigger then triggering your original job as a downstream?

          Show
          ceilfors Wisen Tanasa added a comment - I might not fully understand your setup, but doesn't that mean that the job is not "parameterized"? The usage of parameterized project (implies manual intervention) seems to contradict with the usage of jira-trigger (implied automated trigger) and I'm not sure what kind of behaviour should be defined. If you want to keep your job configuration that way, what about introducing a special job for jira-trigger then triggering your original job as a downstream?
          Hide
          calvinmichel Michel Calvin added a comment -

          The project has parameters that are used in the build steps and are constant for each build run.  No manual intervention is needed when the JIRA trigger kicks off the build.  It uses the values from the parameters to tell the job where to pick up certain files, which dependent git repositories to use in the build, etc.  I wasn't expecting the parameter mapping from the jira-trigger to replace the parameters from the Jenkins job.

          I can setup two jobs if that is the only workaround.  Is it possible to consider an enhancement to the trigger that any parameter mapped with your trigger is "added" to the list of Jenkins parameters already defined in the job?

          Show
          calvinmichel Michel Calvin added a comment - The project has parameters that are used in the build steps and are constant for each build run.  No manual intervention is needed when the JIRA trigger kicks off the build.  It uses the values from the parameters to tell the job where to pick up certain files, which dependent git repositories to use in the build, etc.  I wasn't expecting the parameter mapping from the jira-trigger to replace the parameters from the Jenkins job. I can setup two jobs if that is the only workaround.  Is it possible to consider an enhancement to the trigger that any parameter mapped with your trigger is "added" to the list of Jenkins parameters already defined in the job?
          Hide
          ceilfors Wisen Tanasa added a comment -

          That should be a viable workaround for now. I'm going to have to check in other plugins if they are behaving the same way, but please do submit the enhancement (and pull request if you are interested ).

          Show
          ceilfors Wisen Tanasa added a comment - That should be a viable workaround for now. I'm going to have to check in other plugins if they are behaving the same way, but please do submit the enhancement (and pull request if you are interested ).
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Wisen Tanasa
          Path:
          src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/JiraTriggerIntegrationTest.groovy
          src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/integration/JiraTriggerProject.groovy
          src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/JiraTrigger.groovy
          src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/parameter/DefaultParametersAction.groovy
          http://jenkins-ci.org/commit/jira-trigger-plugin/ec0e6c1850a587d8930f732869c2869342cdf904
          Log:
          JENKINS-50125 Add DefaultParametersAction to triggered job.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Wisen Tanasa Path: src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/JiraTriggerIntegrationTest.groovy src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/integration/JiraTriggerProject.groovy src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/JiraTrigger.groovy src/main/groovy/com/ceilfors/jenkins/plugins/jiratrigger/parameter/DefaultParametersAction.groovy http://jenkins-ci.org/commit/jira-trigger-plugin/ec0e6c1850a587d8930f732869c2869342cdf904 Log: JENKINS-50125 Add DefaultParametersAction to triggered job.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Wisen Tanasa
          Path:
          src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/JiraTriggerIntegrationTest.groovy
          src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/integration/JiraTriggerProject.groovy
          http://jenkins-ci.org/commit/jira-trigger-plugin/f7b2deeec3ad4519648a77e8fb16c19fa6513258
          Log:
          JENKINS-50125 Abstract ParametersDefinitionProperty creation in test.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Wisen Tanasa Path: src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/JiraTriggerIntegrationTest.groovy src/integrationTest/groovy/com/ceilfors/jenkins/plugins/jiratrigger/integration/JiraTriggerProject.groovy http://jenkins-ci.org/commit/jira-trigger-plugin/f7b2deeec3ad4519648a77e8fb16c19fa6513258 Log: JENKINS-50125 Abstract ParametersDefinitionProperty creation in test.
          Hide
          ceilfors Wisen Tanasa added a comment -

          Fixed in 0.6.2.

          Show
          ceilfors Wisen Tanasa added a comment - Fixed in 0.6.2.

            People

            • Assignee:
              ceilfors Wisen Tanasa
              Reporter:
              calvinmichel Michel Calvin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: