From aede2e253b989779e103f92901f859c1913b2ae0 Mon Sep 17 00:00:00 2001 From: Nianyu Shen Date: Tue, 9 Jan 2024 23:42:37 -0800 Subject: [PATCH] PE-3394 ignore custom_tag if empty (#124) * add default value for custom_tag Signed-off-by: Nianyu Shen * Update Earthfile with conditional logic for CUSTOM_TAG Signed-off-by: Nianyu Shen * fix typo Signed-off-by: Nianyu Shen --------- Signed-off-by: Nianyu Shen --- Earthfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Earthfile b/Earthfile index 179b342..d716162 100644 --- a/Earthfile +++ b/Earthfile @@ -159,7 +159,11 @@ provider-image: # added PROVIDER_K8S_VERSION to fix missing image in ghcr.io/kairos-io/provider-* ARG K8S_VERSION=1.26.4 ARG IMAGE_REPO - ARG IMAGE_PATH=$IMAGE_REGISTRY/$IMAGE_REPO:$K8S_DISTRIBUTION-$K8S_VERSION-$PE_VERSION-$CUSTOM_TAG + IF [ "$CUSTOM_TAG" != "" ] + ARG IMAGE_PATH=$IMAGE_REGISTRY/$IMAGE_REPO:$K8S_DISTRIBUTION-$K8S_VERSION-$PE_VERSION-$CUSTOM_TAG + ELSE + ARG IMAGE_PATH=$IMAGE_REGISTRY/$IMAGE_REPO:$K8S_DISTRIBUTION-$K8S_VERSION-$PE_VERSION + END IF [ "$K8S_DISTRIBUTION" = "kubeadm" ] || [ "$K8S_DISTRIBUTION" = "kubeadm-fips" ] ARG BASE_K8S_VERSION=$K8S_VERSION @@ -347,7 +351,11 @@ iso-image: RUN rm -f /etc/ssh/ssh_host_* /etc/ssh/moduli RUN touch /etc/machine-id \ && chmod 444 /etc/machine-id - SAVE IMAGE palette-installer-image:$PE_VERSION-$CUSTOM_TAG + IF [ "$CUSTOM_TAG" != "" ] + SAVE IMAGE palette-installer-image:$PE_VERSION-$CUSTOM_TAG + ELSE + SAVE IMAGE palette-installer-image:$PE_VERSION + END OS_RELEASE: COMMAND