From c04a319aa9fff9b033ac485a62eecb8f9078aa54 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Fri, 9 Apr 2021 11:29:28 +0200 Subject: [PATCH] ci: only abort on doc-change when running for PRs In case a job has been started without a PR (manual, or timed), the current checked out branch matches the original as there are not additional changes in the tree. There is no need to abort the jobs when the skip-doc-change.sh script did not detect any non-doc changes, as there are no changes at all. Updates: #1963 Signed-off-by: Niels de Vos --- ci-job-validation.groovy | 2 +- containerized-tests.groovy | 2 +- k8s-e2e-external-storage.groovy | 2 +- mini-e2e-helm.groovy | 2 +- mini-e2e.groovy | 2 +- upgrade-tests.groovy | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ci-job-validation.groovy b/ci-job-validation.groovy index 41ad22af5..17111e9be 100644 --- a/ci-job-validation.groovy +++ b/ci-job-validation.groovy @@ -40,7 +40,7 @@ node('cico-workspace') { returnStatus: true) } // if doc_change (return value of skip-doc-change.sh is 1, do not run the other stages - if (doc_change == 1) { + if (doc_change == 1 && ref != git_since) { currentBuild.result = 'SUCCESS' return } diff --git a/containerized-tests.groovy b/containerized-tests.groovy index 6ce1b3f71..4f1b7e81c 100644 --- a/containerized-tests.groovy +++ b/containerized-tests.groovy @@ -58,7 +58,7 @@ node('cico-workspace') { returnStatus: true) } // if doc_change (return value of skip-doc-change.sh is 1, do not run the other stages - if (doc_change == 1) { + if (doc_change == 1 && ref != git_since) { currentBuild.result = 'SUCCESS' return } diff --git a/k8s-e2e-external-storage.groovy b/k8s-e2e-external-storage.groovy index b5a3f80cd..36057c65c 100644 --- a/k8s-e2e-external-storage.groovy +++ b/k8s-e2e-external-storage.groovy @@ -68,7 +68,7 @@ node('cico-workspace') { returnStatus: true) } // if doc_change (return value of skip-doc-change.sh is 1, do not run the other stages - if (doc_change == 1) { + if (doc_change == 1 && ref != git_since) { currentBuild.result = 'SUCCESS' return } diff --git a/mini-e2e-helm.groovy b/mini-e2e-helm.groovy index 400e08ccd..babb86719 100644 --- a/mini-e2e-helm.groovy +++ b/mini-e2e-helm.groovy @@ -84,7 +84,7 @@ node('cico-workspace') { returnStatus: true) } // if doc_change (return value of skip-doc-change.sh is 1, do not run the other stages - if (doc_change == 1) { + if (doc_change == 1 && ref != git_since) { currentBuild.result = 'SUCCESS' return } diff --git a/mini-e2e.groovy b/mini-e2e.groovy index 30cc39246..0c3d85497 100644 --- a/mini-e2e.groovy +++ b/mini-e2e.groovy @@ -81,7 +81,7 @@ node('cico-workspace') { returnStatus: true) } // if doc_change (return value of skip-doc-change.sh is 1, do not run the other stages - if (doc_change == 1) { + if (doc_change == 1 && ref != git_since) { currentBuild.result = 'SUCCESS' return } diff --git a/upgrade-tests.groovy b/upgrade-tests.groovy index cfdb30669..9b4464ec7 100644 --- a/upgrade-tests.groovy +++ b/upgrade-tests.groovy @@ -81,7 +81,7 @@ node('cico-workspace') { returnStatus: true) } // if doc_change (return value of skip-doc-change.sh is 1, do not run the other stages - if (doc_change == 1) { + if (doc_change == 1 && ref != git_since) { currentBuild.result = 'SUCCESS' return }