Re: Start a build from command line in linux
Pankaj Agarwal <[email protected]>
| Newsgroups | gmane.comp.java.cruise-control.user |
|---|---|
| Message-ID | <[email protected]> |
Dillip/Kapila, I haven't used it but based on my understanding adding following lines to the project definition in config.xml should take care of this. <triggers> <filesystem folder="/tmp/triggerbuild" /> </triggers> to start the build just issue command "touch /tmp/triggerbuild" Let me know if that doesn't work and i'll try it out in my setup and will update you. Cheers, Pankaj --- On Thu, 7/23/09, [email protected] <[email protected]> wrote: From: [email protected] <[email protected]> Subject: Re: [Cruisecontrol-user] Start a build from command line in linux To: [email protected] Date: Thursday, July 23, 2009, 6:26 AM Hi Kapila, You can trigger the BUILD from L/UNIX by writing the script as below. Initial trigger point will be something like a file below having extension cc.sh #! /bin/sh ANT_HOME=/sbcimp/run/pd/jakarta-ant/1.6.2 export ANT_HOME JAVA_HOME=/sbcimp/run/tp/sun/jdk/v1.5.0_07 export JAVA_HOME PATH=$JAVA_HOME/bin:/usr/atria/bin:$PATH export PATH TOMCAT_HOME=/sbclocal/web/run/pkgs/Spyda/CruiseControl/tomcat export TOMCAT_HOME VOB_HOME_SPYDA=/view/spyda_44_build_unix/vobs/LDN_RISK_CV #VOB_HOME_CONTROLS=/view/controls_44_build_unix/vobs/LDN_RISK_CV PARAM="$1" echo "Parameter: $PARAM" if [ "$PARAM" = "Spyda" ] then echo "Executing CruiseControl setup for Spyda" LOG_FILE=$TOMCAT_HOME/webapps/spyda_44_build_unix/cc.log export LOG_FILE echo "<pre-Spyda>" > $LOG_FILE nohup $VOB_HOME_SPYDA/CruiseControl/Spyda/SpydaCruisecontrol.sh >> $LOG_FILE 2>&1 & else if [ "$PARAM" = "Controls" ] then echo "Executing CruiseControl setup for Controls" LOG_FILE=$TOMCAT_HOME/webapps/controls_44_build_unix/cc.log export LOG_FILE echo "<pre-Controls>" > $LOG_FILE nohup $VOB_HOME_SPYDA/CruiseControl/Controls/ControlsCruisecontrol.sh >> $LOG_FILE 2>&1 & else echo "Invalid parameter. Parameter should be Spyda or Controls" fi fi # TODO - fix this so that tomcat starts in secure mode! $TOMCAT_HOME/bin/tomcat_spyda.sh start-unsecure # finished $VOB_HOME_SPYDA/CruiseControl/Controls/ControlsCruisecontrol.sh will be like to similar below which will call config.xml file VOB_HOME=/view/spyda_44_build_unix/vobs/LDN_RISK_CV LIBDIR=/sbcimp/run/pd/cruisecontrol/2.2.1/main/lib DISTDIR=$VOB_HOME/CruiseControl/lib CRUISE_PATH=$JAVA_HOME/lib/tools.jar CRUISE_PATH=$CRUISE_PATH:$DISTDIR/cruisecontrol.jar CRUISE_PATH=$CRUISE_PATH:$DISTDIR/irc.jar CRUISE_PATH=$CRUISE_PATH:$DISTDIR/mdk-1.4.jar CRUISE_PATH=$CRUISE_PATH:$DISTDIR/commons-httpclient-3.0-rc3.jar CRUISE_PATH=$CRUISE_PATH:$DISTDIR/MindAlignAdapter.jar CRUISE_PATH=$CRUISE_PATH:$LIBDIR/log4j.jar CRUISE_PATH=$CRUISE_PATH:$LIBDIR/jdom.jar CRUISE_PATH=$CRUISE_PATH:$LIBDIR/ant/ant.jar CRUISE_PATH=$CRUISE_PATH:$LIBDIR/ant/ant-launcher.jar CRUISE_PATH=$CRUISE_PATH:$LIBDIR/xerces.jar CRUISE_PATH=$CRUISE_PATH:$LIBDIR/xalan.jar CRUISE_PATH=$CRUISE_PATH:$LIBDIR/jakarta-oro-2.0.3.jar CRUISE_PATH=$CRUISE_PATH:$LIBDIR/mail.jar CRUISE_PATH=$CRUISE_PATH:$LIBDIR/junit.jar CRUISE_PATH=$CRUISE_PATH:$LIBDIR/activation.jar CRUISE_PATH=$CRUISE_PATH:$LIBDIR/commons-net-1.1.0.jar CRUISE_PATH=$CRUISE_PATH:$LIBDIR/mx4j.jar CRUISE_PATH=$CRUISE_PATH:$LIBDIR/mx4j-tools.jar CRUISE_PATH=$CRUISE_PATH:$LIBDIR/mx4j-remote.jar CRUISE_PATH=$CRUISE_PATH:$LIBDIR/smack.jar CRUISE_PATH=$CRUISE_PATH:. EXEC="java -cp $CRUISE_PATH -Djavax.management.builder.initial=mx4j.server.MX4JMBeanServerBuilder CruiseControl $@ -configfile $VOB_HOME/CruiseControl/Controls/config.xml -Xms1024m -Xmx2058m -XX:+UseParallelGC -XX:+AggressiveHeap " echo $EXEC $EXEC Regards, Dillip -----Inline Attachment Follows----- Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS Limited is a company registered in England & Wales under company number 2035362, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS AG (London Branch) is registered as a branch of a foreign company under number BR004507, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS Clearing and Execution Services Limited is a company registered in England & Wales under company number 03123037, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS reserves the right to retain all messages. Messages are protected and accessed only in legally justified cases. -----Inline Attachment Follows----- ------------------------------------------------------------------------------ -----Inline Attachment Follows----- _______________________________________________ Cruisecontrol-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user ------------------------------------------------------------------------------ _______________________________________________ Cruisecontrol-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user