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

BUILD_CAUSE always UPSTREAMTRIGGER in multi-configuration jobs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: envinject-plugin
    • Labels:
      None
    • Environment:
      Jenkins version 1.509.4, envinject version 1.85
    • Similar Issues:

      Description

      BUILD_CAUSE is always set to UPSTREAMTRIGGER in the slaves/children of of multi-configuration jobs, which is not very useful.

        Attachments

          Activity

          Hide
          danielbeck Daniel Beck added a comment -

          I confirm this issue still occurs on Jenkins 1.580 with Env-Inject 1.90 and Matrix Project 1.3.

          Show
          danielbeck Daniel Beck added a comment - I confirm this issue still occurs on Jenkins 1.580 with Env-Inject 1.90 and Matrix Project 1.3.
          Hide
          tsondergaard tsondergaard added a comment - - edited

          I have made a pull request that fixes this problem. The idea is to introduce a ROOT_BUILD_CAUSE variable that expands Cause.UpstreamCause to it's root causes.

          https://github.com/jenkinsci/envinject-plugin/pull/33

          Show
          tsondergaard tsondergaard added a comment - - edited I have made a pull request that fixes this problem. The idea is to introduce a ROOT_BUILD_CAUSE variable that expands Cause.UpstreamCause to it's root causes. https://github.com/jenkinsci/envinject-plugin/pull/33
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Thomas Sondergaard
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugins/envinject/service/BuildCauseRetriever.java
          src/test/java/org/jenkinsci/plugins/envinject/BuildCauseRetrieverTest.java
          http://jenkins-ci.org/commit/envinject-plugin/7ae492dddc9cb6fd6511ab2e425ad36e5e9c7442
          Log:
          [FIXED JENKINS-24785] - Introduce ROOT_BUILD_CAUSE

          For multi-configuration jobs the BUILD_CAUSE passed in the environment
          to build scripts is always UPSTREAMTRIGGER. Introduce ROOT_BUILD_CAUSE
          that expands UpstreamCause to the root causes.

          Update required jenkins version to 1.482 to get
          Cause.UpstreamCause.getUpstreamCauses().

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Thomas Sondergaard Path: pom.xml src/main/java/org/jenkinsci/plugins/envinject/service/BuildCauseRetriever.java src/test/java/org/jenkinsci/plugins/envinject/BuildCauseRetrieverTest.java http://jenkins-ci.org/commit/envinject-plugin/7ae492dddc9cb6fd6511ab2e425ad36e5e9c7442 Log: [FIXED JENKINS-24785] - Introduce ROOT_BUILD_CAUSE For multi-configuration jobs the BUILD_CAUSE passed in the environment to build scripts is always UPSTREAMTRIGGER. Introduce ROOT_BUILD_CAUSE that expands UpstreamCause to the root causes. Update required jenkins version to 1.482 to get Cause.UpstreamCause.getUpstreamCauses().
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: tsondergaard
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugins/envinject/service/BuildCauseRetriever.java
          src/test/java/org/jenkinsci/plugins/envinject/BuildCauseRetrieverTest.java
          http://jenkins-ci.org/commit/envinject-plugin/2fb243d14d62a33dfcad4616eda5dbeb695b87de
          Log:
          Merge pull request #33 from tsondergaard/jenkins-24785-root-cause

          [FIXED JENKINS-24785] - Introduce ROOT_BUILD_CAUSE

          Compare: https://github.com/jenkinsci/envinject-plugin/compare/f28c26b7c4e3...2fb243d14d62

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: tsondergaard Path: pom.xml src/main/java/org/jenkinsci/plugins/envinject/service/BuildCauseRetriever.java src/test/java/org/jenkinsci/plugins/envinject/BuildCauseRetrieverTest.java http://jenkins-ci.org/commit/envinject-plugin/2fb243d14d62a33dfcad4616eda5dbeb695b87de Log: Merge pull request #33 from tsondergaard/jenkins-24785-root-cause [FIXED JENKINS-24785] - Introduce ROOT_BUILD_CAUSE Compare: https://github.com/jenkinsci/envinject-plugin/compare/f28c26b7c4e3...2fb243d14d62

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              tsondergaard tsondergaard
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: