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

Allow to specify SCM credentials when creating a release

      We contribute this very useful (I think) functionality for m2release. It allows to specify SCM username and password when creating the release.

      We had to patch Hudson core in order to avoid Hudson to log the password in the logs.

      I hope this will be included in future release of m2release plugin.

          [JENKINS-5295] Allow to specify SCM credentials when creating a release

          bouiaw, I gave you the commit access, so that this doesn't forever stay in limbo. Just in case if teilo is no longer actively working on the plugin.

          Kohsuke Kawaguchi added a comment - bouiaw, I gave you the commit access, so that this doesn't forever stay in limbo. Just in case if teilo is no longer actively working on the plugin.

          bouiaw added a comment -

          Thanks

          I saw that you recently did some changed in order to allow us to pass password parameter.
          I will try to use it, in order to remove the hudson patch that is not really nice

          bouiaw added a comment - Thanks I saw that you recently did some changed in order to allow us to pass password parameter. I will try to use it, in order to remove the hudson patch that is not really nice

          James Nord added a comment -

          James Nord added a comment - Still working on it, I was waiting for a response to http://n4.nabble.com/Re-Input-for-svn-password-in-m2release-plugin-tt1290117.html#a1290117

          James Nord added a comment -

          from above URL.
          "I would have expected the username/password would be in the project config and then not supplied for each release. (the release action has it's own permissions so should prevent un-authorised users releasing)"

          Anyone any fors/against on the approach (configure at release time vs configure for project?)

          James Nord added a comment - from above URL. "I would have expected the username/password would be in the project config and then not supplied for each release. (the release action has it's own permissions so should prevent un-authorised users releasing)" Anyone any fors/against on the approach (configure at release time vs configure for project?)

          Code changed in hudson
          User: : teilo
          Path:
          trunk/hudson/plugins/m2release/plugin/src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseAction.java
          trunk/hudson/plugins/m2release/plugin/src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java
          trunk/hudson/plugins/m2release/plugin/src/main/resources/org/jvnet/hudson/plugins/m2release/M2ReleaseAction/index.jelly
          http://jenkins-ci.org/commit/29123
          Log:
          [FIXED JENKINS-5295] Apply patch from issue with minor modifications

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : teilo Path: trunk/hudson/plugins/m2release/plugin/src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseAction.java trunk/hudson/plugins/m2release/plugin/src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseBuildWrapper.java trunk/hudson/plugins/m2release/plugin/src/main/resources/org/jvnet/hudson/plugins/m2release/M2ReleaseAction/index.jelly http://jenkins-ci.org/commit/29123 Log: [FIXED JENKINS-5295] Apply patch from issue with minor modifications

          James Nord added a comment -

          applied patch to plugin, core is unchanged.

          James Nord added a comment - applied patch to plugin, core is unchanged.

          bouiaw added a comment -

          Since core in unchanged, is the password print un the logs ?

          bouiaw added a comment - Since core in unchanged, is the password print un the logs ?

          Julien HENRY added a comment -

          > Anyone any fors/against on the approach (configure at release time vs configure for project?)

          I am in favor of both Allow to set a value in project configuration screen but also allow to override/set it during release action.

          I have tested latest code from SVN with latest Hudson and password is still visible in the log:

          Executing Maven:  -B -f /var/lib/hudson/jobs/Project/workspace/trunk/pom.xml -DscmCommentPrefix=[artf123456] -Dpassword=pass -Dusername=jhenry -Dresume=false release:prepare release:perform -DdryRun=true
          

          Julien HENRY added a comment - > Anyone any fors/against on the approach (configure at release time vs configure for project?) I am in favor of both Allow to set a value in project configuration screen but also allow to override/set it during release action. I have tested latest code from SVN with latest Hudson and password is still visible in the log: Executing Maven: -B -f / var /lib/hudson/jobs/Project/workspace/trunk/pom.xml -DscmCommentPrefix=[artf123456] -Dpassword=pass -Dusername=jhenry -Dresume= false release:prepare release:perform -DdryRun= true

          bouiaw added a comment -

          You have to patch Hudson with hudson-obfuscate-password.patch to avoid password printing.
          I hope there is a better way to achieve this, but I didn't found it.

          bouiaw added a comment - You have to patch Hudson with hudson-obfuscate-password.patch to avoid password printing. I hope there is a better way to achieve this, but I didn't found it.

            Unassigned Unassigned
            bouiaw bouiaw
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: