cmd - Can I make Atlassian Bamboo to accept a different return code than 0 as success -


i have issue exciting task type command return different exit codes meaning success , while atlassian bamboo see 0 success , else failed.

i'm trying execute robocopy command 0 , 1 , 2 meaning (or in casses 4) nothing success notes. see doc: http://ss64.com/nt/robocopy-exit.html

my example here, tht have task of type command execute robocopy following argument:

. c:\inetpub\civebuildcentral\ui\. /is /s /xd node_modules 

how can make accept codes rather 0 ?

i found easy simple solution :

i replaced task new task of type script , kept script location inline , in script body did write following simple codes :

robocopy . c:\inetpub\civebuildcentral\ui\. /is /s /xd node_modules  if %errorlevel% leq 4 exit /b 0 

in case if exit code less or equal 4 force script make return 0 success.

you can make more code handle exit codes rem messages , them make return 0 or 1 .

edit: if using linux: handle error codes example if condition like:

if [$? le 4]          exit 0 fi 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -