diff --git a/jobs/mini-e2e.yaml b/jobs/mini-e2e.yaml index dc394ba8d..2d6a956b6 100644 --- a/jobs/mini-e2e.yaml +++ b/jobs/mini-e2e.yaml @@ -2,8 +2,8 @@ - project: name: mini-e2e k8s_version: - - '1.18.5' - - '1.19.0' + - '1.18' + - '1.19' jobs: - 'mini-e2e_k8s-{k8s_version}' - 'mini-e2e-helm_k8s-{k8s_version}' diff --git a/mini-e2e-helm.groovy b/mini-e2e-helm.groovy index 0e19abd87..55924d7ce 100644 --- a/mini-e2e-helm.groovy +++ b/mini-e2e-helm.groovy @@ -7,6 +7,7 @@ def ref = "master" def git_since = "master" def skip_e2e = 0 def doc_change = 0 +def k8s_release = 'latest' def namespace = 'cephcsi-e2e-' + UUID.randomUUID().toString().split('-')[-1] // ssh executes a given command on the reserved bare-metal machine @@ -37,6 +38,13 @@ node('cico-workspace') { return } + stage("detect k8s-${k8s_version} patch release") { + k8s_release = sh( + script: "./scripts/get_patch_release.py --version=${k8s_version}", + returnStdout: true).trim() + echo "detected Kubernetes patch release: ${k8s_release}" + } + stage('checkout PR') { if (params.ghprbPullId != null) { ref = "pull/${ghprbPullId}/head" @@ -90,9 +98,9 @@ node('cico-workspace') { // build e2e.test executable ssh 'cd /opt/build/go/src/github.com/ceph/ceph-csi && make containerized-build CONTAINER_CMD=podman TARGET=e2e.test' } - stage("deploy k8s v${k8s_version} and rook") { + stage("deploy k8s-${k8s_version} and rook") { timeout(time: 30, unit: 'MINUTES') { - ssh "./single-node-k8s.sh --k8s-version=v${k8s_version}" + ssh "./single-node-k8s.sh --k8s-version=${k8s_release}" } } stage('deploy ceph-csi through helm') { diff --git a/mini-e2e.groovy b/mini-e2e.groovy index 7a122f885..cecb03b75 100644 --- a/mini-e2e.groovy +++ b/mini-e2e.groovy @@ -7,6 +7,7 @@ def ref = "master" def git_since = 'master' def skip_e2e = 0 def doc_change = 0 +def k8s_release = 'latest' def ssh(cmd) { sh "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} '${cmd}'" @@ -34,6 +35,13 @@ node('cico-workspace') { return } + stage("detect k8s-${k8s_version} patch release") { + k8s_release = sh( + script: "./scripts/get_patch_release.py --version=${k8s_version}", + returnStdout: true).trim() + echo "detected Kubernetes patch release: ${k8s_release}" + } + stage('checkout PR') { if (params.ghprbPullId != null) { ref = "pull/${ghprbPullId}/head" @@ -87,9 +95,9 @@ node('cico-workspace') { // build e2e.test executable ssh 'cd /opt/build/go/src/github.com/ceph/ceph-csi && make containerized-build CONTAINER_CMD=podman TARGET=e2e.test' } - stage("deploy k8s v${k8s_version} and rook") { + stage("deploy k8s-${k8s_version} and rook") { timeout(time: 30, unit: 'MINUTES') { - ssh "./single-node-k8s.sh --k8s-version=v${k8s_version}" + ssh "./single-node-k8s.sh --k8s-version=${k8s_release}" } } stage('run e2e') {