Skip to content

Commit

Permalink
Post overview of triggered jobs from master to 2.3.0 for light and he…
Browse files Browse the repository at this point in the history
…avy cascade chain

CMK-21204

Change-Id: Id1a5e8d730503689a16905c549ebe5106a0faa8b
  • Loading branch information
JonasScharpf committed Jan 20, 2025
1 parent b6be317 commit 69190c0
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 46 deletions.
42 changes: 19 additions & 23 deletions buildscripts/scripts/trigger-post-submit-test-cascade-heavy.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/// Trigger post submit test cascade of heavy jobs

def main() {
def all_heavy_jobs = [
def job_names = [
"trigger-build-upload-cmk-distro-package",
"test-gui-crawl-f12less",
"test-gui-e2e-f12less",
Expand All @@ -18,34 +18,30 @@ def main() {
print(
"""
|===== CONFIGURATION ===============================
|all_heavy_jobs:........... │${all_heavy_jobs}
|checkout_dir:.............${checkout_dir}
|job_names:........... │${job_names}
|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),
],
);
}
currentBuild.result = parallel(
job_names.collectEntries { job_name ->
[("${job_name}") : {
stage("Trigger ${job_name}") {
smart_build(
job: "${base_folder}/${job_name}",
parameters: [
stringParam(name: "CUSTOM_GIT_REF", value: effective_git_ref),
stringParam(name: "CIPARAM_OVERRIDE_BUILD_NODE", value: CIPARAM_OVERRIDE_BUILD_NODE),
stringParam(name: "CIPARAM_CLEANUP_WORKSPACE", value: CIPARAM_CLEANUP_WORKSPACE),
stringParam(name: "CIPARAM_BISECT_COMMENT", value: CIPARAM_BISECT_COMMENT),
],
);
}
}]
}
}

stage('Trigger all heavy tests') {
parallel build_for_parallel;
}
).values().every { it } ? "SUCCESS" : "FAILURE";
}

return this;
42 changes: 19 additions & 23 deletions buildscripts/scripts/trigger-post-submit-test-cascade-light.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/// Trigger post submit test cascade of lightweight jobs

def main() {
def all_lightweight_jobs = [
def job_names = [
"test-python3-pylint",
"test-python3-bandit",
"test-agent-plugin-unit",
Expand All @@ -29,34 +29,30 @@ def main() {
print(
"""
|===== CONFIGURATION ===============================
|all_lightweight_jobs:..... │${all_lightweight_jobs}
|checkout_dir:.............${checkout_dir}
|job_names:..... │${job_names}
|checkout_dir:.. │${checkout_dir}
|===================================================
""".stripMargin());

def build_for_parallel = [:];
def base_folder = "${currentBuild.fullProjectName.split('/')[0..-2].join('/')}";

all_lightweight_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),
],
);
}
currentBuild.result = parallel(
job_names.collectEntries { job_name ->
[("${job_name}") : {
stage("Trigger ${job_name}") {
smart_build(
job: "${base_folder}/${job_name}",
parameters: [
stringParam(name: "CUSTOM_GIT_REF", value: effective_git_ref),
stringParam(name: "CIPARAM_OVERRIDE_BUILD_NODE", value: CIPARAM_OVERRIDE_BUILD_NODE),
stringParam(name: "CIPARAM_CLEANUP_WORKSPACE", value: CIPARAM_CLEANUP_WORKSPACE),
stringParam(name: "CIPARAM_BISECT_COMMENT", value: CIPARAM_BISECT_COMMENT),
],
);
}
}]
}
}

stage('Trigger all lightweight tests') {
parallel build_for_parallel;
}
).values().every { it } ? "SUCCESS" : "FAILURE";
}

return this;

0 comments on commit 69190c0

Please sign in to comment.