Checkout from repository based on a dynamic tag i.e) parameterized checkout

Hanif R February 7, 2012

Hi I have a project A and a project B ('project' as in normal sense of the word - not a bamboo project per se). Project B depends on project A's libraries and source. So I have setup a plan with 2 jobs that run in stages. Job 1 checks out project A, builds it, creates a jar artifact and makes its libraries and the jar available as shared artifacts. Job 2 checks out project B, builds it, consumes the artifacts of job 1. Now, project B contains a manifest file which describes which cvs tag version of project A it requires. As such, I've setup the following ant property in project B's build file:
<project name="projectB" basedir=".">
......
<loadproperties srcfile="/META-INF/MANIFEST.MF" />
<property name="CVS-Required-ProjectA-Version" value="${Required-ProjectA-Version}"/>
......
</project>

And under job 1's source repository tab, under the Branch/Tag Name field, I've put: ${bamboo.CVS-Required-ProjectA-Version}. The build fails miserably and a popup comes up telling me that I'm a dumb dumb in bold caps with several ensuing exclamation marks. I didn't think it would work as I figured Bamboo wouldn't know where or how to resolve 'CVS-Required-ProjectA-Version' but I couldn't find any real docs or help. Any help suggestions would be greatly appreciated!

1 answer

0 votes
Hanif R February 7, 2012

Please Note that job 1 is using the build file from project A and job 2 is using the build file from project B. The cvs tag is defined in project B's build file but the checkout for project A is defined in the source repository section of job 1 for project A. (Hope that makes sense!) So I need for that ant property to be read within job 1 - or some other solution that makes sense.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events