File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,6 +91,8 @@ function _inside_mantle() {
9191 secret_to_file gcp_json_key_path " ${GCP_JSON_KEY} "
9292 google_release_credentials_file=" "
9393 secret_to_file google_release_credentials_file " ${GOOGLE_RELEASE_CREDENTIALS} "
94+ rclone_configuration_file=" "
95+ secret_to_file rclone_configuration_file " ${RCLONE_CONFIGURATION_FILE} "
9496
9597 for platform in aws azure; do
9698 for arch in amd64 arm64; do
@@ -157,6 +159,16 @@ function _inside_mantle() {
157159 )
158160}
159161
162+ function copy_from_bincache_to_bucket() {
163+ local channel=" ${1} "
164+ local arch=" ${2} "
165+ local version=" ${3} "
166+
167+ rclone --config " ${RCLONE_CONFIGURATION_FILE} " \
168+ sync \
169+ --http-url " https://${BUILDCACHE_SERVER} /images/${arch} /${version} " :http: " r2:flatcar/${channel} /${arch} /${version} "
170+ }
171+
160172function publish_sdk() {
161173 local docker_sdk_vernum=" $1 "
162174 local sdk_name=" "
@@ -217,6 +229,11 @@ function _release_build_impl() {
217229 echo " ===="
218230 echo " Done, now you can copy the images to Origin"
219231 echo " ===="
232+
233+ echo " Experimental (i.e ignore if it fails) - copy the images to CloudFlare bucket for Alpha channel"
234+ [[ " ${CHANNEL} " != " alpha" ]] && exit 0
235+ copy_from_bincache_to_bucket " ${CHANNEL} " " ${arch} " " ${vernum} "
236+
220237 # Future: trigger copy to Origin in a secure way
221238 # Future: trigger update payload signing
222239 # Future: trigger website update
You can’t perform that action at this time.
0 commit comments