mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-29 18:38:44 +08:00
Optimize building pytest image workflow (#6928)
Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>
This commit is contained in:
parent
8133bfc4cf
commit
2faa7d0376
2
.env
2
.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
|
||||
|
8
.github/workflows/publish-builder.yaml
vendored
8
.github/workflows/publish-builder.yaml
vendored
@ -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
|
||||
|
5
.github/workflows/publish-test-images.yaml
vendored
5
.github/workflows/publish-test-images.yaml
vendored
@ -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
|
||||
|
@ -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
|
||||
|
@ -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}
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user