diff --git a/projects/canonical/ubuntu/Makefile b/projects/canonical/ubuntu/Makefile index 35158cd213..fd00fdcc2f 100644 --- a/projects/canonical/ubuntu/Makefile +++ b/projects/canonical/ubuntu/Makefile @@ -7,7 +7,6 @@ REPO_OWNER=canonical RTOS_BUCKET_NAME?= RTOS_IMAGE_DATE=$(shell cat RTOS_IMAGE_DATE) RELEASE_BRANCH=1-29 -RTOS_SOURCE_URL=https://$(RTOS_BUCKET_NAME).s3.us-west-2.amazonaws.com/ubuntu/jammy/$(RTOS_IMAGE_DATE)/ubuntu-jammy-eks-anywhere-pro-realtime-minimal-amd64-eks-anywhere-$(RELEASE_BRANCH)-pro-realtime.raw.gz HAS_S3_ARTIFACTS=true SIMPLE_CREATE_BINARIES=false @@ -35,7 +34,7 @@ s3-artifacts: download-rtos-image .PHONY: download-rtos-image download-rtos-image: - build/download_rtos_image.sh $(RTOS_SOURCE_URL) $(ARTIFACTS_PATH) + build/download_rtos_image.sh $(RTOS_BUCKET_NAME) $(RTOS_IMAGE_DATE) $(ARTIFACTS_PATH) $(RELEASE_BRANCH) ########### DO NOT EDIT ############################# diff --git a/projects/canonical/ubuntu/RTOS_IMAGE_DATE b/projects/canonical/ubuntu/RTOS_IMAGE_DATE index e82c2e6627..149499c544 100644 --- a/projects/canonical/ubuntu/RTOS_IMAGE_DATE +++ b/projects/canonical/ubuntu/RTOS_IMAGE_DATE @@ -1 +1 @@ -20240414 +20240624 diff --git a/projects/canonical/ubuntu/build/download_rtos_image.sh b/projects/canonical/ubuntu/build/download_rtos_image.sh index 0a3f578f17..ffd5e676d8 100755 --- a/projects/canonical/ubuntu/build/download_rtos_image.sh +++ b/projects/canonical/ubuntu/build/download_rtos_image.sh @@ -18,13 +18,15 @@ set -x set -o errexit set -o pipefail -RTOS_SOURCE_URL="${1?Specify first argument - source URL for the Ubuntu RTOS image}" -ARTIFACTS_PATH="${2?Specify second argument - artifacts path}" +RTOS_BUCKET_NAME="${1?Specify first argument - Ubuntu RTOS image bucket name}" +RTOS_IMAGE_DATE="${2?Specify second argument - Ubuntu RTOS image build date}" +ARTIFACTS_PATH="${3?Specify third argument - artifacts path}" +RELEASE_BRANCH="${4?Specify fourth argument - release branch}" function build::download::ubuntu::rtos::image(){ mkdir -p $ARTIFACTS_PATH - filename=$(basename $RTOS_SOURCE_URL) - curl -s $RTOS_SOURCE_URL -o $ARTIFACTS_PATH/ubuntu.gz + download_path=s3://$RTOS_BUCKET_NAME/ubuntu/jammy/$RTOS_IMAGE_DATE/ubuntu-jammy-eks-anywhere-pro-realtime-minimal-amd64-eks-anywhere-$RELEASE_BRANCH-pro-realtime.raw.gz + aws s3 cp $download_path $ARTIFACTS_PATH/ubuntu.gz } build::download::ubuntu::rtos::image