mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-10 00:10:20 +00:00
ci: move podman2minikube() into its own script
This way, it can easier be re-used for other container images. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
e4339fea72
commit
dd10e66a98
@ -92,7 +92,7 @@ node('cico-workspace') {
|
|||||||
if (params.ghprbPullId != null) {
|
if (params.ghprbPullId != null) {
|
||||||
ref = "pull/${ghprbPullId}/head"
|
ref = "pull/${ghprbPullId}/head"
|
||||||
}
|
}
|
||||||
sh 'scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ./prepare.sh ./single-node-k8s.sh ./run-k8s-external-storage-e2e.sh root@${CICO_NODE}:'
|
sh 'scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ./prepare.sh ./single-node-k8s.sh podman2minikube.sh ./run-k8s-external-storage-e2e.sh root@${CICO_NODE}:'
|
||||||
ssh "./prepare.sh --workdir=/opt/build/go/src/github.com/ceph/ceph-csi --gitrepo=${git_repo} --ref=${ref}"
|
ssh "./prepare.sh --workdir=/opt/build/go/src/github.com/ceph/ceph-csi --gitrepo=${git_repo} --ref=${ref}"
|
||||||
}
|
}
|
||||||
stage('build artifacts') {
|
stage('build artifacts') {
|
||||||
|
@ -103,7 +103,7 @@ node('cico-workspace') {
|
|||||||
if (params.ghprbPullId != null) {
|
if (params.ghprbPullId != null) {
|
||||||
ref = "pull/${ghprbPullId}/merge"
|
ref = "pull/${ghprbPullId}/merge"
|
||||||
}
|
}
|
||||||
sh 'scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ./prepare.sh ./single-node-k8s.sh root@${CICO_NODE}:'
|
sh 'scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ./prepare.sh ./single-node-k8s.sh ./podman2minikube.sh root@${CICO_NODE}:'
|
||||||
ssh "./prepare.sh --workdir=/opt/build/go/src/github.com/ceph/ceph-csi --gitrepo=${git_repo} --ref=${ref}"
|
ssh "./prepare.sh --workdir=/opt/build/go/src/github.com/ceph/ceph-csi --gitrepo=${git_repo} --ref=${ref}"
|
||||||
}
|
}
|
||||||
stage('pull base container images') {
|
stage('pull base container images') {
|
||||||
|
@ -100,7 +100,7 @@ node('cico-workspace') {
|
|||||||
if (params.ghprbPullId != null) {
|
if (params.ghprbPullId != null) {
|
||||||
ref = "pull/${ghprbPullId}/merge"
|
ref = "pull/${ghprbPullId}/merge"
|
||||||
}
|
}
|
||||||
sh 'scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ./prepare.sh ./single-node-k8s.sh root@${CICO_NODE}:'
|
sh 'scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ./prepare.sh ./single-node-k8s.sh ./podman2minikube.sh root@${CICO_NODE}:'
|
||||||
ssh "./prepare.sh --workdir=/opt/build/go/src/github.com/ceph/ceph-csi --gitrepo=${git_repo} --ref=${ref}"
|
ssh "./prepare.sh --workdir=/opt/build/go/src/github.com/ceph/ceph-csi --gitrepo=${git_repo} --ref=${ref}"
|
||||||
}
|
}
|
||||||
stage('pull base container images') {
|
stage('pull base container images') {
|
||||||
|
15
podman2minikube.sh
Executable file
15
podman2minikube.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# When an image was built with podman, it needs importing into minikube.
|
||||||
|
#
|
||||||
|
|
||||||
|
# fail when a command returns an error
|
||||||
|
set -e -o pipefail
|
||||||
|
|
||||||
|
# "minikube ssh" fails to read the image, so use standard ssh instead
|
||||||
|
podman image save "${1}" | \
|
||||||
|
ssh \
|
||||||
|
-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
|
||||||
|
-l docker -i "$(minikube ssh-key)" \
|
||||||
|
"$(minikube ip)" docker image load
|
||||||
|
|
@ -121,24 +121,13 @@ function deploy_rook()
|
|||||||
${GOPATH}/src/github.com/ceph/ceph-csi/scripts/install-snapshot.sh install
|
${GOPATH}/src/github.com/ceph/ceph-csi/scripts/install-snapshot.sh install
|
||||||
}
|
}
|
||||||
|
|
||||||
# When an image was built with podman, it needs importing into minikube.
|
|
||||||
function podman2minikube()
|
|
||||||
{
|
|
||||||
# "minikube ssh" fails to read the image, so use standard ssh instead
|
|
||||||
podman image save "${1}" | \
|
|
||||||
ssh \
|
|
||||||
-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
|
|
||||||
-l docker -i "$(minikube ssh-key)" \
|
|
||||||
"$(minikube ip)" docker image load
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set environment variables
|
# Set environment variables
|
||||||
set_env
|
set_env
|
||||||
|
|
||||||
# prepare minikube environment
|
# prepare minikube environment
|
||||||
install_minikube
|
install_minikube
|
||||||
|
|
||||||
podman2minikube "quay.io/cephcsi/cephcsi:${CSI_IMAGE_VERSION}"
|
./podman2minikube.sh "quay.io/cephcsi/cephcsi:${CSI_IMAGE_VERSION}"
|
||||||
|
|
||||||
deploy_rook
|
deploy_rook
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ node('cico-workspace') {
|
|||||||
if (params.ghprbPullId != null) {
|
if (params.ghprbPullId != null) {
|
||||||
ref = "pull/${ghprbPullId}/merge"
|
ref = "pull/${ghprbPullId}/merge"
|
||||||
}
|
}
|
||||||
sh 'scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ./prepare.sh ./single-node-k8s.sh root@${CICO_NODE}:'
|
sh 'scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ./prepare.sh ./single-node-k8s.sh ./podman2minikube.sh root@${CICO_NODE}:'
|
||||||
ssh "./prepare.sh --workdir=/opt/build/go/src/github.com/ceph/ceph-csi --gitrepo=${git_repo} --ref=${ref}"
|
ssh "./prepare.sh --workdir=/opt/build/go/src/github.com/ceph/ceph-csi --gitrepo=${git_repo} --ref=${ref}"
|
||||||
}
|
}
|
||||||
stage('pull base container images') {
|
stage('pull base container images') {
|
||||||
|
Loading…
Reference in New Issue
Block a user