Note that there are some explanatory texts on larger screens.

plurals
  1. POHudson: how do i use a parameterized build to do svn checkout and svn tag?
    text
    copied!<p>I'm setting up a parameterized build in hudson v1.362. the parameter i'm creting is used to determine which branch to checkout in subversion. </p> <p>I can set my svn repository url like this: <code><a href="https://my.svn.server/branches/" rel="nofollow noreferrer">https://my.svn.server/branches/</a>${branch}</code> and it does the checkout and the build just fine.</p> <p>now I want to tag the build after it finishes. i'm using the SVN tagging plugin for hudson to do this. so i go to the bottom of the project config screen for the hudson project and turn on "Perform Subversion tagging on successful build".</p> <p>here, i set my Tag Base URL to <code><a href="https://my.svn.server/tags/" rel="nofollow noreferrer">https://my.svn.server/tags/</a>${branch}-${BUILD_NUMBER}</code> and it gives me errors about those properties not being found. so i change them to environment variable usages like this: <code><a href="https://my.svn.server/tags/" rel="nofollow noreferrer">https://my.svn.server/tags/</a>${env['branch']}-${env['BUILD_NUMBER']}</code> and the svn tagging plugin is happy.</p> <p>the problem now is that my svn repository at the top is using the <code>${branch}</code> syntax and the svn tagging plugin barfs on this: </p> <pre><code>moduleLocation: Remote ->https://my.svn.server/branches/$branch/ Tag Base URL: 'https://my.svn.server/tags/thebranchiused-1234'. There was no old tag at https://my.svn.server/tags/thebranchiused-1234. ERROR: Publisher hudson.plugins.svn_tag.SvnTagPublisher aborted due to exception java.lang.NullPointerException at hudson.plugins.svn_tag.SvnTagPlugin.perform(SvnTagPlugin.java:180) at hudson.plugins.svn_tag.SvnTagPublisher.perform(SvnTagPublisher.java:79) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:558) at hudson.model.Build$RunnerImpl.cleanUp(Build.java:167) at hudson.model.Run.run(Run.java:1295) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:124) Finished: FAILURE </code></pre> <p>notice the first line, there: the svn tag is looking at ${branch} as part of the repository url... it's not parsing out the property value. </p> <p>i tried to change my original Repository URL for svn to use the <code>${env['branch']}</code> syntax, but that blows up on the original checkout because this syntax is not getting parsed at all by the checkout.</p> <p>help?!</p> <p>how do i use a parameterized build to set the svn url for checkout and for tagging my build?!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload