Skip to content

Commit 8318e48

Browse files
authored
fix: agent mode fips script name (#85)
Signed-off-by: Nianyu Shen <[email protected]>
1 parent 01ed869 commit 8318e48

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.github/workflows/build.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,9 @@ jobs:
4040
- name: Build artifacts
4141
run: |
4242
earthly --ci --output +release --VERSION=${{ steps.version.outputs.version }}
43+
- name: Build FIPS artifacts
44+
run: |
45+
earthly --ci --output +release-fips --VERSION=${{ steps.version.outputs.version }}
46+
- name: List artifacts
47+
run: |
48+
ls -l build/*

Earthfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,19 @@ install-script:
107107
ARG IMAGE_REPO=${SPECTRO_PUB_REPO}/edge
108108
# https://github.com/spectrocloud/agent-mode/releases/download/v4.5.0-rc2/palette-agent-linux-amd64
109109
ARG AGENT_URL_PREFIX=https://github.com/spectrocloud/agent-mode/releases/download/${VERSION}
110+
IF $FIPS
111+
ARG SCRIPT_NAME=palette-agent-install-fips.sh
112+
ELSE
113+
ARG SCRIPT_NAME=palette-agent-install.sh
114+
END
110115

111116
ENV PE_VERSION=${PE_VERSION}
112117
ENV IMAGE_REPO=${IMAGE_REPO}
113118
ENV AGENT_URL_PREFIX=${AGENT_URL_PREFIX}
114119

115120
WORKDIR /workdir
116121
COPY palette-agent-install.sh.tmpl /workdir/palette-agent-install.sh.tmpl
117-
RUN envsubst '${PE_VERSION} ${IMAGE_REPO} ${AGENT_URL_PREFIX}' < /workdir/palette-agent-install.sh.tmpl > /workdir/palette-agent-install.sh
118-
RUN chmod +x /workdir/palette-agent-install.sh
122+
RUN envsubst '${PE_VERSION} ${IMAGE_REPO} ${AGENT_URL_PREFIX}' < /workdir/palette-agent-install.sh.tmpl > /workdir/${SCRIPT_NAME}
123+
RUN chmod +x /workdir/${SCRIPT_NAME}
119124

120-
SAVE ARTIFACT /workdir/palette-agent-install.sh AS LOCAL ./build/palette-agent-install.sh
125+
SAVE ARTIFACT /workdir/${SCRIPT_NAME} AS LOCAL ./build/${SCRIPT_NAME}

0 commit comments

Comments
 (0)