Skip to content

Commit

Permalink
trigger-cmk-build-chain: use smart_build() to bring upstream builds t…
Browse files Browse the repository at this point in the history
…o build description

.. and remove it from build-cmk-deliverables in order to have it in top level script instead

Change-Id: Ic2a1fd127dbfa1bcbbf21834e7824418f5b626d8
  • Loading branch information
Frans Fürst committed Jan 2, 2025
1 parent e7f2421 commit 593aacb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 27 deletions.
18 changes: 0 additions & 18 deletions buildscripts/scripts/build-cmk-deliverables.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,6 @@

import org.jenkinsci.plugins.pipeline.modeldefinition.Utils

def smart_build(Map args) {
def build_instance = build(args + [propagate: false]);
def result = build_instance.getResult();
currentBuild.description += """\
<br>triggered <b><a href=${build_instance.getAbsoluteUrl()}>
${build_instance.getFullProjectName()}
${build_instance.getDisplayName()}
<strong style='color:${result=="SUCCESS" ? "green":"red"}'>${build_instance.getResult()}</strong>
</a></b>
""".stripIndent();
if (result != "SUCCESS") {
if (result == "UNSTABLE") {
unstable("Build was unstable: ${build_instance.getAbsoluteUrl()}");
}
error("Build ${build_instance.getAbsoluteUrl()}: ${result}");
}
return build_instance;
}

/// Builds all artifacts used for a given Checkmk edition
def main() {
Expand Down
18 changes: 9 additions & 9 deletions buildscripts/scripts/trigger-cmk-build-chain.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def main() {
name: "Build Packages",
condition: true,
raiseOnError: false,) {
build(
smart_build(
job: "${base_folder}/build-cmk-packages",
parameters: job_parameters
);
Expand All @@ -109,7 +109,7 @@ def main() {
name: "Build CMK IMAGE",
condition: build_image,
raiseOnError: false,) {
build(
smart_build(
job: "${base_folder}/build-cmk-image",
parameters: job_parameters
);
Expand All @@ -121,7 +121,7 @@ def main() {
name: "Integration Test for Docker Container",
condition: run_image_tests,
raiseOnError: false,) {
build(
smart_build(
job: "${base_folder}/test-integration-docker",
parameters: job_parameters
);
Expand All @@ -132,7 +132,7 @@ def main() {
name: "Composition Test for Packages",
condition: run_comp_tests,
raiseOnError: false,) {
build(
smart_build(
job: "${base_folder}/test-composition",
parameters: job_parameters
);
Expand All @@ -143,12 +143,12 @@ def main() {
name: "System Tests for FIPS compliance",
condition: run_fips_tests,
raiseOnError: false,) {
build(
smart_build(
job: "${base_folder}/test-integration-fips",
parameters: job_parameters_common + job_parameters_fips,
wait: false,
);
build(
smart_build(
job: "${base_folder}/test-composition-fips",
parameters: job_parameters_common + job_parameters_fips,
wait: false,
Expand All @@ -161,7 +161,7 @@ def main() {
name: "Integration Test for Packages",
condition: run_int_tests,
raiseOnError: false,) {
build(
smart_build(
job: "${base_folder}/test-integration-packages",
parameters: job_parameters
);
Expand All @@ -171,7 +171,7 @@ def main() {
name: "Update Test",
condition: run_update_tests,
raiseOnError: false,) {
build(
smart_build(
job: "${base_folder}/test-update",
parameters: job_parameters
);
Expand All @@ -181,7 +181,7 @@ def main() {
name: "Trigger SaaS Gitlab jobs",
condition: success && edition == "saas",
raiseOnError: false,) {
build(
smart_build(
job: "${base_folder}/trigger-saas-gitlab",
parameters: job_parameters
);
Expand Down

0 comments on commit 593aacb

Please sign in to comment.