ci: pass namespace after --namespace flag

Since we are adding support for deployment of sc and
secret via flags, to help script recognize when an
unknown string is passed as a namespace, use
--namespace flag before entering the namespace.

Signed-off-by: Yug <yuggupta27@gmail.com>
This commit is contained in:
Yug 2021-04-22 15:07:20 +05:30 committed by mergify[bot]
parent eb4d9259a9
commit 69091b9273

View File

@ -172,7 +172,7 @@ node('cico-workspace') {
timeout(time: 30, unit: 'MINUTES') { timeout(time: 30, unit: 'MINUTES') {
ssh 'cd /opt/build/go/src/github.com/ceph/ceph-csi && ./scripts/install-helm.sh up' ssh 'cd /opt/build/go/src/github.com/ceph/ceph-csi && ./scripts/install-helm.sh up'
ssh "kubectl create namespace '${namespace}'" ssh "kubectl create namespace '${namespace}'"
ssh "cd /opt/build/go/src/github.com/ceph/ceph-csi && ./scripts/install-helm.sh install-cephcsi '${namespace}'" ssh "cd /opt/build/go/src/github.com/ceph/ceph-csi && ./scripts/install-helm.sh install-cephcsi --namespace '${namespace}'"
} }
} }
stage('run e2e') { stage('run e2e') {
@ -182,7 +182,7 @@ node('cico-workspace') {
} }
stage('cleanup ceph-csi deployment') { stage('cleanup ceph-csi deployment') {
timeout(time: 30, unit: 'MINUTES') { timeout(time: 30, unit: 'MINUTES') {
ssh "cd /opt/build/go/src/github.com/ceph/ceph-csi && ./scripts/install-helm.sh cleanup-cephcsi '${namespace}'" ssh "cd /opt/build/go/src/github.com/ceph/ceph-csi && ./scripts/install-helm.sh cleanup-cephcsi --namespace '${namespace}'"
ssh 'cd /opt/build/go/src/github.com/ceph/ceph-csi && ./scripts/install-helm.sh clean' ssh 'cd /opt/build/go/src/github.com/ceph/ceph-csi && ./scripts/install-helm.sh clean'
ssh "kubectl delete namespace '${namespace}'" ssh "kubectl delete namespace '${namespace}'"
} }