-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add job to trigger post submit test cascade of lightweight jobs
... instead of using reverse triggers for fast jobs (less than 10 min) CMK-20854 Change-Id: I912c06b304cf09bcbec94dc56acab501678c973d
- Loading branch information
1 parent
8ecb9bb
commit 7e8ad7d
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
buildscripts/scripts/trigger-post-submit-test-cascade-light.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!groovy | ||
|
||
/// file: trigger-post-submit-test-cascade-light.groovy | ||
|
||
/// Trigger post submit test cascade of lightweight jobs | ||
|
||
def main() { | ||
def all_lightweight_jobs = [ | ||
"test-python3-pylint", | ||
"test-python3-ruff", | ||
"test-python3-bandit", | ||
"test-agent-plugin-unit", | ||
"test-python3-code-quality", | ||
"test-python3-format", | ||
"test-python3-typing", | ||
"test-bazel-lint", | ||
"test-bazel-format", | ||
"test-groovy-lint", | ||
"test-shellcheck_agents", | ||
"test-shell_format", | ||
"test-shell-unit", | ||
"test-python3-unit-all", | ||
]; | ||
|
||
print( | ||
""" | ||
|===== CONFIGURATION =============================== | ||
|all_lightweight_jobs:..... │${all_lightweight_jobs}│ | ||
|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), | ||
], | ||
); | ||
} | ||
} | ||
} | ||
|
||
stage('Trigger all lightweight tests') { | ||
parallel build_for_parallel; | ||
} | ||
} | ||
|
||
return this; |