diff --git a/projects/canonical/ubuntu/Help.mk b/projects/canonical/ubuntu/Help.mk new file mode 100644 index 0000000000..f6ee9d4f6e --- /dev/null +++ b/projects/canonical/ubuntu/Help.mk @@ -0,0 +1,51 @@ + + + +########### DO NOT EDIT ############################# +# To update call: make add-generated-help-block +# This is added to help document dynamic targets and support shell autocompletion + + +##@ Run in Docker Targets +run-in-docker/all-attributions: ## Run `all-attributions` in docker builder container +run-in-docker/all-attributions-checksums: ## Run `all-attributions-checksums` in docker builder container +run-in-docker/all-checksums: ## Run `all-checksums` in docker builder container +run-in-docker/attribution: ## Run `attribution` in docker builder container +run-in-docker/attribution-checksums: ## Run `attribution-checksums` in docker builder container +run-in-docker/binaries: ## Run `binaries` in docker builder container +run-in-docker/checksums: ## Run `checksums` in docker builder container +run-in-docker/clean: ## Run `clean` in docker builder container +run-in-docker/clean-go-cache: ## Run `clean-go-cache` in docker builder container +run-in-docker/validate-checksums: ## Run `validate-checksums` in docker builder container + +##@ Artifact Targets +tarballs: ## Create tarballs by calling build/lib/simple_create_tarballs.sh unless SIMPLE_CREATE_TARBALLS=false, then tarballs must be defined in project Makefile +s3-artifacts: # Prepare ARTIFACTS_PATH folder structure with tarballs/manifests/other items to be uploaded to s3 +upload-artifacts: # Upload tarballs and other artifacts from ARTIFACTS_PATH to S3 + +##@ Clean Targets +clean: ## Removes source and _output directory +clean-go-cache: ## Removes the GOMODCACHE AND GOCACHE folders + +##@Fetch Binary Targets +handle-dependencies: ## Download and extract TARs for each dependency listed in PROJECT_DEPENDENCIES + +##@ Helpers +help: ## Display this help +add-generated-help-block: ## Add or update generated help block to document project make file and support shell auto completion + +##@Update Helpers +start-docker-builder: ## Start long lived builder base docker container +stop-docker-builder: ## Clean up builder base docker container +run-buildkit-and-registry: ## Run buildkitd and a local docker registry as containers +stop-buildkit-and-registry: ## Stop the buildkitd and a local docker registry containers +generate: ## Update UPSTREAM_PROJECTS.yaml +update-go-mods: ## Update locally checked-in go sum to assist in vuln scanning +update-vendor-for-dep-patch: ## After bumping dep in go.mod file, uses generic vendor update script or one provided from upstream project +patch-for-dep-update: ## After bumping dep in go.mod file and updating vendor, generates patch +create-ecr-repos: ## Create repos in ECR for project images for local testing + +##@ Build Targets +build: ## Called via prow presubmit, calls `upload-artifacts` +release: ## Called via prow postsubmit + release jobs, calls `upload-artifacts` +########### END GENERATED ########################### diff --git a/projects/canonical/ubuntu/Makefile b/projects/canonical/ubuntu/Makefile new file mode 100644 index 0000000000..35158cd213 --- /dev/null +++ b/projects/canonical/ubuntu/Makefile @@ -0,0 +1,46 @@ +BASE_DIRECTORY:=$(abspath ../../../) +GIT_TAG=non-existent + +REPO=ubuntu +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 +SIMPLE_CREATE_TARBALLS=false +HAS_LICENSES=false +IMAGE_NAMES= + +REPO_NO_CLONE=true +GIT_CHECKOUT_TARGET=RTOS_IMAGE_DATE +FAKE_GIT_REPO_TARGET=.git + +EXCLUDE_FROM_CHECKSUMS_BUILDSPEC=true +EXCLUDE_FROM_UPGRADE_BUILDSPEC=true + +BUILD_TARGETS=upload-artifacts +RELEASE_TARGETS=upload-artifacts + +include $(BASE_DIRECTORY)/Common.mk + +$(FAKE_GIT_REPO_TARGET): + @git init + @git remote add origin https://github.com/aws/eks-anywhere-build-tooling.git + +s3-artifacts: download-rtos-image + +.PHONY: download-rtos-image +download-rtos-image: + build/download_rtos_image.sh $(RTOS_SOURCE_URL) $(ARTIFACTS_PATH) + + +########### DO NOT EDIT ############################# +# To update call: make add-generated-help-block +# This is added to help document dynamic targets and support shell autocompletion +# Run make help for a formatted help block with all targets +include Help.mk +########### END GENERATED ########################### diff --git a/projects/canonical/ubuntu/RTOS_IMAGE_DATE b/projects/canonical/ubuntu/RTOS_IMAGE_DATE new file mode 100644 index 0000000000..e82c2e6627 --- /dev/null +++ b/projects/canonical/ubuntu/RTOS_IMAGE_DATE @@ -0,0 +1 @@ +20240414 diff --git a/projects/canonical/ubuntu/build/download_rtos_image.sh b/projects/canonical/ubuntu/build/download_rtos_image.sh new file mode 100755 index 0000000000..0a3f578f17 --- /dev/null +++ b/projects/canonical/ubuntu/build/download_rtos_image.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +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}" + +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 +} + +build::download::ubuntu::rtos::image diff --git a/projects/canonical/ubuntu/expected_artifacts b/projects/canonical/ubuntu/expected_artifacts new file mode 100644 index 0000000000..5f222d5e6e --- /dev/null +++ b/projects/canonical/ubuntu/expected_artifacts @@ -0,0 +1,9 @@ +SHA256SUM +SHA256SUM.sha256 +SHA256SUM.sha512 +SHA512SUM +SHA512SUM.sha256 +SHA512SUM.sha512 +ubuntu.gz +ubuntu.gz.sha256 +ubuntu.gz.sha512 diff --git a/release/staging-build.yml b/release/staging-build.yml index 016d9c9e0c..13dc4925cc 100644 --- a/release/staging-build.yml +++ b/release/staging-build.yml @@ -186,6 +186,12 @@ batch: variables: PROJECT_PATH: projects/brancz/kube-rbac-proxy CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/brancz.kube-rbac-proxy + - identifier: canonical_ubuntu + env: + type: ARM_CONTAINER + compute-type: BUILD_GENERAL1_SMALL + variables: + PROJECT_PATH: projects/canonical/ubuntu - identifier: cert_manager_cert_manager env: type: ARM_CONTAINER