mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
ci: pull BASE_IMAGE from local registry
The CI scripts pull all container images from the local CI registry. If the image name starts with "docker.io/", the images will be pushed into the test environment as "docker.io/docker.io/ceph/ceph:v15". This image will not be used by the tests, so things can still fail in case Docker Hub has reached the pull rate-limit. By dropping the additional "docker.io/" from the BASE_IMAGE name, the image gets pushed as "docker.io/ceph/ceph:v15" so the tests will use it automatically. Groovy-syntax: https://www.baeldung.com/groovy-remove-string-prefix#using-regex Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
7cac1f7609
commit
a26772188a
@ -131,9 +131,10 @@ node('cico-workspace') {
|
||||
script: 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} \'source /opt/build/go/src/github.com/ceph/ceph-csi/build.env && echo ${BASE_IMAGE}\'',
|
||||
returnStdout: true
|
||||
).trim()
|
||||
def d_io_regex = ~"^docker.io/"
|
||||
|
||||
// base_image is like ceph/ceph:v15
|
||||
podman_pull(ci_registry, "docker.io", "${base_image}")
|
||||
// base_image is like ceph/ceph:v15 or docker.io/ceph/ceph:v15, strip "docker.io/"
|
||||
podman_pull(ci_registry, "docker.io", "${base_image}" - d_io_regex)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,13 +116,14 @@ node('cico-workspace') {
|
||||
script: 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} \'source /opt/build/go/src/github.com/ceph/ceph-csi/build.env && echo ${BASE_IMAGE}\'',
|
||||
returnStdout: true
|
||||
).trim()
|
||||
def d_io_regex = ~"^docker.io/"
|
||||
|
||||
withCredentials([usernamePassword(credentialsId: 'container-registry-auth', usernameVariable: 'CREDS_USER', passwordVariable: 'CREDS_PASSWD')]) {
|
||||
podman_login(ci_registry, "${CREDS_USER}", "${CREDS_PASSWD}")
|
||||
}
|
||||
|
||||
// base_image is like ceph/ceph:v15
|
||||
podman_pull(ci_registry, "docker.io", "${base_image}")
|
||||
// base_image is like ceph/ceph:v15 or docker.io/ceph/ceph:v15, strip "docker.io/"
|
||||
podman_pull(ci_registry, "docker.io", "${base_image}" - d_io_regex)
|
||||
// cephcsi:devel is used with 'make containerized-build'
|
||||
podman_pull(ci_registry, ci_registry, "ceph-csi:devel")
|
||||
}
|
||||
|
@ -113,13 +113,14 @@ node('cico-workspace') {
|
||||
script: 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} \'source /opt/build/go/src/github.com/ceph/ceph-csi/build.env && echo ${BASE_IMAGE}\'',
|
||||
returnStdout: true
|
||||
).trim()
|
||||
def d_io_regex = ~"^docker.io/"
|
||||
|
||||
withCredentials([usernamePassword(credentialsId: 'container-registry-auth', usernameVariable: 'CREDS_USER', passwordVariable: 'CREDS_PASSWD')]) {
|
||||
podman_login(ci_registry, "${CREDS_USER}", "${CREDS_PASSWD}")
|
||||
}
|
||||
|
||||
// base_image is like ceph/ceph:v15
|
||||
podman_pull(ci_registry, "docker.io", "${base_image}")
|
||||
// base_image is like ceph/ceph:v15 or docker.io/ceph/ceph:v15, strip "docker.io/"
|
||||
podman_pull(ci_registry, "docker.io", "${base_image}" - d_io_regex)
|
||||
// cephcsi:devel is used with 'make containerized-build'
|
||||
podman_pull(ci_registry, ci_registry, "ceph-csi:devel")
|
||||
}
|
||||
|
@ -113,13 +113,14 @@ node('cico-workspace') {
|
||||
script: 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} \'source /opt/build/go/src/github.com/ceph/ceph-csi/build.env && echo ${BASE_IMAGE}\'',
|
||||
returnStdout: true
|
||||
).trim()
|
||||
def d_io_regex = ~"^docker.io/"
|
||||
|
||||
withCredentials([usernamePassword(credentialsId: 'container-registry-auth', usernameVariable: 'CREDS_USER', passwordVariable: 'CREDS_PASSWD')]) {
|
||||
podman_login(ci_registry, "${CREDS_USER}", "${CREDS_PASSWD}")
|
||||
}
|
||||
|
||||
// base_image is like ceph/ceph:v15
|
||||
podman_pull(ci_registry, "docker.io", "${base_image}")
|
||||
// base_image is like ceph/ceph:v15 or docker.io/ceph/ceph:v15, strip "docker.io/"
|
||||
podman_pull(ci_registry, "docker.io", "${base_image}" - d_io_regex)
|
||||
// cephcsi:devel is used with 'make containerized-build'
|
||||
podman_pull(ci_registry, ci_registry, "ceph-csi:devel")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user