• Icon: Task Task
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • workflow-job-plugin
    • None
    • Jenkins 2.138.2 and 2.138.3

      We had this issue since 2.138.2, now we are on 2.138.3

      When running a build, its always ignoring the local parameters and its always taking into consideration only the global parameters. This makes it impossible for us to run builds with different parameters as they will always only follow the global parameters.

       

      The only way this could work is when there is no global parameters. If there is only Local parameters then they wont be overriden.

          [JENKINS-54767] Global variables are overriding local variables

          Here is one more screenshots of the global variables on the Jenkins system configuration:

          fisnik hajredini added a comment - Here is one more screenshots of the global variables on the Jenkins system configuration:

          Oleg Nenashev added a comment -

          fhajredini sorry, I am busy with other personal topics. I cannot provide any ETA for my response in this ticket, see https://groups.google.com/d/msg/jenkinsci-dev/XToix3QpL_k/j2k0xeXvCQAJ . You can use other community channels, like IRC or user/developer mailing lists

          Oleg Nenashev added a comment - fhajredini sorry, I am busy with other personal topics. I cannot provide any ETA for my response in this ticket, see https://groups.google.com/d/msg/jenkinsci-dev/XToix3QpL_k/j2k0xeXvCQAJ . You can use other community channels, like IRC or user/developer mailing lists

          Jan Bottek added a comment -

          we have the same problem that our global env variables from jenkins configuration will overwrite our job parameters, but only in Pipeline jobs - freestyle jobs are not affected. EnvInject Plugin is not installed

          Jan Bottek added a comment - we have the same problem that our global env variables from jenkins configuration will overwrite our job parameters, but only in Pipeline jobs - freestyle jobs are not affected. EnvInject Plugin is not installed

          Jan Bottek added a comment - - edited

          after downgrading the 3 plugins it was working again

           

          name from to
          Pipeline: Declarative 1.3.4 1.3.2
          Pipeline: Declarative Extension Points API 1.3.4 1.3.2
          Pipeline: Job  2.31  2.25

          so it seems it only belongs to the plugins and not to Jenkins core. So we are not using depclarative pipeline, i assume it is related to Pipeline: Job, but we downgraded the other two due to dependencies

          Jan Bottek added a comment - - edited after downgrading the 3 plugins it was working again   name from to Pipeline: Declarative 1.3.4 1.3.2 Pipeline: Declarative Extension Points API 1.3.4 1.3.2 Pipeline: Job  2.31  2.25 so it seems it only belongs to the plugins and not to Jenkins core. So we are not using depclarative pipeline, i assume it is related to Pipeline: Job, but we downgraded the other two due to dependencies

          wreggyl Thanks for you reply. We are currently following a different approach to fixing this, because of some other issues the pipeline job might cause. We decided to include the variables in the Jenkinsfile script as a temporary approach until this issue is resolved.

          fisnik hajredini added a comment - wreggyl Thanks for you reply. We are currently following a different approach to fixing this, because of some other issues the pipeline job might cause. We decided to include the variables in the Jenkinsfile script as a temporary approach until this issue is resolved.

          Jan Bottek added a comment -

          is there any progress on this issue, or something which can be done from my site to help solving this issue?

          Jan Bottek added a comment - is there any progress on this issue, or something which can be done from my site to help solving this issue?

          We have added a helper function where we get the environment data. You can check our Jenkins CI/CD on https://github.com/pelagicore/pelux-manifests.git

          fisnik hajredini added a comment - We have added a helper function where we get the environment data. You can check our Jenkins CI/CD on https://github.com/pelagicore/pelux-manifests.git

          Jan Bottek added a comment - - edited

          fhajredini thx for the fast replay. sorry for my question, but how can i see now in which version of the plugin this issue is solved? because issue is still open and on your mentioned CI i didn't see the code for the plugin itself, or what i overlook?

           

          => ahh, now i understood

          Jan Bottek added a comment - - edited fhajredini thx for the fast replay. sorry for my question, but how can i see now in which version of the plugin this issue is solved? because issue is still open and on your mentioned CI i didn't see the code for the plugin itself, or what i overlook?   => ahh, now i understood

          Jan Bottek added a comment -

          Hi, i tested it again with Jenkins 2.164.2 and the plugins

           

          PlugIn from
          Pipeline: Declarative 1.3.7
          Pipeline: Declarative Extension Points API 1.3.7
          Pipeline: Job  2.32

          We have a global environment variable in Jenkins and a Job with a parameter with the same name and we try to overwrite the resulting env variable in the job

           

          node()

          {     echo env.custom_env_var     echo params.custom_env_var }

          In FreeStyle Job this is still working, only in pipeline we get this error.

          Jan Bottek added a comment - Hi, i tested it again with Jenkins 2.164.2 and the plugins   PlugIn from Pipeline: Declarative 1.3.7 Pipeline: Declarative Extension Points API 1.3.7 Pipeline: Job  2.32 We have a global environment variable in Jenkins and a Job with a parameter with the same name and we try to overwrite the resulting env variable in the job   node() {     echo env.custom_env_var     echo params.custom_env_var } In FreeStyle Job this is still working, only in pipeline we get this error.

          Heiko Nardmann added a comment - - edited

          To me it looks like this issue is still unresolved in 2021.

          And I see it in a freestyle job where I redefine an environment variable (using "Prepare an environment for the run") that is initially defined globally. Only the global value is seen in my "Execute shell" step.

           

          Jenkins v2.204.6

          Heiko Nardmann added a comment - - edited To me it looks like this issue is still unresolved in 2021. And I see it in a freestyle job where I redefine an environment variable (using "Prepare an environment for the run") that is initially defined globally. Only the global value is seen in my "Execute shell" step.   Jenkins v2.204.6

            Unassigned Unassigned
            fhajredini fisnik hajredini
            Votes:
            8 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: