From fd04cf1ead9521b1c371c7883ab96dab70739ab8 Mon Sep 17 00:00:00 2001 From: Nianyu Shen Date: Sun, 15 Dec 2024 21:41:27 -0800 Subject: [PATCH] fix: agent mode fips script name Signed-off-by: Nianyu Shen --- .github/workflows/build.yaml | 6 ++++++ Earthfile | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 495d365..28a7142 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -40,3 +40,9 @@ jobs: - name: Build artifacts run: | earthly --ci --output +release --VERSION=${{ steps.version.outputs.version }} + - name: Build FIPS artifacts + run: | + earthly --ci --output +release-fips --VERSION=${{ steps.version.outputs.version }} + - name: List artifacts + run: | + ls -l build/* diff --git a/Earthfile b/Earthfile index fc654b7..77b8075 100644 --- a/Earthfile +++ b/Earthfile @@ -107,6 +107,11 @@ install-script: ARG IMAGE_REPO=${SPECTRO_PUB_REPO}/edge # https://github.com/spectrocloud/agent-mode/releases/download/v4.5.0-rc2/palette-agent-linux-amd64 ARG AGENT_URL_PREFIX=https://github.com/spectrocloud/agent-mode/releases/download/${VERSION} + IF $FIPS + ARG SCRIPT_NAME=palette-agent-install-fips.sh + ELSE + ARG SCRIPT_NAME=palette-agent-install.sh + END ENV PE_VERSION=${PE_VERSION} ENV IMAGE_REPO=${IMAGE_REPO} @@ -114,7 +119,7 @@ install-script: WORKDIR /workdir COPY palette-agent-install.sh.tmpl /workdir/palette-agent-install.sh.tmpl - RUN envsubst '${PE_VERSION} ${IMAGE_REPO} ${AGENT_URL_PREFIX}' < /workdir/palette-agent-install.sh.tmpl > /workdir/palette-agent-install.sh - RUN chmod +x /workdir/palette-agent-install.sh + RUN envsubst '${PE_VERSION} ${IMAGE_REPO} ${AGENT_URL_PREFIX}' < /workdir/palette-agent-install.sh.tmpl > /workdir/${SCRIPT_NAME} + RUN chmod +x /workdir/${SCRIPT_NAME} - SAVE ARTIFACT /workdir/palette-agent-install.sh AS LOCAL ./build/palette-agent-install.sh + SAVE ARTIFACT /workdir/${SCRIPT_NAME} AS LOCAL ./build/${SCRIPT_NAME}