mirror of
https://github.com/flatcar/scripts.git
synced 2025-12-24 02:31:54 +01:00
Merge pull request #3482 from flatcar/tormath1/mirror
ci/release: copy secondary artifacts from bincache
This commit is contained in:
commit
2930d06948
@ -12,7 +12,6 @@ BUILDCACHE_SERVER="${BUILDCACHE_SERVER:-bincache.flatcar-linux.net}"
|
||||
BUILDCACHE_PATH_PREFIX="/srv/bincache"
|
||||
BUILDCACHE_USER="bincache"
|
||||
|
||||
RELEASES_SERVER="mirror.release.flatcar-linux.net"
|
||||
CONTAINER_REGISTRY="ghcr.io/flatcar"
|
||||
RELEASES_JSON_FEED="https://www.flatcar.org/releases-json/releases.json"
|
||||
|
||||
|
||||
@ -175,7 +175,27 @@ function copy_from_bincache_to_bucket() {
|
||||
docker.io/rclone/rclone:1.71.1 \
|
||||
--config "/opt/rclone.conf" \
|
||||
sync \
|
||||
--http-url "https://${BUILDCACHE_SERVER}/images/${arch}/${version}" :http: "r2:flatcar/${channel}/${arch}-usr/${version}" || { echo "ERROR: Skipping bucket copy due to failure" ; }
|
||||
--http-url "https://${BUILDCACHE_SERVER}/images/${arch}/${version}" :http: "r2:flatcar/${channel}/${arch}-usr/${version}" || { echo "ERROR: Skipping images copy to bucket due to failure" ; }
|
||||
|
||||
echo "Copying the binary packages from bincache to CloudFlare bucket"
|
||||
docker run --rm --net host \
|
||||
-v "${rclone_configuration_file}:/opt/rclone.conf:ro" \
|
||||
docker.io/rclone/rclone:1.71.1 \
|
||||
--config "/opt/rclone.conf" \
|
||||
sync \
|
||||
--http-url "https://${BUILDCACHE_SERVER}/boards/${arch}-usr/${version}" :http: "r2:flatcar/mirror/boards/${arch}-usr/${version}" || { echo "ERROR: Skipping binary packages copy to bucket due to failure" ; }
|
||||
|
||||
# Only copy once the 'containers' artifacts
|
||||
if [ "${arch}" = "amd64" ]; then
|
||||
echo "Copying SDK and packages containers from bincache to CloudFlare bucket"
|
||||
docker run --rm --net host \
|
||||
-v "${rclone_configuration_file}:/opt/rclone.conf:ro" \
|
||||
docker.io/rclone/rclone:1.71.1 \
|
||||
--config "/opt/rclone.conf" \
|
||||
sync \
|
||||
--http-url "https://${BUILDCACHE_SERVER}/containers/${version}" :http: "r2:flatcar/mirror/containers/${version}" || { echo "ERROR: Skipping containers copy (SDK / packages) to bucket due to failure" ; }
|
||||
fi
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
@ -200,6 +220,22 @@ function publish_sdk() {
|
||||
docker_image_from_registry_or_buildcache "${sdk_name}" "${docker_sdk_vernum}"
|
||||
docker push "${sdk_container_common_registry}/flatcar-sdk-${a}:${docker_sdk_vernum}"
|
||||
done
|
||||
|
||||
rclone_configuration_file="$(mktemp)"
|
||||
chmod 600 "${rclone_configuration_file}"
|
||||
|
||||
(
|
||||
trap "rm -f ${rclone_configuration_file}" EXIT
|
||||
echo "${RCLONE_CONFIGURATION_FILE}" | base64 --decode > "${rclone_configuration_file}"
|
||||
|
||||
echo "Copying the SDK from bincache to CloudFlare bucket"
|
||||
docker run --rm --net host \
|
||||
-v "${rclone_configuration_file}:/opt/rclone.conf:ro" \
|
||||
docker.io/rclone/rclone:1.71.1 \
|
||||
--config "/opt/rclone.conf" \
|
||||
sync \
|
||||
--http-url "https://${BUILDCACHE_SERVER}/sdk/amd64/${docker_sdk_vernum}" :http: "r2:flatcar/mirror/sdk/amd64/${docker_sdk_vernum}" || { echo "ERROR: Skipping SDK copy to bucket due to failure" ; }
|
||||
)
|
||||
}
|
||||
|
||||
function _release_build_impl() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user