From 4b8e470a1230a281f90dfb376b9201aace965f99 Mon Sep 17 00:00:00 2001 From: Kiran Kilingar Nadumane Date: Tue, 14 May 2024 23:31:35 -0700 Subject: [PATCH] pass signing public key as arg --- Earthfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Earthfile b/Earthfile index 8dc816a..55c250d 100644 --- a/Earthfile +++ b/Earthfile @@ -33,6 +33,7 @@ ARG ISO_NAME=installer ARG K8S_DISTRIBUTION ARG CUSTOM_TAG ARG CLUSTERCONFIG +ARG SIGNING_PUBLIC_KEY ARG ARCH ARG DISABLE_SELINUX=true ARG CIS_HARDENING=true @@ -312,7 +313,10 @@ build-uki-iso: COPY --platform=linux/${ARCH} +luet/luet /overlay/luet COPY --if-exists content-*/*.zst /overlay/opt/spectrocloud/content/ - COPY --if-exists public-key /overlay/.signing-public-key + #check if signing public key is passed in + IF [ "$SIGNING_PUBLIC_KEY" != "" ] + COPY --if-exists "$SIGNING_PUBLIC_KEY" /overlay/.signing-public-key + END RUN if [ -n "$(ls /overlay/opt/spectrocloud/content/*.zst 2>/dev/null)" ]; then \ for file in /overlay/opt/spectrocloud/content/*.zst; do \ split --bytes=3GB --numeric-suffixes "$file" /overlay/opt/spectrocloud/content/$(basename "$file")_part; \ @@ -364,7 +368,11 @@ build-iso: COPY overlay/files-iso/ /overlay/ COPY --if-exists user-data /overlay/files-iso/config.yaml COPY --if-exists content-*/*.zst /overlay/opt/spectrocloud/content/ - COPY --if-exists public-key /overlay/.signing-public-key + + #check if signing public key is passed in + IF [ "$SIGNING_PUBLIC_KEY" != "" ] + COPY --if-exists "$SIGNING_PUBLIC_KEY" /overlay/.signing-public-key + END RUN if [ -n "$(ls /overlay/opt/spectrocloud/content/*.zst 2>/dev/null)" ]; then \ for file in /overlay/opt/spectrocloud/content/*.zst; do \ split --bytes=3GB --numeric-suffixes "$file" /overlay/opt/spectrocloud/content/$(basename "$file")_part; \