Define stages for conformance run inside k8s upgrade pipeline
Change-Id: I5941ddd7615e4a6e6a8166a41be99a135a7a69cb
Related-PROD: PROD-28979 (PROD:28979)
(cherry picked from commit 42b9870e734cac0409ad15cec66e82fae80ad664)
diff --git a/k8s-upgrade-pipeline.groovy b/k8s-upgrade-pipeline.groovy
index fe7d189..4e75e11 100644
--- a/k8s-upgrade-pipeline.groovy
+++ b/k8s-upgrade-pipeline.groovy
@@ -345,11 +345,9 @@
}
def executeConformance(pepperEnv, target, k8s_api, mcp_repo) {
- stage("Running conformance tests") {
- def image = buildImageURL(pepperEnv, target, mcp_repo)
- print("Using image: " + image)
- runConformance(pepperEnv, target, k8s_api, image)
- }
+ def image = buildImageURL(pepperEnv, target, mcp_repo)
+ print("Using image: " + image)
+ runConformance(pepperEnv, target, k8s_api, image)
}
def containerDinstalled(pepperEnv, target) {
@@ -669,21 +667,23 @@
def daemonsetMap = buildDaemonsetMap(pepperEnv, ctl_node)
if (CONFORMANCE_RUN_BEFORE.toBoolean()) {
- def target = CTL_TARGET
- def mcp_repo = ARTIFACTORY_URL
- def k8s_api = TEST_K8S_API_SERVER
- firstTarget = salt.getFirstMinion(pepperEnv, target)
- def containerd_enabled = containerDenabled(pepperEnv, firstTarget)
- def containerd_installed = containerDinstalled(pepperEnv, firstTarget)
- def conformance_pod_ready = conformancePodDefExists(pepperEnv, firstTarget)
- if (containerd_enabled && containerd_installed && conformance_pod_ready) {
- def config = ['master': pepperEnv,
- 'target': firstTarget,
- 'junitResults': false,
- 'autodetect': true]
- test.executeConformance(config)
- } else {
- executeConformance(pepperEnv, firstTarget, k8s_api, mcp_repo)
+ stage("Perform conformance run before upgrade") {
+ def target = CTL_TARGET
+ def mcp_repo = ARTIFACTORY_URL
+ def k8s_api = TEST_K8S_API_SERVER
+ firstTarget = salt.getFirstMinion(pepperEnv, target)
+ def containerd_enabled = containerDenabled(pepperEnv, firstTarget)
+ def containerd_installed = containerDinstalled(pepperEnv, firstTarget)
+ def conformance_pod_ready = conformancePodDefExists(pepperEnv, firstTarget)
+ if (containerd_enabled && containerd_installed && conformance_pod_ready) {
+ def config = ['master': pepperEnv,
+ 'target': firstTarget,
+ 'junitResults': false,
+ 'autodetect': true]
+ test.executeConformance(config)
+ } else {
+ executeConformance(pepperEnv, firstTarget, k8s_api, mcp_repo)
+ }
}
}
@@ -812,21 +812,23 @@
printVersionInfo(pepperEnv, ctl_node)
if (CONFORMANCE_RUN_AFTER.toBoolean()) {
- def target = CTL_TARGET
- def mcp_repo = ARTIFACTORY_URL
- def k8s_api = TEST_K8S_API_SERVER
- firstTarget = salt.getFirstMinion(pepperEnv, target)
- def containerd_enabled = containerDenabled(pepperEnv, firstTarget)
- def containerd_installed = containerDinstalled(pepperEnv, firstTarget)
- def conformance_pod_ready = conformancePodDefExists(pepperEnv, firstTarget)
- if (containerd_enabled && containerd_installed && conformance_pod_ready) {
- def config = ['master': pepperEnv,
- 'target': firstTarget,
- 'junitResults': false,
- 'autodetect': true]
- test.executeConformance(config)
- } else {
- executeConformance(pepperEnv, firstTarget, k8s_api, mcp_repo)
+ stage("Perform conformance run after upgrade") {
+ def target = CTL_TARGET
+ def mcp_repo = ARTIFACTORY_URL
+ def k8s_api = TEST_K8S_API_SERVER
+ firstTarget = salt.getFirstMinion(pepperEnv, target)
+ def containerd_enabled = containerDenabled(pepperEnv, firstTarget)
+ def containerd_installed = containerDinstalled(pepperEnv, firstTarget)
+ def conformance_pod_ready = conformancePodDefExists(pepperEnv, firstTarget)
+ if (containerd_enabled && containerd_installed && conformance_pod_ready) {
+ def config = ['master': pepperEnv,
+ 'target': firstTarget,
+ 'junitResults': false,
+ 'autodetect': true]
+ test.executeConformance(config)
+ } else {
+ executeConformance(pepperEnv, firstTarget, k8s_api, mcp_repo)
+ }
}
}
} catch (Throwable e) {