Alexandre Normand created JENKINS-12659:
-------------------------------------------

             Summary: GitPublisher won't work as promote action
                 Key: JENKINS-12659
                 URL: https://issues.jenkins-ci.org/browse/JENKINS-12659
             Project: Jenkins
          Issue Type: Improvement
          Components: git
    Affects Versions: current
         Environment: Linux CentOS
            Reporter: Alexandre Normand
            Assignee: abayer


Promote actions list GitPublisher as one of the available items. However, when 
configured as a promote action, GitPublisher always fails. I remote debugged 
GitPublisher to find out why and it turns out that build.getProject().getScm() 
is a NullSCM instead of a GitSCM instance. I'm assuming that somehow, the SCM 
instance doesn't apply to promote (the SCM is configured to a valid git 
repository in the job config and the pulls are done without problems). 

Since we're used to have tagging done on build promotion and it's a valid use 
case, I think it would be nice if either:
1. Promote actions would also get access to the GitSCM instance to be able to 
perform the operation.
2. The GitPublisher could be given enough information to create a GitSCM 
instance and tag when under promote (repository url, commit hash matching the 
promoted build).

I've looked a bit at the GitPublisher code and I'm willing to do some work but 
I would like some input as to the best 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