From c97da99c7825628dce84c66d3e2fec1eb969b952 Mon Sep 17 00:00:00 2001 From: nauman Date: Fri, 20 May 2022 01:47:46 +0000 Subject: [PATCH] Disable offline jobs for failing deploy scenarios Change-Id: I40fbf28a6bc7bf41c487e11fd03f3b9d78c898a6 --- .../kubernetes-jobs/kubernetes-verify-deploy-test.yaml | 4 ++++ jjb/cloud-infra/scripts/k8s-job-enable-condition.gvy | 1 + 2 files changed, 5 insertions(+) create mode 100644 jjb/cloud-infra/scripts/k8s-job-enable-condition.gvy diff --git a/jjb/cloud-infra/kubernetes-jobs/kubernetes-verify-deploy-test.yaml b/jjb/cloud-infra/kubernetes-jobs/kubernetes-verify-deploy-test.yaml index 0262fee53..223597f02 100644 --- a/jjb/cloud-infra/kubernetes-jobs/kubernetes-verify-deploy-test.yaml +++ b/jjb/cloud-infra/kubernetes-jobs/kubernetes-verify-deploy-test.yaml @@ -295,6 +295,8 @@ kill-phase-on: FAILURE abort-all-job: false property-file: $WORKSPACE/change.properties + enable-condition: + !include-raw: '../scripts/k8s-job-enable-condition.gvy' - multijob: name: "{environment-type} testing on {type} instances" condition: SUCCESSFUL @@ -307,6 +309,8 @@ kill-phase-on: FAILURE abort-all-job: false property-file: $WORKSPACE/change.properties + enable-condition: + !include-raw: '../scripts/k8s-job-enable-condition.gvy' publishers: - postbuildscript: diff --git a/jjb/cloud-infra/scripts/k8s-job-enable-condition.gvy b/jjb/cloud-infra/scripts/k8s-job-enable-condition.gvy new file mode 100644 index 000000000..e865965c7 --- /dev/null +++ b/jjb/cloud-infra/scripts/k8s-job-enable-condition.gvy @@ -0,0 +1 @@ +!('{environment-type}' == 'offline' && "${{DEPLOY_SCENARIO}}" in ['k8-eno-ovs', 'k8-calico-istio', 'k8-calico-eiffel', 'k8-calico-spinnaker']) \ No newline at end of file -- 2.25.1