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

Subversion Tagging does not work correctly with alternate credentials

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When tagging a build using the Subversion SCM, if you elect to choose the Use atlernate credential for tagging option, any alternate credentials specified are ignored, and the tagging proceeds using the same effective user that Jenkins normally uses for accessing that target repository.

      This issue was touched upon before in JENKINS-2053, in the comment by idlysphere on 14/Feb/2010, but I think it was missed because his comment was not directly related to the original focus of that ticket.

        Attachments

          Issue Links

            Activity

            Hide
            ebekker Eugene Bekker added a comment -

            In the related ticket, the original comment also included a patch, and when I manually applied the patch, it fixed the issue. Here is the patch reproduced again from that comment:

            Index: src/main/resources/hudson/scm/SubversionTagAction/tagForm.jelly
            ===================================================================
            --- src/main/resources/hudson/scm/SubversionTagAction/tagForm.jelly	(revision 27458)
            +++ src/main/resources/hudson/scm/SubversionTagAction/tagForm.jelly	(working copy)
            @@ -101,7 +101,7 @@
                             <div class="textarea-handle"/>
                           </td>
                         </tr>
            -            <f:optionalBlock field="credential" title="${%Use alternate credential for tagging}">
            +            <f:optionalBlock name="credential" title="${%Use alternate credential for tagging}">
                           <f:block>
                             <table style="width:100%">
                               <x:enterCredential xmlns:x="/hudson/scm/subversion" />
            
            Show
            ebekker Eugene Bekker added a comment - In the related ticket, the original comment also included a patch, and when I manually applied the patch, it fixed the issue. Here is the patch reproduced again from that comment: Index: src/main/resources/hudson/scm/SubversionTagAction/tagForm.jelly =================================================================== --- src/main/resources/hudson/scm/SubversionTagAction/tagForm.jelly (revision 27458) +++ src/main/resources/hudson/scm/SubversionTagAction/tagForm.jelly (working copy) @@ -101,7 +101,7 @@ <div class= "textarea-handle" /> </td> </tr> - <f:optionalBlock field= "credential" title= "${%Use alternate credential for tagging}" > + <f:optionalBlock name= "credential" title= "${%Use alternate credential for tagging}" > <f:block> <table style= "width:100%" > <x:enterCredential xmlns:x= "/hudson/scm/subversion" />
            Hide
            ebekker Eugene Bekker added a comment -

            Please note, the patch simply corrects the name of an XML attribute from field to name. This patch can even be tested without any rebuild or recompile of the Subversion plugin because it only affects an embedded resource file (a Jelly script) in the Subversion plugin archive. To test it out, simply navigate to the expanded folder corresponding to the original Subversion.hpi plugin archive, then locate the tagForm.jelly file (the source file path in the patch above is indicative), and make the one change to line 104.

            Restart Jenkins, and then you should be able to successfully tag a build using alternate login credentials in a Subversion repository.

            Since this bug has been in the plugin for a long time now, and I confirmed it's still in the latest revision of this file in the plugins source repository, and hardly anyone has noticed it, I can only assume this feature is rarely if ever used, which really surprises me.

            Show
            ebekker Eugene Bekker added a comment - Please note, the patch simply corrects the name of an XML attribute from field to name . This patch can even be tested without any rebuild or recompile of the Subversion plugin because it only affects an embedded resource file (a Jelly script) in the Subversion plugin archive. To test it out, simply navigate to the expanded folder corresponding to the original Subversion.hpi plugin archive, then locate the tagForm.jelly file (the source file path in the patch above is indicative), and make the one change to line 104. Restart Jenkins, and then you should be able to successfully tag a build using alternate login credentials in a Subversion repository. Since this bug has been in the plugin for a long time now, and I confirmed it's still in the latest revision of this file in the plugins source repository, and hardly anyone has noticed it, I can only assume this feature is rarely if ever used, which really surprises me.
            Hide
            dogfood dogfood added a comment -

            Integrated in plugins_subversion #113
            [FIXED JENKINS-10461] Subversion Tagging does not work correctly with alternate credentials

            sogabe :
            Files :

            • /trunk/hudson/plugins/subversion/src/main/resources/hudson/scm/SubversionTagAction/tagForm.jelly
            Show
            dogfood dogfood added a comment - Integrated in plugins_subversion #113 [FIXED JENKINS-10461] Subversion Tagging does not work correctly with alternate credentials sogabe : Files : /trunk/hudson/plugins/subversion/src/main/resources/hudson/scm/SubversionTagAction/tagForm.jelly
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: sogabe
            Path:
            src/main/resources/hudson/scm/SubversionTagAction/tagForm.jelly
            http://jenkins-ci.org/commit/subversion-plugin/23deb3c58ba8a3c6fb80a2443e1e664b9fce9a77
            Log:
            [FIXED JENKINS-10461] Subversion Tagging does not work correctly with alternate credentials

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: sogabe Path: src/main/resources/hudson/scm/SubversionTagAction/tagForm.jelly http://jenkins-ci.org/commit/subversion-plugin/23deb3c58ba8a3c6fb80a2443e1e664b9fce9a77 Log: [FIXED JENKINS-10461] Subversion Tagging does not work correctly with alternate credentials
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: sogabe
            Path:
            src/main/resources/hudson/scm/SubversionTagAction/tagForm.jelly
            http://jenkins-ci.org/commit/subversion-plugin/23deb3c58ba8a3c6fb80a2443e1e664b9fce9a77
            Log:
            [FIXED JENKINS-10461] Subversion Tagging does not work correctly with alternate credentials

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: sogabe Path: src/main/resources/hudson/scm/SubversionTagAction/tagForm.jelly http://jenkins-ci.org/commit/subversion-plugin/23deb3c58ba8a3c6fb80a2443e1e664b9fce9a77 Log: [FIXED JENKINS-10461] Subversion Tagging does not work correctly with alternate credentials

              People

              • Assignee:
                sogabe sogabe
                Reporter:
                ebekker Eugene Bekker
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: