Skip to content

Commit

Permalink
chore: switch to us-docker.pkg.dev for image repo
Browse files Browse the repository at this point in the history
Signed-off-by: Nianyu Shen <[email protected]>
  • Loading branch information
nianyush committed Oct 3, 2024
1 parent 31105a6 commit 7b9100f
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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" != "" ]
Expand Down Expand Up @@ -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 ./*
Expand Down

0 comments on commit 7b9100f

Please sign in to comment.