Skip to content

Commit

Permalink
build: fix build terraform/opentofu build pathing
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanhitt committed Apr 15, 2024
1 parent e62be88 commit 37eb622
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ RUN addgroup atlantis && \
# copy atlantis binary
COPY --from=builder /app/atlantis /usr/local/bin/atlantis
# copy terraform binaries
COPY --from=deps /usr/local/bin/terraform* /usr/local/bin/
COPY --from=deps /usr/local/bin/tofu* /usr/local/bin/
COPY --from=deps /usr/local/bin/tf/terraform* /usr/local/bin/
COPY --from=deps /usr/local/bin/opentofu/tofu* /usr/local/bin/
# copy dependencies
COPY --from=deps /usr/local/bin/conftest /usr/local/bin/conftest
COPY --from=deps /usr/bin/git-lfs /usr/bin/git-lfs
Expand Down Expand Up @@ -187,8 +187,8 @@ RUN useradd --create-home --user-group --shell /bin/bash atlantis && \
# copy atlantis binary
COPY --from=builder /app/atlantis /usr/local/bin/atlantis
# copy terraform binaries
COPY --from=deps /usr/local/bin/terraform* /usr/local/bin/
COPY --from=deps /usr/local/bin/tofu* /usr/local/bin/
COPY --from=deps /usr/local/bin/tf/terraform* /usr/local/bin/
COPY --from=deps /usr/local/bin/opentofu/tofu* /usr/local/bin/
# copy dependencies
COPY --from=deps /usr/local/bin/conftest /usr/local/bin/conftest
COPY --from=deps /usr/bin/git-lfs /usr/bin/git-lfs
Expand Down
8 changes: 4 additions & 4 deletions scripts/download-release.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/sh
COMMAND_NAME=${1:-terraform}
TARGETPLATFORM=${2:-"linux/amd64"}
DEFAULT_VERSION=${3:-"1.6.2"}
AVAILABLE_VERSIONS=${4:-"1.6.2"}
DEFAULT_VERSION=${3:-"1.8.0"}
AVAILABLE_VERSIONS=${4:-"1.8.0"}
case "${TARGETPLATFORM}" in
"linux/amd64") ARCH=amd64 ;;
"linux/arm64") ARCH=arm64 ;;
Expand All @@ -26,8 +26,8 @@ for VERSION in ${AVAILABLE_VERSIONS}; do
sed -n "/${COMMAND_NAME}_${VERSION}_linux_${ARCH}.zip/p" "${COMMAND_NAME}_${VERSION}_SHA256SUMS" | sha256sum -c
mkdir -p "${COMMAND_DIR}/${VERSION}"
unzip "${COMMAND_NAME}_${VERSION}_linux_${ARCH}.zip" -d "${COMMAND_DIR}/${VERSION}"
ln -s "${COMMAND_DIR}/${VERSION}/${COMMAND_NAME}" "${COMMAND_NAME}${VERSION}"
ln -s "${COMMAND_DIR}/${VERSION}/${COMMAND_NAME}" "${COMMAND_DIR}/${COMMAND_NAME}${VERSION}"
rm "${COMMAND_NAME}_${VERSION}_linux_${ARCH}.zip"
rm "${COMMAND_NAME}_${VERSION}_SHA256SUMS"
done
ln -s "${COMMAND_DIR}/${DEFAULT_VERSION}/${COMMAND_NAME}" "${COMMAND_NAME}"
ln -s "${COMMAND_DIR}/${DEFAULT_VERSION}/${COMMAND_NAME}" "${COMMAND_DIR}/${COMMAND_NAME}"

0 comments on commit 37eb622

Please sign in to comment.