Tuukka Mustonen created JENKINS-13852:
-----------------------------------------

             Summary: Allow speciying Git SHA1 commit id for next build(s) as 
Predefined parameter
                 Key: JENKINS-13852
                 URL: https://issues.jenkins-ci.org/browse/JENKINS-13852
             Project: Jenkins
          Issue Type: Improvement
          Components: git-parameter, parameterized-trigger
            Reporter: Tuukka Mustonen
            Assignee: huybrechts


Consider a stream of jobs: A - B - C

We can parameterize to build B with the same git commit SHA1 as A by adding 
"Pass-through Git commit that was build" parameter in A. However, this only 
works for subsequent jobs. There is no way to configure what SHA1 C will use.

In our case, the B uses a different Git repository than A, while C again uses 
the same repository as A. We would need to parameterize the stream so that A 
and C use the same revision.

I tried manually setting GIT_COMMIT variable through "Predefined parameters" in 
A. Using 'env' as a shell script in B, I can see that GIT_COMMIT environment 
property gets correctly set, however, it doesn't seem to have any effect. Maybe 
this is because parameters kick in only after Git checkout, so that the default 
(empty) GIT_COMMIT is used for checkout and GIT_COMMIT is only set to what was 
passed after that.

Anyway, would be nice to be able to manually set the GIT_COMMIT through 
"Predefined parameters" instead of having to use the "Pass-through Git commit 
that was build". I think that be quite flexible solution.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to