Hello all,

 

Into one job I have the following script shell build step :

 

 

git status > /tmp/git.status

 

grep " webapp/res/description.xml " /tmp/git.status >/dev/null

returncode=$?

 

if [ "$returncode" -eq "0" ]; then

  git add -- webapp/res/description.xml

  git commit --verbose -F webapp/res/description.xml

  echo "description.xml modification added and committed"

else

  echo "No commit found for description.xml"

fi

 

But when I run the job, if git.status file doesn’t have "
webapp/res/description.xml " string in the file, my job fail and doesn’t
enter in the else statement (I think, because echo "No commit found for
description.xml" wasn’t display in Jenkins console)

 

Below log of job:

 

[Release-Job] $ /bin/sh -xe /tmp/hudson7451866342547575378.sh

+ git status

+ grep webapp/res/description.xml /tmp/git.status

Build step 'Exécuter un script shell' marked build as failure

Finished: FAILURE

 

 

 

Do you have an idea, how I can avoid this failure and continu other build
step and enter into else statement ?

 

Great thank and best regards.

 

Adrien Ruffié

 

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to