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

Promoted Builds + Parameterized Trigger fails to pass Git revision

      When using Promoted Builds to manually promote a build and invoke Parameterized Trigger with a parameter of "Pass through Git Commit that was built", the promotion fails with the following message:

      This project doesn't use Git as SCM. Can't pass the revision to downstream

      The job in question most certainly uses Git for SCM. Without debugging into code, a quick bit of Googling suggests that it may already be fixed with a pull request waiting, as not all actions are getting passed.

          [JENKINS-14145] Promoted Builds + Parameterized Trigger fails to pass Git revision

          Pull requst 11 has been merged and released in 2.5.
          You can pass GIT_COMMIT as following:

          Predefined parameter
          GIT_COMMIT=${PROMOTED_GIT_COMMIT}
          

          OHTAKE Tomohiro added a comment - Pull requst 11 has been merged and released in 2.5. You can pass GIT_COMMIT as following: Predefined parameter GIT_COMMIT=${PROMOTED_GIT_COMMIT}

          This is not fixed as the workaround you give is not working. I still have:

          This project doesn't use Git as SCM. Can't pass the revision to downstream

          Here are the versions of the related plugins:

          promoted-builds-2.8-1
          parameterized-trigger-2.16-1
          git-1.1.26-1

          Julien Pivotto added a comment - This is not fixed as the workaround you give is not working. I still have: This project doesn't use Git as SCM. Can't pass the revision to downstream Here are the versions of the related plugins: promoted-builds-2.8-1 parameterized-trigger-2.16-1 git-1.1.26-1

          Julien Pivotto added a comment - - edited

          Setting
          Predefined parameter
          GIT_COMMIT=$PROMOTED_GIT_COMMIT
          as Predefined parameter just do nothing. The paramater is there in the triggered job but it builds the last commit anyway.

          Julien Pivotto added a comment - - edited Setting Predefined parameter GIT_COMMIT=$PROMOTED_GIT_COMMIT as Predefined parameter just do nothing. The paramater is there in the triggered job but it builds the last commit anyway.

          ikedam added a comment -

          Just passing GIT_COMMIT does not resolve the problem.
          "Pass through Git Commit that was built" makes downstream builds checkout the same revision, not just passes GIT_COMMIT.

          The problem of "Pass through Git Commit that was built" with Promoted Builds plugin is fixed in Git plugin 1.5.0
          (See https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-Version1.5.0%28Aug28,2013%29 ).
          Please try that.

          ikedam added a comment - Just passing GIT_COMMIT does not resolve the problem. "Pass through Git Commit that was built" makes downstream builds checkout the same revision, not just passes GIT_COMMIT . The problem of "Pass through Git Commit that was built" with Promoted Builds plugin is fixed in Git plugin 1.5.0 (See https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-Version1.5.0%28Aug28,2013%29 ). Please try that.

            Unassigned Unassigned
            danielmendeley Daniel Jones
            Votes:
            6 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: