简体   繁体   中英

Jenkins SVN Tag Post-Build Action not successful

I am trying to create tags for every successful build. My repository is on SVN (on AIX Server) I am trying to create a Tags for Build 1, Build 2, Build 3, etc in the following repository link http://sourcecode.xyz.com/ABC/tags

Post-Build Tag Base URL http://sourcecode.xyz.com/ABC/tags

Error after Successful Build is as follows

BUILD SUCCESSFUL
Total time: 47 seconds
No emails were triggered.
Starting to tag
ERROR: Publisher hudson.plugins.svn_tag.SvnTagPublisher aborted due to exception
java.lang.NoSuchMethodError: hudson.scm.SubversionSCM.getRevisionFile(Lhudson/model/AbstractBuild;)Ljava/io/File;
    at hudson.plugins.svn_tag.SvnTagPlugin.parseRevisionFile(SvnTagPlugin.java:242)
    at hudson.plugins.svn_tag.SvnTagPlugin.perform(SvnTagPlugin.java:97)
    at hudson.plugins.svn_tag.SvnTagPublisher.perform(SvnTagPublisher.java:79)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
    at hudson.model.Build$BuildExecution.cleanUp(Build.java:192)
    at hudson.model.Run.execute(Run.java:1805)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:89)
    at hudson.model.Executor.run(Executor.java:240)
Finished: SUCCESS

This issue is due to mismatch of subversion dependency with svn-tag plugin. The latest SVN-tag plugin version 1.18 is dependent on 2.2 version of Subversion plugin instead of 2.5 version.

Following steps resolved the issue for me:

  1. Downgrade the version of Subversion plugin to 2.2 version http://updates.jenkins-ci.org/download/plugins/subversion/ .
  2. Checkout SVN Tag plugin source code and edit pom.xml to to use 2.2 version of Subversion plugin instead of 2.5 .
  3. Rebuild the SVN tag source code using mvn clean install command .
  4. Place the generated svn-tag.hpi file to $JENKINS_HOME/plugins folder
  5. Restart the Jenkins instance .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM