Skip to content

Commit

Permalink
fix: agent mode fips script name (#85)
Browse files Browse the repository at this point in the history
Signed-off-by: Nianyu Shen <[email protected]>
  • Loading branch information
nianyush authored Dec 16, 2024
1 parent 01ed869 commit 8318e48
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
11 changes: 8 additions & 3 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,19 @@ 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}
ENV AGENT_URL_PREFIX=${AGENT_URL_PREFIX}

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}

0 comments on commit 8318e48

Please sign in to comment.