Closed 0xmichalis closed 7 years ago
Also, in the same job, a non-zero exit code of a command does not result in failing the stage:
Checking out files: 99% (18738/18927)
Checking out files: 100% (18927/18927)
Checking out files: 100% (18927/18927), done.
mv: cannot move ‘origin’ to a subdirectory of itself, ‘origin/origin’
/data/src/github.com/openshift/origin /data/src/github.com/openshift ~
Branch fix-negative-unavailable-replicas set up to track remote branch fix-negative-unavailable-replicas from origin.
Switched to a new branch 'fix-negative-unavailable-replicas'
+ set +o xtrace
########## FINISHED STAGE: SUCCESS: PREPARE REPOSITORIES ##########
Re: the first thing -- not super interested in making that work as it's bad practice anyway. I understand it will make porting the fork_ami
stuff harder, but I think that is OK.
Re: the second thing -- do you have a reproducer?
@stevekuznetsov what is the suggested way to execute stages that shouldn't fail the job once they fail because we don't really care, eg. a Trello comment? Should we support the intent in the sjb syntax?
Re: the second thing -- do you have a reproducer?
I just realized that the error was hit inside the command I run over ssh.
what is the suggested way to execute stages that shouldn't fail the job once they fail because we don't really care, eg. a Trello comment? Should we support the intent in the sjb syntax?
Make the Bash not fail -- for example:
if ! trello_comment ...; then
echo "Oh well"
fi
See also man trap
:
trap [-lp] [[arg] sigspec ...]
If a sigspec is ERR, the command arg is executed whenever a a pipeline (which may consist of a single simple command), a list, or
a compound command returns a non-zero exit status, subject to the following conditions. The ERR trap is not executed if the
failed command is part of the command list immediately following a while or until keyword, part of the test in an if statement,
part of a command executed in a && or || list except the command following the final && or ||, any command in a pipeline but the
last, or if the command's return value is being inverted using !. These are the same conditions obeyed by the errexit (-e)
option.
Looks like you were using an old base for your branch, problem should be fixed with 78a0e9c24767d5acf0c5519edc260c5baf5ef2e4 and https://github.com/openshift/aos-cd-jobs/commit/b1d17d59c5b68006fc31c93743d5e532c28ad920
Looks like you were using an old base for your branch, problem should be fixed with 78a0e9c and openshift/aos-cd-jobs@b1d17d5
Unlike, my fork is just lacking the last 2 days of commits. https://github.com/kargakis/aos-cd-jobs/commits/master
Sorry, I misread your output -- it was an SSH session you started, not one SJB did. Closing this as it's a user error and not from the framework.
https://ci.openshift.redhat.com/jenkins/view/All/job/ami_build_origin_int_rhel_fork/16/consoleFull#-206914687858b6e51eb7608a5981914356
cc: @stevekuznetsov