Using ANT properties in Jenkins build job

℡╲_俬逩灬. 提交于 2019-12-12 03:12:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!