diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 57f77052d..ed912c4f9 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -47,7 +47,7 @@ jobs: - name: Test AMD image run: | DOCKER_PLATFORM="linux/amd64" DOCKER_IMAGE="$DOCKER_BUILD_REPOSITORY:amd-$SHORT_SHA" make docker-test - IMAGE_NAME=$DOCKER_BUILD_REPOSITORY:amd-$SHORT_SHA make docker-smoke-test + DOCKER_IMAGE=$DOCKER_BUILD_REPOSITORY:amd-$SHORT_SHA make docker-smoke-test - name: Push AMD image run: | # write to the build repository to cache for the publish-images job @@ -81,7 +81,7 @@ jobs: run: | # only run a subset of tests on ARM, since they take a long time with emulation DOCKER_PLATFORM="linux/arm64" DOCKER_IMAGE="$DOCKER_BUILD_REPOSITORY:arm-$SHORT_SHA" make docker-test TEST_NAME=partition/test_text.py - IMAGE_NAME=$DOCKER_BUILD_REPOSITORY:arm-$SHORT_SHA make docker-smoke-test + DOCKER_IMAGE=$DOCKER_BUILD_REPOSITORY:arm-$SHORT_SHA make docker-smoke-test - name: Push ARM image run: | # write to the build repository to cache for the publish-images job diff --git a/Makefile b/Makefile index a4b6f8077..7c1b5e331 100644 --- a/Makefile +++ b/Makefile @@ -205,4 +205,4 @@ docker-test: .PHONY: docker-smoke-test docker-smoke-test: - IMAGE_NAME=${DOCKER_IMAGE} ./scripts/docker-smoke-test.sh + DOCKER_IMAGE=${DOCKER_IMAGE} ./scripts/docker-smoke-test.sh diff --git a/scripts/docker-build.sh b/scripts/docker-build.sh index ff01ba02c..b21dfb21a 100755 --- a/scripts/docker-build.sh +++ b/scripts/docker-build.sh @@ -3,14 +3,14 @@ set -euo pipefail DOCKER_REPOSITORY="${DOCKER_REPOSITORY:-quay.io/unstructured-io/unstructured}" PIP_VERSION="${PIP_VERSION:-22.2.1}" -DOCKER_IMAGE_NAME="${DOCKER_IMAGE_NAME:-unstructured:dev}" +DOCKER_IMAGE="${DOCKER_IMAGE:-unstructured:dev}" DOCKER_BUILD_CMD=(docker buildx build --load -f Dockerfile \ --build-arg PIP_VERSION="$PIP_VERSION" \ --build-arg BUILDKIT_INLINE_CACHE=1 \ --progress plain \ --cache-from "$DOCKER_REPOSITORY":latest \ - -t "$DOCKER_IMAGE_NAME" .) + -t "$DOCKER_IMAGE" .) # only build for specific platform if DOCKER_BUILD_PLATFORM is set if [ -n "${DOCKER_BUILD_PLATFORM:-}" ]; then diff --git a/scripts/docker-smoke-test.sh b/scripts/docker-smoke-test.sh index 9581f9ba5..02e09c785 100755 --- a/scripts/docker-smoke-test.sh +++ b/scripts/docker-smoke-test.sh @@ -7,7 +7,7 @@ set -eux -o pipefail CONTAINER_NAME=unstructured-smoke-test -IMAGE_NAME="${IMAGE_NAME:-unstructured:latest}" +DOCKER_IMAGE="${DOCKER_IMAGE:-unstructured:dev}" # Change to the root of the repository SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) @@ -15,7 +15,7 @@ cd "$SCRIPT_DIR"/.. || exit 1 start_container() { echo Starting container "$CONTAINER_NAME" - docker run -dt --rm --name "$CONTAINER_NAME" "$IMAGE_NAME" + docker run -dt --rm --name "$CONTAINER_NAME" "$DOCKER_IMAGE" } await_container() {