DevOps Articles

Curated articles, resources, tips and trends from the DevOps World.

Safer bash script for CI pipeline using

5 years ago medium.com
Safer bash script for CI pipeline using

Summary: This is a summary of an article originally published by the source. Read the full original article here →

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.

Made with pure grit © 2024 Jetpack Labs Inc. All rights reserved. www.jetpacklabs.com