diff --git a/containerized-tests.groovy b/containerized-tests.groovy index 181ce9dd8..3aeb67a84 100644 --- a/containerized-tests.groovy +++ b/containerized-tests.groovy @@ -17,12 +17,12 @@ def ssh(cmd) { sh "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} '${cmd}'" } -def podman_login(username, passwd) { - ssh "podman login --authfile=~/.podman-auth.json --username=${username} --password='${passwd}' ${ci_registry}" +def podman_login(registry, username, passwd) { + ssh "podman login --authfile=~/.podman-auth.json --username=${username} --password='${passwd}' ${registry}" } -def podman_pull(image) { - ssh "podman pull --authfile=~/.podman-auth.json ${ci_registry}/${image} && podman tag ${ci_registry}/${image} ${image}" +def podman_pull(registry, image) { + ssh "podman pull --authfile=~/.podman-auth.json ${registry}/${image} && podman tag ${registry}/${image} ${image}" } node('cico-workspace') { @@ -95,7 +95,7 @@ node('cico-workspace') { returnStatus: true) withCredentials([usernamePassword(credentialsId: 'container-registry-auth', usernameVariable: 'CREDS_USER', passwordVariable: 'CREDS_PASSWD')]) { - podman_login("${CREDS_USER}", "${CREDS_PASSWD}") + podman_login(ci_registry, "${CREDS_USER}", "${CREDS_PASSWD}") } parallel test: { @@ -106,7 +106,7 @@ node('cico-workspace') { return } - podman_pull("${cached_image}:test") + podman_pull(ci_registry, "${cached_image}:test") } }, devel: { @@ -117,7 +117,7 @@ node('cico-workspace') { return } - podman_pull("${cached_image}:devel") + podman_pull(ci_registry, "${cached_image}:devel") } }, ceph: { @@ -128,7 +128,7 @@ node('cico-workspace') { ).trim() // base_image is like ceph/ceph:v15 - podman_pull("${base_image}") + podman_pull(ci_registry, "${base_image}") } } } diff --git a/mini-e2e-helm.groovy b/mini-e2e-helm.groovy index e04466032..cd0542856 100644 --- a/mini-e2e-helm.groovy +++ b/mini-e2e-helm.groovy @@ -17,12 +17,12 @@ def ssh(cmd) { sh "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} \"${cmd}\"" } -def podman_login(username, passwd) { - ssh "podman login --authfile=~/.podman-auth.json --username=${username} --password='${passwd}' ${ci_registry}" +def podman_login(registry, username, passwd) { + ssh "podman login --authfile=~/.podman-auth.json --username=${username} --password='${passwd}' ${registry}" } -def podman_pull(image) { - ssh "podman pull --authfile=~/.podman-auth.json ${ci_registry}/${image} && podman tag ${ci_registry}/${image} ${image}" +def podman_pull(registry, image) { + ssh "podman pull --authfile=~/.podman-auth.json ${registry}/${image} && podman tag ${registry}/${image} ${image}" } node('cico-workspace') { @@ -113,13 +113,13 @@ node('cico-workspace') { ).trim() withCredentials([usernamePassword(credentialsId: 'container-registry-auth', usernameVariable: 'CREDS_USER', passwordVariable: 'CREDS_PASSWD')]) { - podman_login("${CREDS_USER}", "${CREDS_PASSWD}") + podman_login(ci_registry, "${CREDS_USER}", "${CREDS_PASSWD}") } // base_image is like ceph/ceph:v15 - podman_pull("${base_image}") + podman_pull(ci_registry, "${base_image}") // cephcsi:devel is used with 'make containerized-build' - podman_pull("ceph-csi:devel") + podman_pull(ci_registry, "ceph-csi:devel") } stage('build artifacts') { // build container image @@ -133,9 +133,9 @@ node('cico-workspace') { } // vault:latest and nginx:latest are used by the e2e tests - podman_pull("vault:latest") + podman_pull(ci_registry, "vault:latest") ssh "./podman2minikube.sh vault:latest" - podman_pull("nginx:latest") + podman_pull(ci_registry, "nginx:latest") ssh "./podman2minikube.sh nginx:latest" } stage('deploy ceph-csi through helm') { diff --git a/mini-e2e.groovy b/mini-e2e.groovy index a9326a304..b14b57f89 100644 --- a/mini-e2e.groovy +++ b/mini-e2e.groovy @@ -14,12 +14,12 @@ def ssh(cmd) { sh "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} '${cmd}'" } -def podman_login(username, passwd) { - ssh "podman login --authfile=~/.podman-auth.json --username=${username} --password='${passwd}' ${ci_registry}" +def podman_login(registry, username, passwd) { + ssh "podman login --authfile=~/.podman-auth.json --username=${username} --password='${passwd}' ${registry}" } -def podman_pull(image) { - ssh "podman pull --authfile=~/.podman-auth.json ${ci_registry}/${image} && podman tag ${ci_registry}/${image} ${image}" +def podman_pull(registry, image) { + ssh "podman pull --authfile=~/.podman-auth.json ${registry}/${image} && podman tag ${registry}/${image} ${image}" } node('cico-workspace') { @@ -110,13 +110,13 @@ node('cico-workspace') { ).trim() withCredentials([usernamePassword(credentialsId: 'container-registry-auth', usernameVariable: 'CREDS_USER', passwordVariable: 'CREDS_PASSWD')]) { - podman_login("${CREDS_USER}", "${CREDS_PASSWD}") + podman_login(ci_registry, "${CREDS_USER}", "${CREDS_PASSWD}") } // base_image is like ceph/ceph:v15 - podman_pull("${base_image}") + podman_pull(ci_registry, "${base_image}") // cephcsi:devel is used with 'make containerized-build' - podman_pull("ceph-csi:devel") + podman_pull(ci_registry, "ceph-csi:devel") } stage('build artifacts') { // build container image @@ -130,9 +130,9 @@ node('cico-workspace') { } // vault:latest and nginx:latest are used by the e2e tests - podman_pull("vault:latest") + podman_pull(ci_registry, "vault:latest") ssh "./podman2minikube.sh vault:latest" - podman_pull("nginx:latest") + podman_pull(ci_registry, "nginx:latest") ssh "./podman2minikube.sh nginx:latest" } stage('run e2e') { diff --git a/upgrade-tests.groovy b/upgrade-tests.groovy index 4750f9ce0..a9a47b118 100644 --- a/upgrade-tests.groovy +++ b/upgrade-tests.groovy @@ -14,12 +14,12 @@ def ssh(cmd) { sh "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} '${cmd}'" } -def podman_login(username, passwd) { - ssh "podman login --authfile=~/.podman-auth.json --username=${username} --password='${passwd}' ${ci_registry}" +def podman_login(registry, username, passwd) { + ssh "podman login --authfile=~/.podman-auth.json --username=${username} --password='${passwd}' ${registry}" } -def podman_pull(image) { - ssh "podman pull --authfile=~/.podman-auth.json ${ci_registry}/${image} && podman tag ${ci_registry}/${image} ${image}" +def podman_pull(registry, image) { + ssh "podman pull --authfile=~/.podman-auth.json ${registry}/${image} && podman tag ${registry}/${image} ${image}" } node('cico-workspace') { @@ -110,13 +110,13 @@ node('cico-workspace') { ).trim() withCredentials([usernamePassword(credentialsId: 'container-registry-auth', usernameVariable: 'CREDS_USER', passwordVariable: 'CREDS_PASSWD')]) { - podman_login("${CREDS_USER}", "${CREDS_PASSWD}") + podman_login(ci_registry, "${CREDS_USER}", "${CREDS_PASSWD}") } // base_image is like ceph/ceph:v15 - podman_pull("${base_image}") + podman_pull(ci_registry, "${base_image}") // cephcsi:devel is used with 'make containerized-build' - podman_pull("ceph-csi:devel") + podman_pull(ci_registry, "ceph-csi:devel") } stage('build artifacts') { // build container image @@ -130,9 +130,9 @@ node('cico-workspace') { } // vault:latest and nginx:latest are used by the e2e tests - podman_pull("vault:latest") + podman_pull(ci_registry, "vault:latest") ssh "./podman2minikube.sh vault:latest" - podman_pull("nginx:latest") + podman_pull(ci_registry, "nginx:latest") ssh "./podman2minikube.sh nginx:latest" } stage("run ${test_type} upgrade tests") {