From 02e05de3e5b1545ab4ae5eb249989271c3f40c79 Mon Sep 17 00:00:00 2001 From: Sayali Gaikawad <61760125+gaiksaya@users.noreply.github.com> Date: Mon, 25 Sep 2023 16:23:34 -0700 Subject: [PATCH] Add check before triggering tests from distribution build jobs (#4068) Signed-off-by: Sayali Gaikawad --- .../distribution-build.jenkinsfile | 16 ++++++++-------- .../opensearch/distribution-build.jenkinsfile | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/jenkins/opensearch-dashboards/distribution-build.jenkinsfile b/jenkins/opensearch-dashboards/distribution-build.jenkinsfile index ec9630f6ee..f8224f8a9a 100644 --- a/jenkins/opensearch-dashboards/distribution-build.jenkinsfile +++ b/jenkins/opensearch-dashboards/distribution-build.jenkinsfile @@ -182,8 +182,8 @@ pipeline { parallel([ 'integ-test': { - Boolean skipIntegTests = INTEG_TEST_JOB_NAME == '' - echo "${skipIntegTests ? 'Skipping integration tests' : 'Running integration tests'}" + Boolean skipIntegTests = (INTEG_TEST_JOB_NAME == '' || TEST_MANIFEST == '' || buildManifestUrl == '' || buildManifestUrlOpenSearch == '') + echo "${skipIntegTests ? 'Skipping integration tests as one of the values has empty string: INTEG_TEST_JOB_NAME, TEST_MANIFEST, buildManifestUrl, buildManifestUrlOpenSearch' : 'Running integration tests'}" if (!skipIntegTests) { def integTestResults = build job: INTEG_TEST_JOB_NAME, @@ -197,8 +197,8 @@ pipeline { } }, 'bwc-test': { - Boolean skipBwcTests = BWC_TEST_JOB_NAME == '' - echo "${skipBwcTests ? 'Skipping BWC tests' : 'Running BWC tests'}" + Boolean skipBwcTests = (BWC_TEST_JOB_NAME == '' || TEST_MANIFEST == '' || buildManifestUrl == '') + echo "${skipBwcTests ? 'Skipping BWC tests as one of the values has empty string: BWC_TEST_JOB_NAME, TEST_MANIFEST, buildManifestUrl' : 'Running BWC tests'}" if (!skipBwcTests) { def bwcTestResults = build job: BWC_TEST_JOB_NAME, @@ -492,8 +492,8 @@ pipeline { parallel([ 'integ-test': { - Boolean skipIntegTests = INTEG_TEST_JOB_NAME == '' - echo "${skipIntegTests ? 'Skipping integration tests' : 'Running integration tests'}" + Boolean skipIntegTests = (INTEG_TEST_JOB_NAME == ''|| TEST_MANIFEST == '' || buildManifestUrl == '' || buildManifestUrlOpenSearch == '') + echo "${skipIntegTests ? 'Skipping integration tests as one of the values has empty string:INTEG_TEST_JOB_NAME, TEST_MANIFEST, buildManifestUrl, buildManifestUrlOpenSearch' : 'Running integration tests'}" if (!skipIntegTests) { def integTestResults = build job: INTEG_TEST_JOB_NAME, @@ -507,8 +507,8 @@ pipeline { } }, 'bwc-test': { - Boolean skipBwcTests = BWC_TEST_JOB_NAME == '' - echo "${skipBwcTests ? 'Skipping BWC tests' : 'Running BWC tests'}" + Boolean skipBwcTests = (BWC_TEST_JOB_NAME == ''|| TEST_MANIFEST == '' || buildManifestUrl == '') + echo "${skipBwcTests ? 'Skipping BWC tests as one of the values has empty string: BWC_TEST_JOB_NAME, TEST_MANIFEST, buildManifestUrl' : 'Running BWC tests'}" if (!skipBwcTests) { def bwcTestResults = build job: BWC_TEST_JOB_NAME, diff --git a/jenkins/opensearch/distribution-build.jenkinsfile b/jenkins/opensearch/distribution-build.jenkinsfile index 8462935eac..3d2b07e7b3 100644 --- a/jenkins/opensearch/distribution-build.jenkinsfile +++ b/jenkins/opensearch/distribution-build.jenkinsfile @@ -310,8 +310,8 @@ pipeline { parallel([ 'integ-test': { - Boolean skipIntegTests = INTEG_TEST_JOB_NAME == '' - echo "${skipIntegTests ? 'Skipping integration tests' : 'Running integration tests'}" + Boolean skipIntegTests = (INTEG_TEST_JOB_NAME == '' || TEST_MANIFEST == '' || buildManifestUrl == '') + echo "${skipIntegTests ? 'Skipping integration tests as one of the values has empty string: INTEG_TEST_JOB_NAME, TEST_MANIFEST, buildManifestUrl' : 'Running integration tests'}" if (!skipIntegTests) { def integTestResults = build job: INTEG_TEST_JOB_NAME, @@ -324,8 +324,8 @@ pipeline { } }, 'bwc-test': { - Boolean skipBwcTests = BWC_TEST_JOB_NAME == '' - echo "${skipBwcTests ? 'Skipping BWC tests' : 'Running BWC tests'}" + Boolean skipBwcTests = (BWC_TEST_JOB_NAME == '' || TEST_MANIFEST == '' || buildManifestUrl == '') + echo "${skipBwcTests ? 'Skipping BWC tests as one of the values has empty string: BWC_TEST_JOB_NAME, TEST_MANIFEST, buildManifestUrl' : 'Running BWC tests'}" if (!skipBwcTests) { def bwcTestResults = build job: BWC_TEST_JOB_NAME, @@ -566,8 +566,8 @@ pipeline { parallel([ 'integ-test': { - Boolean skipIntegTests = INTEG_TEST_JOB_NAME == '' - echo "${skipIntegTests ? 'Skipping integration tests' : 'Running integration tests'}" + Boolean skipIntegTests = (INTEG_TEST_JOB_NAME == '' || TEST_MANIFEST == '' || buildManifestUrl == '') + echo "${skipIntegTests ? 'Skipping integration tests as one of the values has empty string: INTEG_TEST_JOB_NAME, TEST_MANIFEST, buildManifestUrl' : 'Running integration tests'}" if (!skipIntegTests) { def integTestResults = build job: INTEG_TEST_JOB_NAME,