diff --git a/Jenkinsfile b/Jenkinsfile index 15056c1..352e4e9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -108,17 +108,17 @@ spec: steps { container('tester') { sh ''' - #!/usr/bin/env bash - set -euo pipefail + set -eu apt-get update >/dev/null apt-get install -y --no-install-recommends xz-utils >/dev/null mkdir -p build go install github.com/jstemmer/go-junit-report/v2@latest set +e - go test -coverprofile=build/coverage.out ./... 2>&1 | tee build/test.out - test_rc=${PIPESTATUS[0]} + go test -coverprofile=build/coverage.out ./... > build/test.out 2>&1 + test_rc=$? set -e - /root/go/bin/go-junit-report < build/test.out > "${JUNIT_XML}" + cat build/test.out + "$(go env GOPATH)/bin/go-junit-report" < build/test.out > "${JUNIT_XML}" coverage="0" if [ -f build/coverage.out ]; then coverage="$(go tool cover -func=build/coverage.out | awk '/^total:/ {gsub("%","",$3); print $3}')" @@ -140,8 +140,7 @@ PY steps { container('publisher') { sh ''' - #!/usr/bin/env bash - set -euo pipefail + set -eu python scripts/publish_test_metrics.py ''' } @@ -152,8 +151,7 @@ PY steps { container('builder') { sh ''' - #!/usr/bin/env bash - set -euo pipefail + set -eu mkdir -p /root/.docker cp /docker-config/config.json /root/.docker/config.json ''' @@ -166,8 +164,7 @@ PY container('builder') { script { sh ''' - #!/usr/bin/env bash - set -euo pipefail + set -eu SEMVER="0.1.0-${BUILD_NUMBER}" echo "SEMVER=${SEMVER}" > build.env ''' @@ -183,8 +180,7 @@ PY steps { container('builder') { sh ''' - #!/usr/bin/env bash - set -euo pipefail + set -eu for i in $(seq 1 10); do if docker info >/dev/null 2>&1; then break @@ -201,8 +197,7 @@ PY steps { container('builder') { sh ''' - #!/usr/bin/env bash - set -euo pipefail + set -eu VERSION_TAG="$(cut -d= -f2 build.env)" for arch in amd64 arm64; do docker buildx build \