mirror of https://github.com/milvus-io/milvus.git
Add publish test images workflows
Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>pull/4973/head^2
parent
2a083328ee
commit
e30b18a8f1
|
@ -0,0 +1,56 @@
|
|||
name: Publish Test Images
|
||||
# TODO: do not trigger action for some document file update
|
||||
|
||||
# This workflow is triggered on pushes or pull request to the repository.
|
||||
on:
|
||||
push:
|
||||
# file paths to consider in the event. Optional; defaults to all.
|
||||
paths:
|
||||
- 'build/docker/env/**'
|
||||
- '.github/workflows/publish-test-images.yaml'
|
||||
pull_request:
|
||||
# file paths to consider in the event. Optional; defaults to all.
|
||||
paths:
|
||||
- 'build/docker/env/**'
|
||||
- '.github/workflows/publish-test-images.yaml'
|
||||
|
||||
jobs:
|
||||
publish-pytest-images:
|
||||
name: PyTest
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Check Dockerfile
|
||||
uses: reviewdog/action-hadolint@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
reporter: github-pr-check # Default is github-pr-check
|
||||
hadolint_ignore: DL3008
|
||||
- name: Get version from system time after release step
|
||||
id: extracter
|
||||
run: |
|
||||
echo "::set-output name=version::$(date +%Y%m%d)"
|
||||
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||
- name: Docker Pull
|
||||
shell: bash
|
||||
working-directory: build/docker/test
|
||||
run: |
|
||||
docker-compose pull --ignore-pull-failures regression_standalone
|
||||
- name: Docker Build
|
||||
shell: bash
|
||||
working-directory: build/docker/test
|
||||
run: |
|
||||
TARGET_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }} docker-compose build regression_standalone
|
||||
TARGET_TAG=latest docker-compose build regression_standalone
|
||||
- name: Docker Push
|
||||
if: success() && github.event_name == 'push' && github.repository == 'zilliztech/milvus-distributed'
|
||||
continue-on-error: true
|
||||
shell: bash
|
||||
working-directory: build/docker/test
|
||||
run: |
|
||||
docker login -u ${{ secrets.DOCKERHUB_USER }} \
|
||||
-p ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
TARGET_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }} docker-compose push regression_standalone
|
||||
TARGET_TAG=latest docker-compose push regression_standalone
|
|
@ -1,9 +1,9 @@
|
|||
timeout(time: 20, unit: 'MINUTES') {
|
||||
|
||||
sh '. ./scripts/before-install.sh && unset http_proxy && unset https_proxy && ./scripts/check_cache.sh -l $CCACHE_ARTFACTORY_URL --cache_dir=\$CCACHE_DIR -f ccache-\$OS_NAME-\$BUILD_ENV_IMAGE_ID.tar.gz || echo \"Ccache artfactory files not found!\"'
|
||||
sh '. ./scripts/before-install.sh && unset http_proxy && unset https_proxy && ./scripts/check_cache.sh -l $GO_CACHE_ARTFACTORY_URL --cache_dir=\$(go env GOCACHE) -f go-cache-\$OS_NAME-\$BUILD_ENV_IMAGE_ID.tar.gz || echo \"Go cache artfactory files not found!\"'
|
||||
sh '. ./scripts/before-install.sh && unset http_proxy && unset https_proxy && ./scripts/check_cache.sh -l $THIRDPARTY_ARTFACTORY_URL --cache_dir=$CUSTOM_THIRDPARTY_PATH -f thirdparty-download.tar.gz || echo \"Thirdparty artfactory files not found!\"'
|
||||
sh '. ./scripts/before-install.sh && unset http_proxy && unset https_proxy && ./scripts/check_cache.sh -l $GO_MOD_ARTFACTORY_URL --cache_dir=\$GOPATH/pkg/mod -f milvus-distributed-go-mod-\$(md5sum go.mod).tar.gz || echo \"Go mod artfactory files not found!\"'
|
||||
sh '. ./scripts/before-install.sh && ./scripts/check_cache.sh -l $CCACHE_ARTFACTORY_URL --cache_dir=\$CCACHE_DIR -f ccache-\$OS_NAME-\$BUILD_ENV_IMAGE_ID.tar.gz || echo \"Ccache artfactory files not found!\"'
|
||||
sh '. ./scripts/before-install.sh && ./scripts/check_cache.sh -l $GO_CACHE_ARTFACTORY_URL --cache_dir=\$(go env GOCACHE) -f go-cache-\$OS_NAME-\$BUILD_ENV_IMAGE_ID.tar.gz || echo \"Go cache artfactory files not found!\"'
|
||||
sh '. ./scripts/before-install.sh && ./scripts/check_cache.sh -l $THIRDPARTY_ARTFACTORY_URL --cache_dir=$CUSTOM_THIRDPARTY_PATH -f thirdparty-download.tar.gz || echo \"Thirdparty artfactory files not found!\"'
|
||||
sh '. ./scripts/before-install.sh && ./scripts/check_cache.sh -l $GO_MOD_ARTFACTORY_URL --cache_dir=\$GOPATH/pkg/mod -f milvus-distributed-go-mod-\$(md5sum go.mod).tar.gz || echo \"Go mod artfactory files not found!\"'
|
||||
|
||||
// Zero the cache statistics (but not the configuration options)
|
||||
sh 'ccache -z'
|
||||
|
@ -12,9 +12,9 @@ timeout(time: 20, unit: 'MINUTES') {
|
|||
|
||||
|
||||
withCredentials([usernamePassword(credentialsId: "${env.JFROG_CREDENTIALS_ID}", usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
|
||||
sh '. ./scripts/before-install.sh && unset http_proxy && unset https_proxy && ./scripts/update_cache.sh -l $CCACHE_ARTFACTORY_URL --cache_dir=\$CCACHE_DIR -f ccache-\$OS_NAME-\$BUILD_ENV_IMAGE_ID.tar.gz -u ${USERNAME} -p ${PASSWORD}'
|
||||
sh '. ./scripts/before-install.sh && unset http_proxy && unset https_proxy && ./scripts/update_cache.sh -l $GO_CACHE_ARTFACTORY_URL --cache_dir=\$(go env GOCACHE) -f go-cache-\$OS_NAME-\$BUILD_ENV_IMAGE_ID.tar.gz -u ${USERNAME} -p ${PASSWORD}'
|
||||
sh '. ./scripts/before-install.sh && unset http_proxy && unset https_proxy && ./scripts/update_cache.sh -l $THIRDPARTY_ARTFACTORY_URL --cache_dir=$CUSTOM_THIRDPARTY_PATH -f thirdparty-download.tar.gz -u ${USERNAME} -p ${PASSWORD}'
|
||||
sh '. ./scripts/before-install.sh && unset http_proxy && unset https_proxy && ./scripts/update_cache.sh -l $GO_MOD_ARTFACTORY_URL --cache_dir=\$GOPATH/pkg/mod -f milvus-distributed-go-mod-\$(md5sum go.mod).tar.gz -u ${USERNAME} -p ${PASSWORD}'
|
||||
sh '. ./scripts/before-install.sh && ./scripts/update_cache.sh -l $CCACHE_ARTFACTORY_URL --cache_dir=\$CCACHE_DIR -f ccache-\$OS_NAME-\$BUILD_ENV_IMAGE_ID.tar.gz -u ${USERNAME} -p ${PASSWORD}'
|
||||
sh '. ./scripts/before-install.sh && ./scripts/update_cache.sh -l $GO_CACHE_ARTFACTORY_URL --cache_dir=\$(go env GOCACHE) -f go-cache-\$OS_NAME-\$BUILD_ENV_IMAGE_ID.tar.gz -u ${USERNAME} -p ${PASSWORD}'
|
||||
sh '. ./scripts/before-install.sh && ./scripts/update_cache.sh -l $THIRDPARTY_ARTFACTORY_URL --cache_dir=$CUSTOM_THIRDPARTY_PATH -f thirdparty-download.tar.gz -u ${USERNAME} -p ${PASSWORD}'
|
||||
sh '. ./scripts/before-install.sh && ./scripts/update_cache.sh -l $GO_MOD_ARTFACTORY_URL --cache_dir=\$GOPATH/pkg/mod -f milvus-distributed-go-mod-\$(md5sum go.mod).tar.gz -u ${USERNAME} -p ${PASSWORD}'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,21 +1,6 @@
|
|||
version: '3.5'
|
||||
|
||||
services:
|
||||
regression:
|
||||
image: ${TARGET_REPO}/pytest:${TARGET_TAG}
|
||||
build:
|
||||
context: ../../../
|
||||
dockerfile: build/docker/test/Dockerfile
|
||||
cache_from:
|
||||
- ${SOURCE_REPO}/pytest:${SOURCE_TAG}
|
||||
volumes:
|
||||
- ../../..:/milvus-distributed:delegated
|
||||
working_dir: "/milvus-distributed/tests/python"
|
||||
command: >
|
||||
/bin/bash -c "pytest --ip proxynode -n 4"
|
||||
networks:
|
||||
- milvus
|
||||
|
||||
regression_distributed:
|
||||
image: ${TARGET_REPO}/pytest:${TARGET_TAG}
|
||||
build:
|
||||
|
|
|
@ -7,7 +7,6 @@ export CCACHE_COMPRESSLEVEL=${CCACHE_COMPRESSLEVEL:="5"}
|
|||
export CCACHE_COMPILERCHECK=${CCACHE_COMPILERCHECK:="content"}
|
||||
export CCACHE_MAXSIZE=${CCACHE_MAXSIZE:="2G"}
|
||||
export CCACHE_DIR=${CCACHE_DIR:="${HOME}/.ccache"}
|
||||
export http_proxy="http://proxy.zilliz.tech:1088"
|
||||
export https_proxy="http://proxy.zilliz.tech:1088"
|
||||
export GOPROXY="https://goproxy.cn"
|
||||
|
||||
set +ex
|
||||
|
|
Loading…
Reference in New Issue