Skip to content

Commit

Permalink
back-ports depoloy-deliverables pipeline
Browse files Browse the repository at this point in the history
.. in order to keep release workflow synchronized

Change-Id: I5ed166bb687e001a156348b26fe373c17712a43c
  • Loading branch information
Frans Fürst committed Jan 7, 2025
1 parent 2e2c451 commit 33cdb7e
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions buildscripts/scripts/deploy-to-website.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!groovy

/// file: deploy_to_website.groovy

def main() {
check_job_parameters([
["VERSION", true],
["CIPARAM_REMOVE_RC_CANDIDATES", true],
]);

check_environment_variables([
"WEB_DEPLOY_PORT",
"WEB_DEPLOY_URL",
]);

def versioning = load("${checkout_dir}/buildscripts/scripts/utils/versioning.groovy");
def artifacts_helper = load("${checkout_dir}/buildscripts/scripts/utils/upload_artifacts.groovy");

def cmk_version_rc_aware = versioning.get_cmk_version(
versioning.safe_branch_name(scm),
versioning.get_branch_version(checkout_dir),
params.VERSION
);

print(
"""
|===== CONFIGURATION ===============================
|VERSION:...................... │${params.VERSION}
|CIPARAM_REMOVE_RC_CANDIDATES:. │${params.CIPARAM_REMOVE_RC_CANDIDATES}
|cmk_version_rc_aware:......... │${cmk_version_rc_aware}
|WEB_DEPLOY_PORT:.............. │${env.WEB_DEPLOY_PORT}
|WEB_DEPLOY_URL:............... │${env.WEB_DEPLOY_URL}
|===================================================
""".stripMargin());

inside_container(ulimit_nofile: 1024) {
smart_stage(
name: "Deploy to website",
) {
artifacts_helper.deploy_to_website(
cmk_version_rc_aware
);
}
smart_stage(
name: "Cleanup RC candicates",
condition: params.CIPARAM_REMOVE_RC_CANDIDATES,
) {
artifacts_helper.cleanup_rc_candidates_of_version(
cmk_version_rc_aware
);
}
}
}

return this;

0 comments on commit 33cdb7e

Please sign in to comment.