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

Create Tag (Tag this build) Not working

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Component/s: subversion-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: WIndows Server 2012
    • Similar Issues:

      Description

      This is a clone of the original bug, when When attempting a tag after selecting 'Tag this build', the tag fails. This is also related to https://issues.jenkins-ci.org/browse/JENKINS-21797, but I have eliminated that.

      I was able to get it to pump one failure message, but I was not able to capture it. I am restarting the VM to see if it will pump the message again.

      Generally, it fails silently, not pumping any information to the UI or even the event logs (even with the hudson.scm.SubversionSCM log set to 'fine' or higher).

      I can recreate it using Jenkins 1.575 or 1.576 on Windows Server 2012, using the latest of the Subversion plugin, with a working copy of version 1.7.

      The SVN server is "SmartSVN" hosted on a Windows 2012 server. It has the non-configurable convention of requiring serverpath/svn/ before your repo name, and on the log I failed to capture, I saw it complain about /svn/myreponame on the copy.

      There is only one user specified in the Jenkins credentials for SVN, and they have tagging privileges.

      And I tried the workaround from a similar bug, where you:

      1. Connect to the target machine
      2. Run `svn cleanup` & `svn up` on each workspace, specifying the credentials

      But that had no impact on the result.

      There are no credentials stored in my hudson.scm.SubversionSCM.xml file:

      <?xml version='1.0' encoding='UTF-8'?>
      <hudson.scm.SubversionSCM_-DescriptorImpl plugin="subversion@2.4.1">
      <generation>49</generation>
      <mayHaveLegacyPerJobCredentials>false</mayHaveLegacyPerJobCredentials>
      <workspaceFormat>100</workspaceFormat>
      <validateRemoteUpToVar>false</validateRemoteUpToVar>
      <storeAuthToDisk>false</storeAuthToDisk>
      </hudson.scm.SubversionSCM_-DescriptorImpl>

        Attachments

          Issue Links

            Activity

            Hide
            lwtan78 LW Tan added a comment - - edited

            Realized that the svn authentication depending on the cached of the svn password stored in the user profile. What need to be done is in the OS, try to connect to the said repository and store the encrypted password when asked. You should find a new file created under User/.subversion/svn.simple with the said realm. After that your jenkins should be able to tag without any problem.

            Another way is change the parameter name in the hudson.scm.SubversionTagAction from credentialsId to _.credentialId to enable the parameter value set by the user to be passed into the SVN authentication.

            String credentialsId = parser.get("_.credentialsId");

            Show
            lwtan78 LW Tan added a comment - - edited Realized that the svn authentication depending on the cached of the svn password stored in the user profile. What need to be done is in the OS, try to connect to the said repository and store the encrypted password when asked. You should find a new file created under User/.subversion/svn.simple with the said realm. After that your jenkins should be able to tag without any problem. Another way is change the parameter name in the hudson.scm.SubversionTagAction from credentialsId to _.credentialId to enable the parameter value set by the user to be passed into the SVN authentication. String credentialsId = parser.get("_.credentialsId");
            Hide
            danielbeck Daniel Beck added a comment -

            Realized that the svn authentication depending on the cached of the svn password stored in the user profile. What need to be done is in the OS, try to connect to the said repository and store the encrypted password when asked. You should find a new file created under User/.subversion/svn.simple with the said realm. After that your jenkins should be able to tag without any problem.

            This will override all authentication selected in Jenkins, leading to difficult to investigate problems when using multiple authentications each with only partial access to all Subversion repos used. So while a possible workaround in this case, it has severe, often undesirable side effects.

            Show
            danielbeck Daniel Beck added a comment - Realized that the svn authentication depending on the cached of the svn password stored in the user profile. What need to be done is in the OS, try to connect to the said repository and store the encrypted password when asked. You should find a new file created under User/.subversion/svn.simple with the said realm. After that your jenkins should be able to tag without any problem. This will override all authentication selected in Jenkins, leading to difficult to investigate problems when using multiple authentications each with only partial access to all Subversion repos used. So while a possible workaround in this case, it has severe, often undesirable side effects.
            Hide
            kamrup Rasmus Pedersen added a comment -

            Realized that the svn authentication depending on the cached of the svn password stored in the user profile.

            Does this mean that the username and password you choose for "Credentials for tagging" has no meaning?

            Show
            kamrup Rasmus Pedersen added a comment - Realized that the svn authentication depending on the cached of the svn password stored in the user profile. Does this mean that the username and password you choose for "Credentials for tagging" has no meaning?
            Hide
            sarahwoodall Sarah Woodall added a comment -

            I've just created a new issue https://issues.jenkins-ci.org/browse/JENKINS-26668, which I think describes what is actually going on. I believe "Tag this build" does not take any notice of the credentials set up in Jenkins. It just uses the credentials that the Subversion client has cached for you.

            Show
            sarahwoodall Sarah Woodall added a comment - I've just created a new issue https://issues.jenkins-ci.org/browse/JENKINS-26668 , which I think describes what is actually going on. I believe "Tag this build" does not take any notice of the credentials set up in Jenkins. It just uses the credentials that the Subversion client has cached for you.
            Show
            recena Manuel Recena Soto added a comment - https://issues.jenkins-ci.org/browse/JENKINS-29225

              People

              Assignee:
              recena Manuel Recena Soto
              Reporter:
              damono Damon Overboe
              Votes:
              8 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: