mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 22:30:23 +00:00
ci: pre-pull Ceph base-image and cephcsi:devel for mini-e2e-helm jobs
The same changes have been made for the mini-e2e jobs yesterday, and those seem to work well. Use the same pre-pull method for the Helm deployment. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
7796f52043
commit
1eec3792ec
@ -8,6 +8,7 @@ def git_since = "master"
|
||||
def skip_e2e = 0
|
||||
def doc_change = 0
|
||||
def k8s_release = 'latest'
|
||||
def ci_registry = 'registry-ceph-csi.apps.ocp.ci.centos.org'
|
||||
def namespace = 'cephcsi-e2e-' + UUID.randomUUID().toString().split('-')[-1]
|
||||
|
||||
// ssh executes a given command on the reserved bare-metal machine
|
||||
@ -16,6 +17,14 @@ 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_pull(image) {
|
||||
ssh "podman pull --authfile=~/.podman-auth.json ${ci_registry}/${image} && podman tag ${ci_registry}/${image} ${image}"
|
||||
}
|
||||
|
||||
node('cico-workspace') {
|
||||
stage('checkout ci repository') {
|
||||
git url: "${ci_git_repo}",
|
||||
@ -97,6 +106,21 @@ node('cico-workspace') {
|
||||
sh 'scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ./prepare.sh ./single-node-k8s.sh 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') {
|
||||
def base_image = sh(
|
||||
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()
|
||||
|
||||
withCredentials([usernamePassword(credentialsId: 'container-registry-auth', usernameVariable: 'CREDS_USER', passwordVariable: 'CREDS_PASSWD')]) {
|
||||
podman_login("${CREDS_USER}", "${CREDS_PASSWD}:)
|
||||
}
|
||||
|
||||
// base_image is like ceph/ceph:v15
|
||||
podman_pull("${base_image}")
|
||||
// cephcsi:devel is used with 'make containerized-build'
|
||||
podman_pull("ceph-csi:devel")
|
||||
}
|
||||
stage('build artifacts') {
|
||||
// build container image
|
||||
ssh 'cd /opt/build/go/src/github.com/ceph/ceph-csi && make image-cephcsi GOARCH=amd64 CONTAINER_CMD=podman'
|
||||
|
Loading…
Reference in New Issue
Block a user