ci: store podman-login results in ~/.podman-auth.json

It seems that "podman pull" does not consume the authentication details
from ~/.docker/config.json, so store the results of "podman login" in
~/.podman-auth.json and use the file for all "podman pull" commands.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-11-17 13:52:32 +01:00 committed by mergify[bot]
parent 6b4dffbd79
commit e9523b3ace

View File

@ -102,13 +102,13 @@ node('cico-workspace') {
).trim()
withCredentials([usernamePassword(credentialsId: 'container-registry-auth', usernameVariable: 'CREDS_USER', passwordVariable: 'CREDS_PASSWD')]) {
ssh "podman login --authfile=~/.docker/config.json --username=${CREDS_USER} --password='${CREDS_PASSWD}' ${ci_registry}"
ssh "podman login --authfile=~/.podman-auth.json --username=${CREDS_USER} --password='${CREDS_PASSWD}' ${ci_registry}"
}
// base_image is like ceph/ceph:v15
ssh "podman pull ${ci_registry}/${base_image} && podman tag ${ci_registry}/${base_image} ${base_image}"
ssh "podman pull --authfile=~/.podman-auth.json ${ci_registry}/${base_image} && podman tag ${ci_registry}/${base_image} ${base_image}"
// cephcsi:devel is used with 'make containerized-build'
ssh "podman pull ${ci_registry}/cephcsi:devel"
ssh "podman pull --authfile=~/.podman-auth.json ${ci_registry}/cephcsi:devel"
}
stage('build artifacts') {
// build container image