Skip to content

Commit

Permalink
[jenkins]: add -e for all bash script (sonic-net#90)
Browse files Browse the repository at this point in the history
ensure the script to fail when any of the step in script fails
  • Loading branch information
lguohan authored Mar 25, 2020
1 parent 3831694 commit e47a8a3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion jenkins/common/dep-build/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pipeline {
stage('Build') {
steps {
sh '''
#!/bin/bash -x
#!/bin/bash -ex
git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --relative-to=. $(cut -d" " -f2 .git))" > .git'
Expand Down
2 changes: 1 addition & 1 deletion jenkins/common/linux-kernel-build-pr/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pipeline {
stage('Build') {
steps {
sh '''
#!/bin/bash -x
#!/bin/bash -ex
export kernel_procure_method=build
make
Expand Down
2 changes: 1 addition & 1 deletion jenkins/common/linux-kernel-build/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pipeline {
stage('Build') {
steps {
sh '''
#!/bin/bash -x
#!/bin/bash -ex
make
'''
Expand Down
4 changes: 1 addition & 3 deletions jenkins/mellanox/sonic-swss-build/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ pipeline {
stage('Build') {
steps {
sh '''
#!/bin/bash -x
set -e
#!/bin/bash -ex
# Make apt-get non-interactive
DEBIAN_FRONTEND=noninteractive
Expand Down
2 changes: 1 addition & 1 deletion scripts/bldenv/sonic-slave/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -x
#!/bin/bash -ex

cd sonic-buildimage

Expand Down

0 comments on commit e47a8a3

Please sign in to comment.