ci(jenkins): keep shell flags POSIX compatible

This commit is contained in:
Brad Stein 2026-04-18 17:29:50 -03:00
parent f606c0543c
commit c0d83a1e5e

20
Jenkinsfile vendored
View File

@ -102,7 +102,7 @@ spec:
container('builder') {
withCredentials([usernamePassword(credentialsId: 'harbor-robot', usernameVariable: 'HARBOR_USERNAME', passwordVariable: 'HARBOR_PASSWORD')]) {
sh '''
set -euo pipefail
set -eu
for attempt in 1 2 3 4 5; do
if apk add --no-cache bash git jq curl; then
break
@ -126,7 +126,7 @@ spec:
container('builder') {
script {
sh '''
set -euo pipefail
set -eu
if git describe --tags --exact-match >/dev/null 2>&1; then
SEMVER="$(git describe --tags --exact-match)"
else
@ -151,7 +151,7 @@ spec:
steps {
container('builder') {
sh '''
set -euo pipefail
set -eu
ready=0
for i in $(seq 1 10); do
if docker info >/dev/null 2>&1; then
@ -180,7 +180,7 @@ spec:
steps {
container('tester') {
sh '''
set -euo pipefail
set -eu
mkdir -p build
export PYTHONPATH="${WORKSPACE}/backend:${PYTHONPATH:-}"
python -m pip install --no-cache-dir -r backend/requirements.txt -r backend/requirements-dev.txt
@ -194,7 +194,7 @@ spec:
steps {
container('frontend') {
sh '''
set -euo pipefail
set -eu
mkdir -p build
cd frontend
npm ci
@ -211,7 +211,7 @@ spec:
steps {
container('tester') {
sh '''
set -euo pipefail
set -eu
export PYTHONPATH="${WORKSPACE}:${PYTHONPATH:-}"
python -m testing.ci.quality_gate \
--backend-coverage build/backend-coverage.xml \
@ -226,7 +226,7 @@ spec:
steps {
container('builder') {
sh '''
set -euo pipefail
set -eu
VERSION_TAG="$(cut -d= -f2 build.env)"
docker buildx build \
--platform linux/arm64 \
@ -244,7 +244,7 @@ spec:
steps {
container('builder') {
sh '''
set -euo pipefail
set -eu
VERSION_TAG="$(cut -d= -f2 build.env)"
docker buildx build \
--platform linux/arm64 \
@ -263,7 +263,7 @@ spec:
success {
container('tester') {
sh '''
set -euo pipefail
set -eu
python -m testing.ci.publish_metrics \
--gateway "${PUSHGATEWAY_URL}" \
--suite "${SUITE_NAME}" \
@ -276,7 +276,7 @@ spec:
failure {
container('tester') {
sh '''
set -euo pipefail
set -eu
python -m testing.ci.publish_metrics \
--gateway "${PUSHGATEWAY_URL}" \
--suite "${SUITE_NAME}" \