ci(bstein-home): use mounted harbor auth config

This commit is contained in:
codex 2026-04-20 13:09:28 -03:00
parent 26231b7465
commit ce5d73c514

32
Jenkinsfile vendored
View File

@ -175,23 +175,21 @@ PY
stage('Prep toolchain') { stage('Prep toolchain') {
steps { steps {
container('builder') { container('builder') {
withCredentials([usernamePassword(credentialsId: 'harbor-robot', usernameVariable: 'HARBOR_USERNAME', passwordVariable: 'HARBOR_PASSWORD')]) { sh '''
sh ''' set -euo pipefail
set -euo pipefail for attempt in 1 2 3 4 5; do
for attempt in 1 2 3 4 5; do if apk add --no-cache bash git jq curl; then
if apk add --no-cache bash git jq curl; then break
break fi
fi if [ "$attempt" -eq 5 ]; then
if [ "$attempt" -eq 5 ]; then echo "apk add failed after ${attempt} attempts" >&2
echo "apk add failed after ${attempt} attempts" >&2 exit 1
exit 1 fi
fi sleep $((attempt * 2))
sleep $((attempt * 2)) done
done mkdir -p /root/.docker
mkdir -p /root/.docker cp /docker-config/config.json /root/.docker/config.json
printf '%s' "${HARBOR_PASSWORD}" | docker login registry.bstein.dev -u "${HARBOR_USERNAME}" --password-stdin '''
'''
}
} }
} }
} }