Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
deploy: test with Kubernetes 1.21 instead of 1.18
Browse files Browse the repository at this point in the history
The deployments for 1.18 get removed in favor of testing with 1.21.
For the two versions which get tested pre-merge, testing of both
"production" and "testing" deployments gets restored the way it
was originally intended (more tests on main worker, less on newly
spawned worker).
  • Loading branch information
pohly committed Jun 7, 2021
1 parent f4c19e5 commit f552cfd
Show file tree
Hide file tree
Showing 17 changed files with 83 additions and 79 deletions.
29 changes: 16 additions & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -174,45 +174,48 @@ pipeline {

// Some stages are skipped entirely when testing PRs, the
// others skip certain tests in that case:
// - production deployment is only tested with Kubernetes 1.16
// and testing deployment only with Kubernetes 1.18
// - production deployment is tested on the oldest supported Kubernetes
// (less tests, runs faster)
// - testing deployment is tested on the newest supported Kubernetes
// (more tests, runs longer, thus gets to use the existing worker)
stage('Testing') {
parallel {
// This runs most tests and thus gets to use the initial worker immediately.
stage('1.20') {
stage('1.21') {
options {
timeout(time: 12, unit: "HOURS")
}
steps {
TestInVM("", "fedora", "", "1.20", "Top.Level..[[:alpha:]]*-production[[:space:]]")
// Skip production, i.e. run testing.
TestInVM("", "fedora", "", "1.21", "Top.Level..[[:alpha:]]*-production[[:space:]]")
}
}

// All others set up their own worker.
stage('1.19') {
stage('1.20') {
when {
beforeAgent true
not { changeRequest() }
}
options {
timeout(time: 12, unit: "HOURS")
}
agent {
label "pmem-csi"
}
steps {
TestInVM("fedora-1.19", "fedora", "", "1.19", "Top.Level..[[:alpha:]]*-production[[:space:]]")
TestInVM("fedora-1.20", "fedora", "", "1.20", "")
}
}
stage('1.18') {
when {
beforeAgent true
not { changeRequest() }
}
stage('1.19') {
options {
timeout(time: 12, unit: "HOURS")
}
agent {
label "pmem-csi"
}
steps {
TestInVM("fedora-1.18", "fedora", "", "1.18", "")
// Skip testing, i.e. run production.
TestInVM("fedora-1.19", "fedora", "", "1.19", "Top.Level..[[:alpha:]]*-testing[[:space:]]")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ KUSTOMIZE_KUBERNETES_OUTPUT = \
deploy/kubernetes-X.XX/pmem-csi-lvm-testing.yaml=deploy/kustomize/kubernetes-base-lvm-coverage \

KUSTOMIZE_KUBERNETES_VERSIONS = \
1.18 \
1.19 \
1.20 \
1.21

KUSTOMIZE += $(foreach version,$(KUSTOMIZE_KUBERNETES_VERSIONS),$(subst X.XX,$(version),$(KUSTOMIZE_KUBERNETES_OUTPUT)))

Expand Down
120 changes: 60 additions & 60 deletions deploy/bindata_generated.go

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions test/setup-fedora-govm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,17 @@ EOF

# For the sake of reproducibility, use fixed versions.
# List of latest packages can be generated on Fedora with:
# for v in 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20; do for i in kubelet kubeadm kubectl; do echo "$i-$(sudo dnf --showduplicates list kubelet | grep " $v" | tail -n 1 | sed -e 's/.* \([0-9]*\.[0-9]*\.[0-9]*[^ ]*\).*/\1/')"; done; done
# for v in 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21; do echo -n " $v) packages+=\""; for i in kubelet kubeadm kubectl; do ver=$(sudo dnf --showduplicates list kubelet | grep " $v" | tail -n 1 | sed -e 's/.* \([0-9]*\.[0-9]*\.[0-9]*[^ ]*\).*/\1/'); echo -n " "; echo -n $i-$ver; done; echo '";;'; done
case ${TEST_KUBERNETES_VERSION} in
1.13) packages+=" kubelet-1.13.12-0 kubeadm-1.13.12-0 kubectl-1.13.12-0";;
1.14) packages+=" kubelet-1.14.10-0 kubeadm-1.14.10-0 kubectl-1.14.10-0";;
1.15) packages+=" kubelet-1.15.12-0 kubeadm-1.15.12-0 kubectl-1.15.12-0";;
1.16) packages+=" kubelet-1.16.15-0 kubeadm-1.16.15-0 kubectl-1.16.15-0";;
1.17) packages+=" kubelet-1.17.17-0 kubeadm-1.17.17-0 kubectl-1.17.17-0";;
1.18) packages+=" kubelet-1.18.17-0 kubeadm-1.18.17-0 kubectl-1.18.17-0";;
1.19) packages+=" kubelet-1.19.9-0 kubeadm-1.19.9-0 kubectl-1.19.9-0";;
1.20) packages+=" kubelet-1.20.5-0 kubeadm-1.20.5-0 kubectl-1.20.5-0";;
1.18) packages+=" kubelet-1.18.19-0 kubeadm-1.18.19-0 kubectl-1.18.19-0";;
1.19) packages+=" kubelet-1.19.11-0 kubeadm-1.19.11-0 kubectl-1.19.11-0";;
1.20) packages+=" kubelet-1.20.7-0 kubeadm-1.20.7-0 kubectl-1.20.7-0";;
1.21) packages+=" kubelet-1.21.1-0 kubeadm-1.21.1-0 kubectl-1.21.1-0";;
*) echo >&2 "Kubernetes version ${TEST_KUBERNETES_VERSION} not supported, package list in $0 must be updated."; exit 1;;
esac
packages+=" --disableexcludes=kubernetes"
Expand Down
2 changes: 1 addition & 1 deletion test/test-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ fi
# is installed instead of the latest one. Ignored when
# using Clear Linux as OS because with Clear Linux we have
# to use the Kubernetes version that ships with it.
: ${TEST_KUBERNETES_VERSION:=1.20}
: ${TEST_KUBERNETES_VERSION:=1.21}

# Can be used to pick one of potentially severally of the
# pre-generated deploy/kubernetes-<version><flavor> deployment
Expand Down

0 comments on commit f552cfd

Please sign in to comment.