CruiseControl doesnt catch deployment errors

New Name's picture
New Name asked on March 21, 2013 - 10:51am | Replies (1).

Hello All, 

We call deploy scripts(cmd files) through our own make xml files from cruisecontrol. In the deploy CMD files there is error level return explicitly mentioned. But still cruise control does not catch the errors. Logs show it as failed but reports sucessfull. Below is how we call deploy scripts. 

1. from cruisecontrol config.xml we call our own xml file like below

<schedule  >

 <ant anthome="C:\bea103\modules\org.apache.ant_1.6.5" 

buildfile="V:\xxx\xxx\xxxx\mybuild.xml"

time="0330"

/>        

</schedule>

2. and that mybuild.xml content is as below 

<target name="xxxx">

       <exec dir="V:\xxx\xxx\xxx" executable="cmd.exe" output="checkETSApps.txt">

    <arg line="/c deploy.cmd"/>

  </exec>

</target>

3. and deploy.cmd content is as below 

call deploybackend.cmd(this telnets with servers)

IF ERRORLEVEL 1 EXIT /B 1

What are we missing here. Please advise. 

 

1 Answer

Bob Aiello's picture

Hi,

 

could you please specify which platform you are on. It looks like you are using CMD files so I presume that you are on Windows using CMD scripts. It may be relevent to mention the exact version of the OS that you are using.

Does your approach of catching return codes

IF ERRORLEVEL 1 EXIT /B 1

work in other scripts?

I would write a little example and verify that catching the ERRORLEVEL on your machine works as expected.

If we can get a little more detail, I will tweet this question out and get more of our esteemed CM gurus to comment!

 

Bob Aiello
Technical Editor
CM Crossroads

CMCrossroads is a TechWell community.

Through conferences, training, consulting, and online resources, TechWell helps you develop and deliver great software every day.