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

WORKSPACE variable for concurrent builds are not defined properly.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core, envinject-plugin
    • Labels:
      None
    • Environment:
      redhat (master/slave)
      jenkins ver=1.448
    • Similar Issues:
      Show 5 results

      Description

      I have master/slave setup, and my project has the ability to execute builds in parallel, i.e. I have 'Execute concurrent builds if necessary' option turned on.

      But when I'm trying to inject any environment variables into my job ( 'Inject environment variables to the build process' option ), then the $WORKSPACE variable is NOT defined properly for parallel builds.

      They should be

      ${JENKINS_HOME/workspace/$

      {JOB_NAME}
      ${JENKINS_HOME/workspace/${JOB_NAME}

      @2
      ${JENKINS_HOME/workspace/$

      {JOB_NAME}@3
      ...
      But $WORKSPACE always points to


      ${JENKINS_HOME/workspace/${JOB_NAME}

      for all job runs.

        Attachments

          Issue Links

            Activity

            nnau Natalia Naumova created issue -
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Gregory Boissinot
            Path:
            src/main/java/org/jenkinsci/plugins/envinject/service/EnvInjectVariableGetter.java
            http://jenkins-ci.org/commit/envinject-plugin/15363ba6de7e9593ff6bd9822da843ad335e8069
            Log:
            Fix JENKINS-12704

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/org/jenkinsci/plugins/envinject/service/EnvInjectVariableGetter.java http://jenkins-ci.org/commit/envinject-plugin/15363ba6de7e9593ff6bd9822da843ad335e8069 Log: Fix JENKINS-12704
            gbois Gregory Boissinot made changes -
            Field Original Value New Value
            Status Open [ 1 ] Resolved [ 5 ]
            Assignee Kohsuke Kawaguchi [ kohsuke ] gbois [ gbois ]
            Resolution Fixed [ 1 ]
            Hide
            mwebber mwebber added a comment -

            The "fix" for this problem appears to have introduced another: JENKINS-12841

            Show
            mwebber mwebber added a comment - The "fix" for this problem appears to have introduced another: JENKINS-12841
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Gregory Boissinot
            Path:
            src/main/java/org/jenkinsci/plugins/envinject/EnvInjectListener.java
            src/main/java/org/jenkinsci/plugins/envinject/service/EnvInjectVariableGetter.java
            http://jenkins-ci.org/commit/envinject-plugin/b2c132e077b2bb052df175660a8906533d681d37
            Log:
            Fix JENKINS-12704 and JENKINS-12841

            Compare: https://github.com/jenkinsci/envinject-plugin/compare/6ff47b2...b2c132e

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/org/jenkinsci/plugins/envinject/EnvInjectListener.java src/main/java/org/jenkinsci/plugins/envinject/service/EnvInjectVariableGetter.java http://jenkins-ci.org/commit/envinject-plugin/b2c132e077b2bb052df175660a8906533d681d37 Log: Fix JENKINS-12704 and JENKINS-12841 Compare: https://github.com/jenkinsci/envinject-plugin/compare/6ff47b2...b2c132e
            Hide
            svs57 Sergey Smirnov added a comment -

            I have this bug on Jenkins ver. 1.450
            Which version of jenkins bug is fixed?

            Show
            svs57 Sergey Smirnov added a comment - I have this bug on Jenkins ver. 1.450 Which version of jenkins bug is fixed?
            Hide
            svs57 Sergey Smirnov added a comment -

            Jenkins ver. 1.457
            Environment Injector Plugin 1.44
            WORKSPACE works correct with concurent builds

            Show
            svs57 Sergey Smirnov added a comment - Jenkins ver. 1.457 Environment Injector Plugin 1.44 WORKSPACE works correct with concurent builds
            ircbot Jenkins IRC Bot made changes -
            Component/s core [ 15593 ]
            Component/s concurrent-build [ 15628 ]
            markhu Mark Hudson made changes -
            Link This issue is related to JENKINS-12841 [ JENKINS-12841 ]

              People

              • Assignee:
                gbois Gregory Boissinot
                Reporter:
                nnau Natalia Naumova
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: