diff --git a/.env b/.env index d46934955d..d263c543e7 100644 --- a/.env +++ b/.env @@ -2,7 +2,7 @@ IMAGE_REPO=milvusdb IMAGE_ARCH=amd64 OS_NAME=ubuntu18.04 DATE_VERSION=20210715 -LATEST_DATE_VERSION=latest +LATEST_DATE_VERSION=20210715 MINIO_ADDRESS=minio:9000 PULSAR_ADDRESS=pulsar://pulsar:6650 ETCD_ENDPOINTS=etcd:2379 diff --git a/.github/workflows/publish-builder.yaml b/.github/workflows/publish-builder.yaml index e27678f14f..a49ddb10eb 100644 --- a/.github/workflows/publish-builder.yaml +++ b/.github/workflows/publish-builder.yaml @@ -36,12 +36,13 @@ jobs: - name: Docker Pull shell: bash run: | - DATE_VERSION=latest docker-compose pull --ignore-pull-failures builder + docker-compose pull --ignore-pull-failures builder - name: Docker Build shell: bash run: | - DATE_VERSION=latest docker-compose build builder DATE_VERSION=${{ steps.extracter.outputs.version }} docker-compose build builder + export LATEST_DATE_VERSION=${{ steps.extracter.outputs.version }} + DATE_VERSION=latest docker-compose build builder - name: Docker Push if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus' continue-on-error: true @@ -49,14 +50,15 @@ jobs: run: | docker login -u ${{ secrets.DOCKERHUB_USER }} \ -p ${{ secrets.DOCKERHUB_TOKEN }} - DATE_VERSION=latest docker-compose push builder DATE_VERSION=${{ steps.extracter.outputs.version }} docker-compose push builder + DATE_VERSION=latest docker-compose push builder - name: Update Builder Image Changes if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus' continue-on-error: true shell: bash run: | sed -i "s#^DATE_VERSION=.*#DATE_VERSION=${{ steps.extracter.outputs.version }}#g" .env + sed -i "s#^LATEST_DATE_VERSION=.*#LATEST_DATE_VERSION=${{ steps.extracter.outputs.version }}#g" .env git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" git add .env diff --git a/.github/workflows/publish-test-images.yaml b/.github/workflows/publish-test-images.yaml index e6a0acd6fa..759606bc72 100644 --- a/.github/workflows/publish-test-images.yaml +++ b/.github/workflows/publish-test-images.yaml @@ -35,13 +35,13 @@ jobs: shell: bash working-directory: tests/docker run: | - IMAGE_TAG=latest docker-compose pull --ignore-pull-failures pytest + docker-compose pull --ignore-pull-failures pytest - name: Docker Build shell: bash working-directory: tests/docker run: | - docker-compose pull --ignore-pull-failures pytest IMAGE_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }} docker-compose build pytest + export LATEST_IMAGE_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }} IMAGE_TAG=latest docker-compose build pytest - name: Docker Push if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus' @@ -61,6 +61,7 @@ jobs: working-directory: tests/docker run: | sed -i "s#^IMAGE_TAG=.*#IMAGE_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}#g" .env + sed -i "s#^LATEST_IMAGE_TAG=.*#LATEST_IMAGE_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}#g" .env git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" git add .env diff --git a/tests/docker/.env b/tests/docker/.env index 8e79aad012..fb6c2950b4 100644 --- a/tests/docker/.env +++ b/tests/docker/.env @@ -4,3 +4,4 @@ MILVUS_PYTEST_WORKSPACE=/milvus/tests/python_test MILVUS_PYTEST_LOG_PATH=/milvus/_artifacts/tests/pytest_logs IMAGE_REPO=milvusdb IMAGE_TAG=20210727-964af81 +LATEST_IMAGE_TAG=20210727-964af81 diff --git a/tests/docker/docker-compose.yml b/tests/docker/docker-compose.yml index a66fcc69d6..64d1e138c8 100644 --- a/tests/docker/docker-compose.yml +++ b/tests/docker/docker-compose.yml @@ -7,7 +7,7 @@ services: context: ../.. dockerfile: tests/docker/Dockerfile cache_from: - - ${IMAGE_REPO}/pytest:latest + - ${IMAGE_REPO}/pytest:${LATEST_IMAGE_TAG} shm_size: 2G environment: MILVUS_SERVICE_IP: ${MILVUS_SERVICE_IP} diff --git a/tests/scripts/e2e.sh b/tests/scripts/e2e.sh index e336f450cc..372ee6efd1 100755 --- a/tests/scripts/e2e.sh +++ b/tests/scripts/e2e.sh @@ -55,6 +55,10 @@ fi pushd "${ROOT}/tests/docker" docker-compose pull --ignore-pull-failures pytest + if [[ -z "${SKIP_CHECK_PYTEST_ENV:-}" ]]; then + docker-compose build pytest + fi + if [[ "${TEST_ENV:-}" =~ ^kind* ]]; then export PRE_EXIST_NETWORK="true" export PYTEST_NETWORK="kind"