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

EnvironmentContributor.buildEnvironmentFor needs another overloaded version that takes Job

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None

      This is needed to cover project-scoped activities like polling.

          [JENKINS-19042] EnvironmentContributor.buildEnvironmentFor needs another overloaded version that takes Job

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          src/main/java/hudson/plugins/git/GitSCM.java
          src/test/java/hudson/plugins/git/GitSCMTest.java
          http://jenkins-ci.org/commit/git-plugin/c5b127f98ebc652eead68b39aa7f1c93094cbcc4
          Log:
          [FIXED JENKINS-7411]

          Environment variables are in fact not used at all during expansions.
          This commit fixes that. As discussed in the ticket, and as done
          elsewhere, the standard convention is to use previous build's
          environment to expand polling.

          Also see JENKINS-19042

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: src/main/java/hudson/plugins/git/GitSCM.java src/test/java/hudson/plugins/git/GitSCMTest.java http://jenkins-ci.org/commit/git-plugin/c5b127f98ebc652eead68b39aa7f1c93094cbcc4 Log: [FIXED JENKINS-7411] Environment variables are in fact not used at all during expansions. This commit fixes that. As discussed in the ticket, and as done elsewhere, the standard convention is to use previous build's environment to expand polling. Also see JENKINS-19042

          For better compatibility, we need to first wait for various plugins that implement EnvironmentContributor to take advantages of this new method, before SCM plugins and others can rely on Job.getEnvironment() (from what it does today, which relies on the last completed build of a project.)

          Kohsuke Kawaguchi added a comment - For better compatibility, we need to first wait for various plugins that implement EnvironmentContributor to take advantages of this new method, before SCM plugins and others can rely on Job.getEnvironment() (from what it does today, which relies on the last completed build of a project.)

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/model/EnvironmentContributor.java
          core/src/main/java/hudson/model/Job.java
          core/src/main/java/jenkins/model/CoreEnvironmentContributor.java
          test/src/test/groovy/hudson/model/EnvironmentContributorTest.groovy
          http://jenkins-ci.org/commit/jenkins/6588f42904ea133b2709750089557e3650bb1910
          Log:
          [FIXED JENKINS-19042]

          Added a new overloaded version that works on a project.

          Updated CoreEnvironmentContributor accordingly.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/model/EnvironmentContributor.java core/src/main/java/hudson/model/Job.java core/src/main/java/jenkins/model/CoreEnvironmentContributor.java test/src/test/groovy/hudson/model/EnvironmentContributorTest.groovy http://jenkins-ci.org/commit/jenkins/6588f42904ea133b2709750089557e3650bb1910 Log: [FIXED JENKINS-19042] Added a new overloaded version that works on a project. Updated CoreEnvironmentContributor accordingly.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2776
          [FIXED JENKINS-19042] (Revision 6588f42904ea133b2709750089557e3650bb1910)

          Result = UNSTABLE
          kohsuke : 6588f42904ea133b2709750089557e3650bb1910
          Files :

          • changelog.html
          • core/src/main/java/hudson/model/Job.java
          • test/src/test/groovy/hudson/model/EnvironmentContributorTest.groovy
          • core/src/main/java/jenkins/model/CoreEnvironmentContributor.java
          • core/src/main/java/hudson/model/EnvironmentContributor.java

          dogfood added a comment - Integrated in jenkins_main_trunk #2776 [FIXED JENKINS-19042] (Revision 6588f42904ea133b2709750089557e3650bb1910) Result = UNSTABLE kohsuke : 6588f42904ea133b2709750089557e3650bb1910 Files : changelog.html core/src/main/java/hudson/model/Job.java test/src/test/groovy/hudson/model/EnvironmentContributorTest.groovy core/src/main/java/jenkins/model/CoreEnvironmentContributor.java core/src/main/java/hudson/model/EnvironmentContributor.java

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          debian/debian/changelog
          http://jenkins-ci.org/commit/jenkins/e5f5402cc2fdc762d14e7df46c9ac9559d149e8d
          Log:
          1.525 was botched; move its changelog items into the 1.526 section instead.
          Also JENKINS-19042 does not seem to have made it into 1.526; seems to have been towards 1.527.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html debian/debian/changelog http://jenkins-ci.org/commit/jenkins/e5f5402cc2fdc762d14e7df46c9ac9559d149e8d Log: 1.525 was botched; move its changelog items into the 1.526 section instead. Also JENKINS-19042 does not seem to have made it into 1.526; seems to have been towards 1.527.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          debian/changelog
          http://jenkins-ci.org/commit/packaging/ad4f4785f49498989c03f3b533d8e2109c420132
          Log:
          1.525 was botched; move its changelog items into the 1.526 section instead.
          Also JENKINS-19042 does not seem to have made it into 1.526; seems to have been towards 1.527.

          Originally-From: jenkins-ci.org/commit/core/e5f5402cc2fdc762d14e7df46c9ac9559d149e8d

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: debian/changelog http://jenkins-ci.org/commit/packaging/ad4f4785f49498989c03f3b533d8e2109c420132 Log: 1.525 was botched; move its changelog items into the 1.526 section instead. Also JENKINS-19042 does not seem to have made it into 1.526; seems to have been towards 1.527. Originally-From: jenkins-ci.org/commit/core/e5f5402cc2fdc762d14e7df46c9ac9559d149e8d

            kohsuke Kohsuke Kawaguchi
            kohsuke Kohsuke Kawaguchi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: