release: sync alpha bincache assets to s3 bucket

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
Mathieu Tortuyaux 2025-08-12 12:37:58 +02:00
parent 2d53fd92a6
commit 222cd1e805
No known key found for this signature in database
GPG Key ID: AC5CCFB52545D9B8

View File

@ -91,6 +91,8 @@ function _inside_mantle() {
secret_to_file gcp_json_key_path "${GCP_JSON_KEY}" secret_to_file gcp_json_key_path "${GCP_JSON_KEY}"
google_release_credentials_file="" google_release_credentials_file=""
secret_to_file google_release_credentials_file "${GOOGLE_RELEASE_CREDENTIALS}" secret_to_file google_release_credentials_file "${GOOGLE_RELEASE_CREDENTIALS}"
rclone_configuration_file=""
secret_to_file rclone_configuration_file "${RCLONE_CONFIGURATION_FILE}"
for platform in aws azure; do for platform in aws azure; do
for arch in amd64 arm64; do for arch in amd64 arm64; do
@ -157,6 +159,16 @@ function _inside_mantle() {
) )
} }
function copy_from_bincache_to_bucket() {
local channel="${1}"
local arch="${2}"
local version="${3}"
rclone --config "${RCLONE_CONFIGURATION_FILE}" \
sync \
--http-url "https://${BUILDCACHE_SERVER}/images/${arch}/${version}" :http: "r2:flatcar/${channel}/${arch}/${version}"
}
function publish_sdk() { function publish_sdk() {
local docker_sdk_vernum="$1" local docker_sdk_vernum="$1"
local sdk_name="" local sdk_name=""
@ -217,6 +229,11 @@ function _release_build_impl() {
echo "====" echo "===="
echo "Done, now you can copy the images to Origin" echo "Done, now you can copy the images to Origin"
echo "====" echo "===="
echo "Experimental (i.e ignore if it fails) - copy the images to CloudFlare bucket for Alpha channel"
[[ "${CHANNEL}" != "alpha" ]] && exit 0
copy_from_bincache_to_bucket "${CHANNEL}" "${arch}" "${vernum}"
# Future: trigger copy to Origin in a secure way # Future: trigger copy to Origin in a secure way
# Future: trigger update payload signing # Future: trigger update payload signing
# Future: trigger website update # Future: trigger website update