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

EnvironmentContributor.buildEnvironmentFor needs another overloaded version that takes Job

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

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

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            kohsuke 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.)

            Show
            kohsuke 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.)
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            dogfood 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
            Show
            dogfood 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
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: