build-setup: Ensure we fail the build when a step fails

Currently the build step can fail inside docker but we don't propogate
that error up, so the Jenkins build will not be marked as failed.

We set the following options:

 set -xeuo pipefail

 - bash trace output (-x)
 - failing when a step fails (-e)
 - failing on undefined variables (-u)
 - failing when a command in a pipe fails (-o pipefail) - the default
 behaviour is to use the exit code of the final command in the pipe.

http://redsymbol.net/articles/unofficial-bash-strict-mode/

Thanks to Daniel Axtens <dja@axtens.net> for the extra suggestions.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Daniel Axtens <dja@axtens.net>
1 file changed
tree: f755f5b5b0323c3e59585d3460720c93ad19bcc3
  1. build-setup.sh
  2. COPYING
  3. initramfs-build.sh
  4. kernel-build-setup.sh
  5. kernel-build.sh
  6. openpower-build-setup.sh
  7. README.md
README.md

Build script for CI jobs in Jenkins.