Skip to content

Commit

Permalink
PE-3394 ignore custom_tag if empty (#124)
Browse files Browse the repository at this point in the history
* add default value for custom_tag

Signed-off-by: Nianyu Shen <[email protected]>

* Update Earthfile with conditional logic for CUSTOM_TAG

Signed-off-by: Nianyu Shen <[email protected]>

* fix typo

Signed-off-by: Nianyu Shen <[email protected]>

---------

Signed-off-by: Nianyu Shen <[email protected]>
  • Loading branch information
nianyush authored Jan 10, 2024
1 parent 942f385 commit aede2e2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit aede2e2

Please sign in to comment.