how to create build chain with jbe and maven
Hi,
it's possible to configure a chained build process using JBE and Maven? i.e: after running build definition A, starts build definition B immediately. if possible, what is the best option? configurin pom.xml? shell script (scm cli) ? tks |
4 answers
I think your best option would be to drive build A with a command line build def. Assuming that the call to Maven within the build A script was successful you could then use the build toolkit to request build B from the build A script.
|
Jeff,
could you provide more detailed information about this approach? |
You can use the requestTeamBuild Ant task to submit the downstream build request, optionally overriding build properties. See the 2nd entry in the Build FAQ for pointers on the Ant tasks:
https://jazz.net/wiki/bin/view/Main/BuildFAQ
I've had difficulty in the past getting Maven to play well with Ant, especially when you need to bring in other libraries of tasks (like the RTC Build toolkit). In the end I found it simpler to use the Maven-Ant plugin to launch an external ant, giving the necessary -f <path to build file> and -lib <build toolkit path> command line args, rather than trying to run the Ant script directly as a configuration in the Maven pom.
|
You're trying to choreograph two related builds, right?
Use a command-line build definition to drive build A. We use Bash scripts in my project but you could use perl, python, whatever. From within that script, call out to Maven to build project A. Once Maven is done, inspect the return code. Did Maven complete without errors? If so use the Ant-based build toolkit (check the infocenter for details) to request a build of build B. Build A then ends. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.