问题
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>
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.
Don't know if this helps, but in the top of my ANT-script i declare this property with
<property name="svndiff" value=""/>
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.
回答1:
As it seems there is no solution for my problem, so i built a workarounded for it.
I put the output of my ruby script into a file, and send the file via email (as attachment) to a recipient list.
来源:https://stackoverflow.com/questions/18126797/using-ant-properties-in-jenkins-build-job