mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
ci: add configuration for the proxy/mirror registry
This makes it possible to pull images from Docker Hub through the local container image registry in the CI OpenShift deployment. The registry in the CI is configured with the 'cephcsibot' account so that pulling images is accounted towards the account, and not anonymous consumers within the whole CentOS CI. There should be no need to manually sync the images between the local registry and Docker Hub anymore. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
6a7e6c841f
commit
5ae8fb7c9b
@ -19,6 +19,7 @@ def ssh(cmd) {
|
||||
|
||||
def podman_login(registry, username, passwd) {
|
||||
ssh "podman login --authfile=~/.podman-auth.json --username=${username} --password='${passwd}' ${registry}"
|
||||
ssh 'cp container-registry.conf /etc/containers/registries.conf'
|
||||
}
|
||||
|
||||
def podman_pull(registry, image) {
|
||||
@ -103,7 +104,7 @@ node('cico-workspace') {
|
||||
if (params.ghprbPullId != null) {
|
||||
ref = "pull/${ghprbPullId}/merge"
|
||||
}
|
||||
sh 'scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ./prepare.sh ./single-node-k8s.sh ./podman2minikube.sh root@${CICO_NODE}:'
|
||||
sh 'scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ./prepare.sh ./single-node-k8s.sh ./podman2minikube.sh container-registry.conf root@${CICO_NODE}:'
|
||||
ssh "./prepare.sh --workdir=/opt/build/go/src/github.com/ceph/ceph-csi --gitrepo=${git_repo} --ref=${ref}"
|
||||
}
|
||||
stage('pull base container images') {
|
||||
@ -117,7 +118,7 @@ node('cico-workspace') {
|
||||
}
|
||||
|
||||
// base_image is like ceph/ceph:v15
|
||||
podman_pull(ci_registry, "${base_image}")
|
||||
podman_pull("docker.io", "${base_image}")
|
||||
// cephcsi:devel is used with 'make containerized-build'
|
||||
podman_pull(ci_registry, "ceph-csi:devel")
|
||||
}
|
||||
@ -135,7 +136,7 @@ node('cico-workspace') {
|
||||
|
||||
if (rook_version != '') {
|
||||
// single-node-k8s.sh pushes the image into minikube
|
||||
podman_pull(ci_registry, "rook/ceph:${rook_version}")
|
||||
podman_pull("docker.io", "rook/ceph:${rook_version}")
|
||||
}
|
||||
|
||||
timeout(time: 30, unit: 'MINUTES') {
|
||||
@ -143,9 +144,9 @@ node('cico-workspace') {
|
||||
}
|
||||
|
||||
// vault:latest and nginx:latest are used by the e2e tests
|
||||
podman_pull(ci_registry, "vault:latest")
|
||||
podman_pull("docker.io", "vault:latest")
|
||||
ssh "./podman2minikube.sh vault:latest"
|
||||
podman_pull(ci_registry, "nginx:latest")
|
||||
podman_pull("docker.io", "nginx:latest")
|
||||
ssh "./podman2minikube.sh nginx:latest"
|
||||
}
|
||||
stage('deploy ceph-csi through helm') {
|
||||
|
Reference in New Issue
Block a user