From 1dee86668a4f79853ec7eade24d7e4f9429cc9e3 Mon Sep 17 00:00:00 2001 From: scito Date: Thu, 29 Dec 2022 01:48:00 +0100 Subject: [PATCH] rename ARG run_tests to RUN_TESTS --- .github/workflows/ci_docker.yml | 4 ++-- Dockerfile | 4 ++-- Dockerfile_no_qr_reader | 4 ++-- README.md | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci_docker.yml b/.github/workflows/ci_docker.yml index 3325793..666f62e 100644 --- a/.github/workflows/ci_docker.yml +++ b/.github/workflows/ci_docker.yml @@ -58,6 +58,8 @@ jobs: # build on feature branches, push only on master branch # TODO push: ${{ github.ref == 'refs/heads/master' }} push: true + build-args: | + RUN_TESTS=false - name: "qr_reader: Build image and push to Docker Hub and GitHub Container Registry" uses: docker/build-push-action@v2 @@ -72,8 +74,6 @@ jobs: # build on feature branches, push only on master branch # TODO push: ${{ github.ref == 'refs/heads/master' }} push: true - build-args: | - run_tests=false - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/Dockerfile b/Dockerfile index 896a0d5..a0a7d35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,11 @@ WORKDIR /extract COPY . . -ARG run_tests=true +ARG RUN_TESTS=true RUN apt-get update && apt-get install -y libzbar0 python3-opencv nano \ && pip install -r requirements.txt \ - && if [[ "$run_tests" == "true" ]]; then /extract/run_pytest.sh; else echo "Not running tests..."; fi + && if [[ "$RUN_TESTS" == "true" ]]; then /extract/run_pytest.sh; else echo "Not running tests..."; fi WORKDIR /files diff --git a/Dockerfile_no_qr_reader b/Dockerfile_no_qr_reader index e4fdd0b..cb6858e 100644 --- a/Dockerfile_no_qr_reader +++ b/Dockerfile_no_qr_reader @@ -4,14 +4,14 @@ WORKDIR /extract COPY . . -ARG run_tests=true +ARG RUN_TESTS=true RUN apk add --no-cache nano \ && echo "Arch: $(apk --print-arch)" \ && if [[ "$(apk --print-arch)" == "aarch64" ]]; then apk add --no-cache --virtual .build-deps gcc libc-dev python3-dev py3-setuptools zlib-dev jpeg-dev; fi \ && pip install protobuf qrcode Pillow \ && if [[ "$(apk --print-arch)" == "aarch64" ]]; then apk del .build-deps; fi \ - && if [[ "$run_tests" == "true" ]]; then /extract/run_pytest.sh test_extract_otp_secret_keys_pytest.py -k "not qreader" --relaxed; else echo "Not running tests..."; fi + && if [[ "$RUN_TESTS" == "true" ]]; then /extract/run_pytest.sh test_extract_otp_secret_keys_pytest.py -k "not qreader" --relaxed; else echo "Not running tests..."; fi WORKDIR /files diff --git a/README.md b/README.md index dd98f6d..c76545d 100644 --- a/README.md +++ b/README.md @@ -335,7 +335,7 @@ docker run --entrypoint /extract/run_pytest.sh --rm -v "$(pwd)":/files:ro extrac docker login -uscit0 docker build . -t extract_otp_secret_keys_no_qr_reader -f Dockerfile_no_qr_reader --pull -docker build . -t extract_otp_secret_keys_no_qr_reader -f Dockerfile_no_qr_reader --pull --build-arg run_tests=false +docker build . -t extract_otp_secret_keys_no_qr_reader -f Dockerfile_no_qr_reader --pull --build-arg RUN_TESTS=false docker run --entrypoint /extract/run_pytest.sh --rm -v "$(pwd)":/files:ro extract_otp_secret_keys_no_qr_reader docker run --entrypoint /extract/run_pytest.sh --rm -v "$(pwd)":/files:ro extract_otp_secret_keys_no_qr_reader test_extract_otp_secret_keys_pytest.py -k "not qreader" docker run --rm -v "$(pwd)":/files:ro extract_otp_secret_keys_no_qr_reader example_export.txt