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

svn-tag-plugin does not expand module locations that include parameter references

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The svn-tag-plugin fails creating tags for module locations that have parameter references in their path,

      e.g. svn://${base-url}/${branch}/${component}@${revision}

      will fail since the svn-tag-plugin uses scm.getLocations() instead of passing in the AbstractBuild instance
      so that module locations will be expanded correctly.

      A provable patch would be to (@current master) apply the following change to SvnTagPlugin.java

      99 SubversionSCM.ModuleLocation[] moduleLocations = scm.getLocations();

      to

      99 SubversionSCM.ModuleLocation[] moduleLocations = scm.getLocations(abstractBuild);

        Attachments

        1. patch
          0.8 kB
        2. patch.diff
          14 kB

          Activity

          Hide
          cklein Carsten Klein added a comment -

          See the attached patch for a working solution.

          Show
          cklein Carsten Klein added a comment - See the attached patch for a working solution.
          Hide
          cklein Carsten Klein added a comment -

          The working solution was more involved as it showed that when applying the above patch,
          a null pointer exception would occur later when it tried to resolve individual revisions
          recorded for a given module location.

          See the attached second patch.diff that addresses this problem, along with also the problem
          of svn-tag-plugin in its original version being unable to properly URI Encode the
          tag base url, leading to exceptions whenever the user enters a Url containing whitespace.

          The only drawback is, that with the patch applied, the svn-tag-plugin requires jenkins
          1.420.

          Show
          cklein Carsten Klein added a comment - The working solution was more involved as it showed that when applying the above patch, a null pointer exception would occur later when it tried to resolve individual revisions recorded for a given module location. See the attached second patch.diff that addresses this problem, along with also the problem of svn-tag-plugin in its original version being unable to properly URI Encode the tag base url, leading to exceptions whenever the user enters a Url containing whitespace. The only drawback is, that with the patch applied, the svn-tag-plugin requires jenkins 1.420.
          Hide
          k2nakamura k2nakamura added a comment -

          Thank you for sending the patch. I'm travelling now and will apply the patch and release sometime in next week.

          Show
          k2nakamura k2nakamura added a comment - Thank you for sending the patch. I'm travelling now and will apply the patch and release sometime in next week.
          Hide
          cklein Carsten Klein added a comment -

          I published the fix + some refactoring + localization on github.
          There is now a pull request open on the svn-tag-plugin repository.

          Show
          cklein Carsten Klein added a comment - I published the fix + some refactoring + localization on github. There is now a pull request open on the svn-tag-plugin repository.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: cklein
          Path:
          .classpath
          .settings/org.eclipse.jdt.core.prefs
          pom.xml
          src/main/java/hudson/plugins/svn_tag/SvnTagPlugin.java
          src/main/resources/hudson/plugins/svn_tag/Messages.properties
          src/main/resources/hudson/plugins/svn_tag/Messages_de.properties
          http://jenkins-ci.org/commit/svn-tag-plugin/86b78266641a25b88bd1634f338facbfbed3b91b
          Log:
          JENKINS-10325: fixing issue

          • made more strings localizable,
          • added german localization
          • now requires Jenkins 1.420+

          Signed-off-by: cklein <carsten.klein@axn-software.de>

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: cklein Path: .classpath .settings/org.eclipse.jdt.core.prefs pom.xml src/main/java/hudson/plugins/svn_tag/SvnTagPlugin.java src/main/resources/hudson/plugins/svn_tag/Messages.properties src/main/resources/hudson/plugins/svn_tag/Messages_de.properties http://jenkins-ci.org/commit/svn-tag-plugin/86b78266641a25b88bd1634f338facbfbed3b91b Log: JENKINS-10325 : fixing issue made more strings localizable, added german localization now requires Jenkins 1.420+ Signed-off-by: cklein <carsten.klein@axn-software.de>
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kenji Nakamura
          Path:
          .gitignore
          pom.xml
          http://jenkins-ci.org/commit/svn-tag-plugin/1b371de654fa148a19ef100a881b81dd27b88cf7
          Log:
          incorporated the patch for JENKINS-10325

          Compare: https://github.com/jenkinsci/svn-tag-plugin/compare/8fdffa9...1b371de

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kenji Nakamura Path: .gitignore pom.xml http://jenkins-ci.org/commit/svn-tag-plugin/1b371de654fa148a19ef100a881b81dd27b88cf7 Log: incorporated the patch for JENKINS-10325 Compare: https://github.com/jenkinsci/svn-tag-plugin/compare/8fdffa9...1b371de
          Hide
          k2nakamura k2nakamura added a comment -

          released in 1.16.

          Show
          k2nakamura k2nakamura added a comment - released in 1.16.

            People

            • Assignee:
              k2nakamura k2nakamura
              Reporter:
              cklein Carsten Klein
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: