Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci-automation/ci-config.env
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
38 changes: 37 additions & 1 deletion ci-automation/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

)
Comment thread
pothos marked this conversation as resolved.
}

Expand All @@ -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() {
Expand Down
Loading