Giter Club home page Giter Club logo

Comments (7)

0xmichalis avatar 0xmichalis commented on July 28, 2024

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 ##########

from aos-cd-jobs.

stevekuznetsov avatar stevekuznetsov commented on July 28, 2024

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?

from aos-cd-jobs.

0xmichalis avatar 0xmichalis commented on July 28, 2024

@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.

from aos-cd-jobs.

stevekuznetsov avatar stevekuznetsov commented on July 28, 2024

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.

from aos-cd-jobs.

stevekuznetsov avatar stevekuznetsov commented on July 28, 2024

Looks like you were using an old base for your branch, problem should be fixed with 78a0e9c and b1d17d5

from aos-cd-jobs.

0xmichalis avatar 0xmichalis commented on July 28, 2024

Looks like you were using an old base for your branch, problem should be fixed with 78a0e9c and b1d17d5

Unlike, my fork is just lacking the last 2 days of commits. https://github.com/kargakis/aos-cd-jobs/commits/master

from aos-cd-jobs.

stevekuznetsov avatar stevekuznetsov commented on July 28, 2024

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.

from aos-cd-jobs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.