• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin
    • Linux CentOS

      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.

          [JENKINS-12659] GitPublisher won't work as promote action

          Alexandre Normand created issue -
          drazzib made changes -
          Link New: This issue is duplicated by JENKINS-13751 [ JENKINS-13751 ]

          drazzib added a comment -

          Hi,

          Is there someone working on this issue ?

          I would like to try fixing this but don't know internals of GitPublisher. Could someone with some background with GitPlugin comment on Alexandre proposed solutions

          Regards,

          drazzib added a comment - Hi, Is there someone working on this issue ? I would like to try fixing this but don't know internals of GitPublisher. Could someone with some background with GitPlugin comment on Alexandre proposed solutions Regards,
          Kanstantsin Shautsou made changes -
          Labels Original: git New: git-publisher

          drazzib, in JENKINS-13751 there are links to suggested patches. Unfortunately they broke something else, (JENKINS-32006) but maybe it's a place for you to start.
          Would be awesome to see this fixed!

          Mattias Jiderhamn added a comment - drazzib , in JENKINS-13751 there are links to suggested patches. Unfortunately they broke something else, ( JENKINS-32006 ) but maybe it's a place for you to start. Would be awesome to see this fixed!
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 143114 ] New: JNJira + In-Review [ 175817 ]
          Thomas Bender made changes -
          Link New: This issue is duplicated by JENKINS-38578 [ JENKINS-38578 ]
          Mark Waite made changes -
          Assignee Original: Andrew Bayer [ abayer ]

            Unassigned Unassigned
            skippyjon Alexandre Normand
            Votes:
            12 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated: