From 7b9100f01134c7920e8124d287654bfefef139b7 Mon Sep 17 00:00:00 2001 From: Nianyu Shen Date: Thu, 3 Oct 2024 01:06:11 -0700 Subject: [PATCH] chore: switch to us-docker.pkg.dev for image repo Signed-off-by: Nianyu Shen --- Earthfile | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/Earthfile b/Earthfile index f8b3b3d..5afb3f5 100644 --- a/Earthfile +++ b/Earthfile @@ -2,11 +2,17 @@ VERSION 0.6 ARG TARGETOS ARG TARGETARCH +ARG FIPS_ENABLED=false + # Default image repositories used in the builds. -ARG SPECTRO_PUB_REPO=gcr.io/spectro-images-public -ARG SPECTRO_LUET_REPO=gcr.io/spectro-dev-public -ARG KAIROS_BASE_IMAGE_URL=gcr.io/spectro-images-public -ARG ETCD_REPO=https://github.com/etcd-io +IF [ "$FIPS_ENABLED" = "true" ] + ARG SPECTRO_PUB_REPO=us-docker.pkg.dev/palette-images +ELSE + ARG SPECTRO_PUB_REPO=us-docker.pkg.dev/palette-images-fips +END + +ARG SPECTRO_LUET_REPO=$SPECTRO_PUB_REPO/edge +ARG KAIROS_BASE_IMAGE_URL=$SPECTRO_PUB_REPO/edge ARG LUET_PROJECT=luet-repo ARG ALPINE_TAG=3.20 ARG ALPINE_IMG=$SPECTRO_PUB_REPO/canvos/alpine:$ALPINE_TAG @@ -41,7 +47,7 @@ ARG DISABLE_SELINUX=true ARG CIS_HARDENING=false ARG UBUNTU_PRO_KEY -ARG FIPS_ENABLED=false + ARG HTTP_PROXY ARG HTTPS_PROXY ARG NO_PROXY @@ -100,14 +106,14 @@ END IF [ "$FIPS_ENABLED" = "true" ] ARG BIN_TYPE=vertex - ARG STYLUS_BASE=$SPECTRO_PUB_REPO/stylus-framework-fips-linux-$ARCH:$PE_VERSION - ARG STYLUS_PACKAGE_BASE=$SPECTRO_PUB_REPO/stylus-fips-linux-$ARCH:$PE_VERSION - ARG CLI_IMAGE=$SPECTRO_PUB_REPO/palette-edge-cli-fips-${TARGETARCH}:${PE_VERSION} + ARG STYLUS_BASE=$SPECTRO_PUB_REPO/edge/stylus-framework-fips-linux-$ARCH:$PE_VERSION + ARG STYLUS_PACKAGE_BASE=$SPECTRO_PUB_REPO/edge/stylus-fips-linux-$ARCH:$PE_VERSION + ARG CLI_IMAGE=$SPECTRO_PUB_REPO/edge/palette-edge-cli-fips-${TARGETARCH}:${PE_VERSION} ELSE ARG BIN_TYPE=palette - ARG STYLUS_BASE=$SPECTRO_PUB_REPO/stylus-framework-linux-$ARCH:$PE_VERSION - ARG STYLUS_PACKAGE_BASE=$SPECTRO_PUB_REPO/stylus-linux-$ARCH:$PE_VERSION - ARG CLI_IMAGE=$SPECTRO_PUB_REPO/palette-edge-cli-${TARGETARCH}:${PE_VERSION} + ARG STYLUS_BASE=$SPECTRO_PUB_REPO/edge/stylus-framework-linux-$ARCH:$PE_VERSION + ARG STYLUS_PACKAGE_BASE=$SPECTRO_PUB_REPO/edge/stylus-linux-$ARCH:$PE_VERSION + ARG CLI_IMAGE=$SPECTRO_PUB_REPO/edge/palette-edge-cli-${TARGETARCH}:${PE_VERSION} END IF [ "$CUSTOM_TAG" != "" ] @@ -577,15 +583,15 @@ stylus-package-image: kairos-provider-image: IF [ "$K8S_DISTRIBUTION" = "kubeadm" ] - ARG PROVIDER_BASE=$SPECTRO_PUB_REPO/kairos-io/provider-kubeadm:$KUBEADM_PROVIDER_VERSION + ARG PROVIDER_BASE=$SPECTRO_PUB_REPO/edge/kairos-io/provider-kubeadm:$KUBEADM_PROVIDER_VERSION ELSE IF [ "$K8S_DISTRIBUTION" = "kubeadm-fips" ] - ARG PROVIDER_BASE=$SPECTRO_PUB_REPO/kairos-io/provider-kubeadm-fips:$KUBEADM_PROVIDER_VERSION + ARG PROVIDER_BASE=$SPECTRO_PUB_REPO/edge/kairos-io/provider-kubeadm:$KUBEADM_PROVIDER_VERSION ELSE IF [ "$K8S_DISTRIBUTION" = "k3s" ] - ARG PROVIDER_BASE=$SPECTRO_PUB_REPO/kairos-io/provider-k3s:$K3S_PROVIDER_VERSION + ARG PROVIDER_BASE=$SPECTRO_PUB_REPO/edge/kairos-io/provider-k3s:$K3S_PROVIDER_VERSION ELSE IF [ "$K8S_DISTRIBUTION" = "rke2" ] && $FIPS_ENABLED - ARG PROVIDER_BASE=$SPECTRO_PUB_REPO/kairos-io/provider-rke2-fips:$RKE2_PROVIDER_VERSION + ARG PROVIDER_BASE=$SPECTRO_PUB_REPO/edge/kairos-io/provider-rke2:$RKE2_PROVIDER_VERSION ELSE IF [ "$K8S_DISTRIBUTION" = "rke2" ] - ARG PROVIDER_BASE=$SPECTRO_PUB_REPO/kairos-io/provider-rke2:$RKE2_PROVIDER_VERSION + ARG PROVIDER_BASE=$SPECTRO_PUB_REPO/edge/kairos-io/provider-rke2:$RKE2_PROVIDER_VERSION END FROM --platform=linux/${ARCH} $PROVIDER_BASE SAVE ARTIFACT ./*