Hero Image

Build, Release, Run - Continuous Integration


Rely upon your CI's features for conditional execution

It is very tempting to have conditional checks inside a shell script, e.g. checking for a specific branch name, and then exiting if those conditions are not met. Instead, check your CI's conditional features to implement those checks, e.g.

Letting the CI decide if a shell script has to be executed, has two advantages:

  1. It makes your shell script more readable as you don't have to deal with checking for branch names.
  2. The shell script will not be executed by the CI. This means that your the conditional task does not appear in the workflow execution. The workflow is better understandable: There is no confusion, why a -maybe critical- script has been executed, even if has technically not been doing anything.