-
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.
back-ports depoloy-deliverables pipeline
.. 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.
There are no files selected for viewing
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,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; |