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

Job parameters appear in multiple jobs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Blocker
    • Resolution: Unresolved
    • Component/s: git-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      We discoverd that parameters of one Pipeline job affect the parameters of other jobs. This means that in a job you have multiple parameters with the same name. A part of the parameters is from the current job the rest is defined in another (independent) job. (Both jobs should run simultaneously (but independent from each other) on the same Repository/PullRequest)

      Is this normal? Can I configure that parameters are only valid for one specific Job.

      Example: Two jobs have the Parameter "BranchSpecifier". The Parameter in Job A is set to "develop" and in Job B to "master". What is happening is that both Jobs now have two times the Parameter "BranchSpecifier" – once with value 'develop' and once 'master'.
      --> This is valid for all Parameters of both jobs (in both directions)

       

      Note: Job B in this example was created by copying Job A.
      Also the mentioned parameter in the example is used in the Job config as specifier for the branch the job will use to check out the Pipeline scripts from our Pipeline repo. This way we can trigger the job using pipeline scripts  from another branch (for tests).

      The effect of this bug is that both jobs will check out  the same branch and nt the one specified in the parameter.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Beck
            Path:
            test/src/test/java/hudson/model/ParametersAction2Test.java
            http://jenkins-ci.org/commit/jenkins/9c939c4eb421f2ab08f27bfef10c1754d5295ab7
            Log:
            JENKINS-45472 Add test

            Without the fix, test fails in line 308 with:

            org.junit.ComparisonFailure:
            Expected :for p2
            Actual :for p1

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: test/src/test/java/hudson/model/ParametersAction2Test.java http://jenkins-ci.org/commit/jenkins/9c939c4eb421f2ab08f27bfef10c1754d5295ab7 Log: JENKINS-45472 Add test Without the fix, test fails in line 308 with: org.junit.ComparisonFailure: Expected :for p2 Actual :for p1
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            core/src/main/java/hudson/model/ParametersAction.java
            test/src/test/java/hudson/model/ParametersAction2Test.java
            http://jenkins-ci.org/commit/jenkins/fbaa059cf0a842a107858cc39f8df5e8795858a7
            Log:
            Merge pull request #3028 from daniel-beck/JENKINS-45472

            JENKINS-45472 Copy the list in case it's reused elsewhere

            Compare: https://github.com/jenkinsci/jenkins/compare/f2ac41e975cb...fbaa059cf0a8

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/hudson/model/ParametersAction.java test/src/test/java/hudson/model/ParametersAction2Test.java http://jenkins-ci.org/commit/jenkins/fbaa059cf0a842a107858cc39f8df5e8795858a7 Log: Merge pull request #3028 from daniel-beck/ JENKINS-45472 JENKINS-45472 Copy the list in case it's reused elsewhere Compare: https://github.com/jenkinsci/jenkins/compare/f2ac41e975cb...fbaa059cf0a8
            Hide
            danielbeck Daniel Beck added a comment -

            Not fixed by the core change referenced above, needs a fix in Git Plugin.

            Show
            danielbeck Daniel Beck added a comment - Not fixed by the core change referenced above, needs a fix in Git Plugin.
            Hide
            mtarnawa Mateusz Tarnawa added a comment -

            Daniel Beck Mark Waite

            Sorry to follow-up, but is this issue somewhere in the pipeline for any upcoming Jenkins/GitPlugin release? Thanks.

            Show
            mtarnawa Mateusz Tarnawa added a comment - Daniel Beck Mark Waite Sorry to follow-up, but is this issue somewhere in the pipeline for any upcoming Jenkins/GitPlugin release? Thanks.
            Hide
            markewaite Mark Waite added a comment -

            This is not planned for any upcoming git plugin release.  My weekends and evenings have been focused on JENKINS-45447 and JENKINS-47169.  You're welcome to submit a pull request to confirm the problem with tests and to propose a fix for the problem.

            Show
            markewaite Mark Waite added a comment - This is not planned for any upcoming git plugin release.  My weekends and evenings have been focused on JENKINS-45447 and JENKINS-47169 .  You're welcome to submit a pull request to confirm the problem with tests and to propose a fix for the problem.

              People

              • Assignee:
                Unassigned
                Reporter:
                ditschi Christian Ditscher
              • Votes:
                4 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated: