ci: use Jenkins harbor credential for image push auth
This commit is contained in:
parent
a80d46606e
commit
00e6208d97
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@ -93,6 +93,7 @@ spec:
|
||||
stage('Prep toolchain') {
|
||||
steps {
|
||||
container('builder') {
|
||||
withCredentials([usernamePassword(credentialsId: 'harbor-robot', usernameVariable: 'HARBOR_USERNAME', passwordVariable: 'HARBOR_PASSWORD')]) {
|
||||
sh '''
|
||||
set -euo pipefail
|
||||
for attempt in 1 2 3 4 5; do
|
||||
@ -106,11 +107,12 @@ spec:
|
||||
sleep $((attempt * 2))
|
||||
done
|
||||
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
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Compute version') {
|
||||
steps {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user