From 78f918905ddd21ff60a0100f269ac54cc81d7d9f Mon Sep 17 00:00:00 2001 From: Jonas Scharpf Date: Tue, 17 Dec 2024 14:53:49 +0100 Subject: [PATCH] Add job to trigger post submit test cascade of heavy jobs ... instead of using reverse triggers for slow jobs (more than 10 min) These jobs require a package build and would otherwise trigger several individual package builds with different commit SHAs CMK-20854 Change-Id: I001ae45fa415c674366a66b27ca344b719c92654 --- ...igger-post-submit-test-cascade-full.groovy | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 buildscripts/scripts/trigger-post-submit-test-cascade-full.groovy diff --git a/buildscripts/scripts/trigger-post-submit-test-cascade-full.groovy b/buildscripts/scripts/trigger-post-submit-test-cascade-full.groovy new file mode 100644 index 00000000000..bc1720a3235 --- /dev/null +++ b/buildscripts/scripts/trigger-post-submit-test-cascade-full.groovy @@ -0,0 +1,52 @@ +#!groovy + +/// file: trigger-post-submit-test-cascade-full.groovy + +/// Trigger post submit test cascade of heavy jobs + +def main() { + def all_heavy_jobs = [ + "trigger-build-upload-cmk-distro-package", + "test-gui-crawl-f12less", + "trigger-test-gui-e2e", + "test-integration-single-f12less", + "test-integration-single-f12less-redfish", + "test-composition-single-f12less", + "test-composition-single-f12less-cme", + "test-integration-single-f12less-cme", + ]; + + print( + """ + |===== CONFIGURATION =============================== + |all_heavy_jobs:........... │${all_heavy_jobs}│ + |checkout_dir:............. │${checkout_dir}│ + |=================================================== + """.stripMargin()); + + def build_for_parallel = [:]; + def base_folder = "${currentBuild.fullProjectName.split('/')[0..-2].join('/')}"; + + all_heavy_jobs.each { item -> + build_for_parallel[item] = { -> + stage(item) { + build( + job: "${base_folder}/${item}", + propagate: true, // Raise any errors + parameters: [ + string(name: "CUSTOM_GIT_REF", value: checkout_commit_id), + string(name: "CIPARAM_OVERRIDE_BUILD_NODE", value: CIPARAM_OVERRIDE_BUILD_NODE), + string(name: "CIPARAM_CLEANUP_WORKSPACE", value: CIPARAM_CLEANUP_WORKSPACE), + string(name: "CIPARAM_BISECT_COMMENT", value: CIPARAM_BISECT_COMMENT), + ], + ); + } + } + } + + stage('Trigger all heavy tests') { + parallel build_for_parallel; + } +} + +return this;