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

Jenkins Pipeline does not clean Build Parameters properly after a build

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • workflow-job-plugin
    • None
    • Jenkins ver. 2.60.3

      I created 3 small projects to test and show my point

      The two small apps that are `jenkins_app_1` and `jenkins_app_2` have a Jenkinsfile that trigger the project `jenkins_deploy` and they pass parameters

      When I execute the job for the first project, `jenkins_app_1` in this example, it goes all well. But when I execute the second job, `jenkins_app_2`, it is like the parameters are not totally cleaned and remained the values from the previous job

      output for the first execution

      [jenkins_deploy] Running shell script
       + echo app1
       app1
       [Pipeline] sh
       [jenkins_deploy] Running shell script
       + p=zip
       + a=app1
       + g=com.company
       + echo http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases
       http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases

      output for the second execution

      [jenkins_deploy] Running shell script
       + echo app2
       app2
       [Pipeline] sh
       [jenkins_deploy] Running shell script
       + p=zip
       + g=com.company
       + a=app1
       + echo http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases
       http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases

      UPDATE

      ------------

      I reported this as a bug, but I realized that the problem was that I had been passing parameters inside other parameters and there is what does not work. I don't think it is a bug, but to have the chance to do that would be an improvement.

          [JENKINS-48013] Jenkins Pipeline does not clean Build Parameters properly after a build

          Agustin Gambina created issue -
          Agustin Gambina made changes -
          Environment Original: Jenkins ver. 2.73.2 New: Jenkins ver. 2.60.3
          Andrew Bayer made changes -
          Component/s New: workflow-job-plugin [ 21716 ]
          Component/s Original: pipeline [ 21692 ]
          Agustin Gambina made changes -
          Description Original: I created 3 small projects to test and show my point
           * jenkins_app_1 -> [https://github.com/agusgambina/jenkins_app_1.git]
           * jenkins_app_2 -> [https://github.com/agusgambina/jenkins_app_2.git]
           * jenkins_deploy -> [https://github.com/agusgambina/jenkins_deploy.git]

          The two small apps that are `jenkins_app_1` and `jenkins_app_2` have a Jenkinsfile that trigger the project `jenkins_deploy` and they pass parameters

          When I execute the job for the first project, `jenkins_app_1` in this example, it goes all well. But when I execute the second job, `jenkins_app_2`, it is like the parameters are not totally cleaned and remained the values from the previous job

          output for the first execution
          {code:java}
          [jenkins_deploy] Running shell script
           + echo app1
           app1
           [Pipeline] sh
           [jenkins_deploy] Running shell script
           + p=zip
           + a=app1
           + g=com.company
           + echo http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases
           http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases{code}
          output for the second execution
          {code:java}
          [jenkins_deploy] Running shell script
           + echo app2
           app2
           [Pipeline] sh
           [jenkins_deploy] Running shell script
           + p=zip
           + g=com.company
           + a=app1
           + echo http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases
           http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases{code}
          New: I created 3 small projects to test and show my point
           * jenkins_app_1 -> [https://github.com/agusgambina/jenkins_app_1.git]
           * jenkins_app_2 -> [https://github.com/agusgambina/jenkins_app_2.git]
           * jenkins_deploy -> [https://github.com/agusgambina/jenkins_deploy.git]

          The two small apps that are `jenkins_app_1` and `jenkins_app_2` have a Jenkinsfile that trigger the project `jenkins_deploy` and they pass parameters

          When I execute the job for the first project, `jenkins_app_1` in this example, it goes all well. But when I execute the second job, `jenkins_app_2`, it is like the parameters are not totally cleaned and remained the values from the previous job

          output for the first execution
          {code:java}
          [jenkins_deploy] Running shell script
           + echo app1
           app1
           [Pipeline] sh
           [jenkins_deploy] Running shell script
           + p=zip
           + a=app1
           + g=com.company
           + echo http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases
           http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases{code}
          output for the second execution
          {code:java}
          [jenkins_deploy] Running shell script
           + echo app2
           app2
           [Pipeline] sh
           [jenkins_deploy] Running shell script
           + p=zip
           + g=com.company
           + a=app1
           + echo http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases
           http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases{code}
          UPDATE

          ------------

          I reported this as a bug, but I realized that the problem was that I had been passing parameters inside other parameters and there is what does not works. I don't think it is a bug, but if to have the chance to do that would be an improvement.
          Issue Type Original: Bug [ 1 ] New: Improvement [ 4 ]
          Agustin Gambina made changes -
          Description Original: I created 3 small projects to test and show my point
           * jenkins_app_1 -> [https://github.com/agusgambina/jenkins_app_1.git]
           * jenkins_app_2 -> [https://github.com/agusgambina/jenkins_app_2.git]
           * jenkins_deploy -> [https://github.com/agusgambina/jenkins_deploy.git]

          The two small apps that are `jenkins_app_1` and `jenkins_app_2` have a Jenkinsfile that trigger the project `jenkins_deploy` and they pass parameters

          When I execute the job for the first project, `jenkins_app_1` in this example, it goes all well. But when I execute the second job, `jenkins_app_2`, it is like the parameters are not totally cleaned and remained the values from the previous job

          output for the first execution
          {code:java}
          [jenkins_deploy] Running shell script
           + echo app1
           app1
           [Pipeline] sh
           [jenkins_deploy] Running shell script
           + p=zip
           + a=app1
           + g=com.company
           + echo http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases
           http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases{code}
          output for the second execution
          {code:java}
          [jenkins_deploy] Running shell script
           + echo app2
           app2
           [Pipeline] sh
           [jenkins_deploy] Running shell script
           + p=zip
           + g=com.company
           + a=app1
           + echo http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases
           http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases{code}
          UPDATE

          ------------

          I reported this as a bug, but I realized that the problem was that I had been passing parameters inside other parameters and there is what does not works. I don't think it is a bug, but if to have the chance to do that would be an improvement.
          New: I created 3 small projects to test and show my point
           * jenkins_app_1 -> [https://github.com/agusgambina/jenkins_app_1.git]
           * jenkins_app_2 -> [https://github.com/agusgambina/jenkins_app_2.git]
           * jenkins_deploy -> [https://github.com/agusgambina/jenkins_deploy.git]

          The two small apps that are `jenkins_app_1` and `jenkins_app_2` have a Jenkinsfile that trigger the project `jenkins_deploy` and they pass parameters

          When I execute the job for the first project, `jenkins_app_1` in this example, it goes all well. But when I execute the second job, `jenkins_app_2`, it is like the parameters are not totally cleaned and remained the values from the previous job

          output for the first execution
          {code:java}
          [jenkins_deploy] Running shell script
           + echo app1
           app1
           [Pipeline] sh
           [jenkins_deploy] Running shell script
           + p=zip
           + a=app1
           + g=com.company
           + echo http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases
           http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases{code}
          output for the second execution
          {code:java}
          [jenkins_deploy] Running shell script
           + echo app2
           app2
           [Pipeline] sh
           [jenkins_deploy] Running shell script
           + p=zip
           + g=com.company
           + a=app1
           + echo http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases
           http://nexus.in:8081/nexus/service/local/artifact/maven/content?r=releases{code}
          UPDATE

          ------------

          I reported this as a bug, but I realized that the problem was that I had been passing parameters inside other parameters and there is what does not work. I don't think it is a bug, but to have the chance to do that would be an improvement.

            Unassigned Unassigned
            agusgambina Agustin Gambina
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: