ci: fix test_type arg assignment

Set the test_type argument to the default value only
if no type is specified explicitly.

Signed-off-by: karthik-us <ksubrahm@redhat.com>
This commit is contained in:
karthik-us 2024-04-01 22:39:48 +05:30 committed by Niels de Vos
parent 460073521b
commit 919db7082c
2 changed files with 14 additions and 10 deletions

View File

@ -198,15 +198,17 @@ node('cico-workspace') {
}
stage('run e2e') {
timeout(time: 120, unit: 'MINUTES') {
test_type = '--test-rbd=true --test-cephfs=true --test-nfs=true'
def t_type = ""
if ("${test_type}" == "cephfs"){
test_type = '--test-cephfs=true --test-rbd=false --test-nfs=false'
t_type = '--test-cephfs=true --test-rbd=false --test-nfs=false'
} else if ("${test_type}" == "rbd"){
test_type = '--test-rbd=true --test-cephfs=false --test-nfs=false'
t_type = '--test-rbd=true --test-cephfs=false --test-nfs=false'
} else if ("${test_type}" == "nfs"){
test_type = '--test-nfs=true --test-cephfs=false --test-rbd=false'
t_type = '--test-nfs=true --test-cephfs=false --test-rbd=false'
} else {
t_type = '--test-rbd=true --test-cephfs=true --test-nfs=true'
}
def e2e_args = "--delete-namespace-on-failure=false --deploy-cephfs=false --deploy-rbd=false --helm-test=true ${test_type}"
def e2e_args = "--delete-namespace-on-failure=false --deploy-cephfs=false --deploy-rbd=false --helm-test=true ${t_type}"
ssh "cd /opt/build/go/src/github.com/ceph/ceph-csi && make run-e2e NAMESPACE='${namespace}' E2E_ARGS='${e2e_args}'"
}
}

View File

@ -185,15 +185,17 @@ node('cico-workspace') {
}
stage('run e2e') {
timeout(time: 120, unit: 'MINUTES') {
test_type = "--test-rbd=true --test-cephfs=true --test-nfs=true"
def t_type = ""
if ("${test_type}" == "cephfs"){
test_type = "--test-cephfs=true --test-rbd=false --test-nfs=false"
t_type = "--test-cephfs=true --test-rbd=false --test-nfs=false"
} else if ("${test_type}" == "rbd"){
test_type = "--test-rbd=true --test-cephfs=false --test-nfs=false"
t_type = "--test-rbd=true --test-cephfs=false --test-nfs=false"
} else if ("${test_type}" == "nfs"){
test_type = "--test-nfs=true --test-cephfs=false --test-rbd=false"
t_type = "--test-nfs=true --test-cephfs=false --test-rbd=false"
} else {
t_type = "--test-rbd=true --test-cephfs=true --test-nfs=true"
}
ssh "cd /opt/build/go/src/github.com/ceph/ceph-csi && make run-e2e E2E_ARGS=\"--delete-namespace-on-failure=false ${test_type}\""
ssh "cd /opt/build/go/src/github.com/ceph/ceph-csi && make run-e2e E2E_ARGS=\"--delete-namespace-on-failure=false ${t_type}\""
}
}
}