哈德森:我如何使用参数化的构建做svn签和svn标记? [英] Hudson: how do i use a parameterized build to do svn checkout and svn tag?
问题描述
我设立在哈德森v1.362参数化建设。我正在creting该参数用于确定颠覆签哪个分支。
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.
我可以将我的SVN仓库URL是这样的: HTTPS://my.svn.server/branches/$ {分支}
和它的结账和构建就好了。
I can set my svn repository url like this: https://my.svn.server/branches/${branch}
and it does the checkout and the build just fine.
现在我希望它结束后标记构建。我使用SVN标记插件哈德森做到这一点。所以我去的项目配置屏幕哈德逊项目的底部,打开关于成功的构建进行颠覆标记。
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".
在这里,我在我的标签基本URL设置为 HTTPS://my.svn.server/tags/$ {分支} - $ {BUILD_NUMBER}
,这让我被发现没有关于这些属性的错误。所以我改变他们的环境变量的用法是这样的: HTTPS://my.svn.server/tags/$ {ENV ['分支']} - $ {ENV ['BUILD_NUMBER']}
和SVN标记插件是幸福的。
here, i set my Tag Base URL to https://my.svn.server/tags/${branch}-${BUILD_NUMBER}
and it gives me errors about those properties not being found. so i change them to environment variable usages like this: https://my.svn.server/tags/${env['branch']}-${env['BUILD_NUMBER']}
and the svn tagging plugin is happy.
现在的问题是,在我的上方svn库使用 $ {分支}
语法和SVN标记这个插件barfs:
the problem now is that my svn repository at the top is using the ${branch}
syntax and the svn tagging plugin barfs on this:
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
注意到的第一线,有:使用svn标签望着$ {}分行作为仓库URL的一部分......这不是解析出的属性值。
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.
我试图改变我原来的库网址为SVN使用 $ {ENV ['分支']}
语法,但对原结帐因为如此,炸毁语法没有得到根本的检出解析。
i tried to change my original Repository URL for svn to use the ${env['branch']}
syntax, but that blows up on the original checkout because this syntax is not getting parsed at all by the checkout.
帮助?!
我如何使用参数化的构建来设置结帐和标记我构建了svn网址是什么?!
how do i use a parameterized build to set the svn url for checkout and for tagging my build?!
推荐答案
我们不使用标记插件,但我们确实在我们的shell脚本中使用SVN.EXE这样的:
We don't use the tagging plugin, but we do use SVN.EXE in our shell script like this:
SVN CP%的工作区%\\行李箱@
HTTP:// MYSERVER /发行/%BUILD_NUMBER%/后备箱
-m(把这里记录文本)--parents
svn cp %workspace%\trunk@ http://myserver/release/%build_number%/trunk -m "(put log text here)" --parents
也许类似的东西会为你工作了。
Perhaps something similar will work for you too.
这篇关于哈德森:我如何使用参数化的构建做svn签和svn标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!