pipelinetravis-citravis-ci-cli

Fast_finish option to finish execution of scripts in Travis


I’m traying to finish the execution of the remaining scripts in a Travis pipeline as soon as one of them fails in any stage. So that if any of those scripts fails in the stage, no more scripts are executed and the remaining jobs in the stage are ignored…

I included fast_finish under jobs but I’m not sure if this option will finish the stage execution if any of the scripts fails.

jobs:
  include:
    - fast_finish: true

I have some bash scripts in some the pipeline stages like this one:

- stage: test
      before_script:
        # do_something      
      script:
         - ./first_script
         - ./second_script
         - ./third_script

To test if that’s working I simulated an error with travis_terminate 1 in the middle of the scripts above. It basically finish its execution but I’m pritty sure that I’m not simulating an error propertly.

Any idea if I’m using correctly fast_finish and how to simulate an error with any travis command?


Solution

  • The solution was just add the fast_finish: true option under jobs:

    jobs:
      include:
        - fast_finish: true