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

Extend Git Publisher to push multiple branches, including HEAD

    XMLWordPrintable

Details

    • New Feature
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • git-plugin
    • Jenkins 1.549
      Git Client Plugin 1.6.2
      Git Plugin 2.0.1

    Description

      We use the maven-jgitflow-plugin to manage our build workflow.

      The release-finish goal commits to two local branches develop and master. These need to be pushed to origin. Typically the plugin does this. Because in the latest version of Git Client Plugin the credentials are not stored locally anymore this does not work.

      The Git Publisher seemed like the solution but sadly it only supports pushing HEAD. It would be great if it allowed to choose what to push. HEAD should remain the default (e.g. when box is empty).

      There is no workaround available other than using Git Client Plugin 1.4.3 and Git Plugin 2.0.0.

      Attachments

        Issue Links

          Activity

            markewaite Mark Waite added a comment -

            I'm not sure I understand. Are you saying that in an earlier version of the plugin, you were able to define two Git Publisher actions, one that pushed to the develop branch, and one that pushed to the master branch? Did that give you the result you wanted?

            The Git Publisher help says "Specify remote branches to push the current HEAD to, as of the completion of the build." Are you intending to push current HEAD to both develop and master?

            I'm not sure if you're phrasing this as an enhancement request (add the Git Publisher ability to push something other than the current HEAD) or as a bug report that something regressed (you were previously able to push separate branches and now you can't).

            Can you clarify your intent? Did you solve the problem in Git client plugin 1.4.3 and Git plugin 2.0.0 by embedding the authentication information in the Git repository URL? Or, did you make a build step which performed the push using Git commands?

            markewaite Mark Waite added a comment - I'm not sure I understand. Are you saying that in an earlier version of the plugin, you were able to define two Git Publisher actions, one that pushed to the develop branch, and one that pushed to the master branch? Did that give you the result you wanted? The Git Publisher help says "Specify remote branches to push the current HEAD to, as of the completion of the build." Are you intending to push current HEAD to both develop and master? I'm not sure if you're phrasing this as an enhancement request (add the Git Publisher ability to push something other than the current HEAD) or as a bug report that something regressed (you were previously able to push separate branches and now you can't). Can you clarify your intent? Did you solve the problem in Git client plugin 1.4.3 and Git plugin 2.0.0 by embedding the authentication information in the Git repository URL? Or, did you make a build step which performed the push using Git commands?

            Sorry, if my intent was not fully clear. This is an enhancement request to allow Git Publisher to push something other than current HEAD.

            Yes, the problem is solved due to the authentication information being part of the repository URL.

            arlol Arlo Louis O'Keeffe added a comment - Sorry, if my intent was not fully clear. This is an enhancement request to allow Git Publisher to push something other than current HEAD. Yes, the problem is solved due to the authentication information being part of the repository URL.

            I think i resolved it in my PR

            integer Kanstantsin Shautsou added a comment - I think i resolved it in my PR
            ceilfors Wisen Tanasa added a comment -

            I'm using maven-jgitflow-plugin as well and the workaround I use is to set the username and password properties during the maven invocation step. The password is injected by EnvInject plugin.

            ceilfors Wisen Tanasa added a comment - I'm using maven-jgitflow-plugin as well and the workaround I use is to set the username and password properties during the maven invocation step. The password is injected by EnvInject plugin.

            People

              Unassigned Unassigned
              arlol Arlo Louis O'Keeffe
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: