I have a CruiseControl project that executes a file build.py
, whether it is nightly or CI. I would like to throw up some kind of flag in my build script that can determine which function to call, so I don't have to have two .py
files that do essentially the same thing.
Is it possible to pass in variables or parameters through CruiseControl when executing a .py
file?
<project name="x" default="build">
<target name="build-ci">
<exec executable="python" failonerror="true">
<arg value="build-cc.py" />
<arg value="$(label)" />
</exec>
</target>
<project name="x-nightly" default="build">
<target name="build-nightly">
<exec executable="python" failonerror="true">
<arg value="build-cc.py" />
<arg value="$(label)" />
</exec>
</target>
</project>