Home
TeamSite
OD DNR return code
stefanmaier
Hi all,
I need some input on a DNR return code problem:
I have included an exe-binary as DNR-script:
<dnrDeployment location="source" when="before">
<script cmd="c:\myexefile.exe some_parameters..." async="no" />
</dnrDeployment>
The exe file returns number exit codes like
0 (great, everything's fine)
1 (ooops, little error)
2 (aarrrghhh, what are you doin'?!)
OD doesn't react to these exit codes.
If my exe-file returns an 1, OD returns "Status: Completed" anyway.
Some other threads say, that a DNR-script has to write a line like
<response code="0"/>
to STDOUT, so that OD reacts on this line.
Is there a possibility to configure OD, so that standard number exit codes 0,1,2,... are evaluated by OD?
Using OD6.0.1 on Win2003.
Regards,
Stefan
Find more posts tagged with
Comments
Migrateduser
Hi Stefan,
Currently OD only reacts to the -2 response code via the XML snippet piped to standard out. This enables the DNR to trigger a deployment failure.
There's an open Feature Request (# 41736) for supporting multiple return codes from DNRs.
Todd Scallan
Director of Product Management
Interwoven
t: 408-530-7167
e:
tscallan@interwoven.com
Adam Stoller
You'll need a wrapper script that runs your binary - checks the exit status - and if it fails, spits out the appropriate XML
<response code="-2"/>
(with newline at end)
in order to signal to OD that the script failed.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
kgilmore
If your DNR script writes a bunch of miscellaneous data to STDOUT prior to writing <response code="0"/> or <response code="-2"/>
will the success or failure status be recognized by OD? Or do you have do suppress all writing to STDOUT except for the response code line?
Migrateduser
OD currently honours only <response code="-2"/> . Any other codes are ignored. You don't have to suppress all your writing to stdout. OD will try to parse the output for response code line.