set -euxo pipefailwhy? because CI pipeline is marked as success even script failed and so on. Explaining `set -euxo pipefail` command in simple words: -e = to exit immediately when a command -u = to treat unset variables as an error and exit immediately -x = to print each command(s) before executing it {can be handy for debugging a bash script} -o = write the current settings of the options to standard output in a unspecified format

Hope this simple explanation for bash script can be helpful for running pipeline. Best practice for safe and traceable bash script in pipeline.

Related Articles