Skip to content

Commit

Permalink
Refactor build-and-test.sh script
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Woffenden <[email protected]>
  • Loading branch information
Jacob Woffenden committed Feb 20, 2024
1 parent cb4badc commit f24b8ad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ if [[ "${REMOTE_CONTAINERS}" ]] && [[ "$(uname -m)" == "aarch64" ]]; then
echo "(⚠) This script builds linux/amd64 images which might take a long time or even fail."
export PLATFORM_FLAG="--platform linux/amd64"
fi
# shellcheck disable=SC2086 special case for PLATFORM_FLAG
# shellcheck disable=SC2086
# special case for PLATFORM_FLAG as it can't parse double quotes
docker build ${PLATFORM_FLAG} --file Dockerfile --tag "${IMAGE_TAG}" .

echo "Running container structure test for [ ${IMAGE_TAG} ]"

# shellcheck disable=SC2086 special case for PLATFORM_FLAG
# shellcheck disable=SC2086
# special case for PLATFORM_FLAG as it can't parse double quotes
docker run --rm ${PLATFORM_FLAG} \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "${PWD}:/workspace" \
Expand Down

0 comments on commit f24b8ad

Please sign in to comment.