在詹金斯使用Ant属性建工作 [英] Using ANT properties in Jenkins build job
问题描述
我试图 EXEC
从我的ANT任务的脚本。这个脚本做一些SVN-东西,然后应该设置outputproperty 将svndiff
:
I'm trying to exec
a script from my ANT-task. This script does some svn-stuff and should then set the outputproperty svndiff
:
<target name="svn-diff">
<exec executable="/usr/local/rbenv/shims/ruby" outputproperty="svndiff">
<arg line="${source.dir}/changeparse.rb" />
</exec>
</target>
我想用这个将svndiff
属性通过电子邮件发送它在詹金斯生成后步到某些收件人,但我似乎不能在詹金斯使用它。该邮件我收到从这个只有 $程序svndiff
的内容。
I want to use this svndiff
property to send it via email in a jenkins post-build-step to some recipients, but i cannot seem to use it in Jenkins. The mails i receive from this only have $svndiff
as content.
不知道这是否会有所帮助,但在我的ANT脚本的顶部,我宣布这个属性与
Don't know if this helps, but in the top of my ANT-script i declare this property with
<property name="svndiff" value=""/>
另一种方法我所做的修改詹金斯的环境变量数组,宣称我的财产 env.svndiff
和设置EXEC目标respectivly的outputproperty但是这没' ŧ帮助的。
Another approach i did was to modify Jenkins' environment variable array, by declaring my property as env.svndiff
and setting the outputproperty of the exec target respectivly but this didn't help either.
推荐答案
由于它似乎还有我的问题没有解决,所以我建立了一个workarounded吧。
As it seems there is no solution for my problem, so i built a workarounded for it.
我把我的Ruby脚本输出到一个文件中,并通过电子邮件发送的文件(如附件)到收件人列表。
I put the output of my ruby script into a file, and send the file via email (as attachment) to a recipient list.
这篇关于在詹金斯使用Ant属性建工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!