Cache cpp thirdparty package (#5891)

Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>
This commit is contained in:
quicksilver 2021-06-19 13:28:07 +08:00 committed by GitHub
parent ab7f642740
commit d13cf2da2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 5 deletions

View File

@ -33,6 +33,7 @@ gid=$(id -g)
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/amd64-ubuntu18.04-ccache"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/amd64-ubuntu18.04-go-mod"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/amd64-ubuntu18.04-thirdparty"
chmod -R 777 "${DOCKER_VOLUME_DIRECTORY:-.docker}"
docker-compose pull --ignore-pull-failures ubuntu

View File

@ -34,7 +34,6 @@ pipeline {
SEMVER = "${BRANCH_NAME.contains('/') ? BRANCH_NAME.substring(BRANCH_NAME.lastIndexOf('/') + 1) : BRANCH_NAME}"
IMAGE_REPO = "dockerhub-mirror-sh.zilliz.cc/milvusdb"
DOCKER_BUILDKIT = 1
CUSTOM_THIRDPARTY_PATH = "/tmp/third_party"
ARTIFACTS = "${env.WORKSPACE}/artifacts"
MILVUS_HELM_BRANCH = "rename"
}
@ -49,7 +48,12 @@ pipeline {
standaloneEnabled = "false"
}
sh "MILVUS_STANDALONE_ENABLED=${standaloneEnabled} ./e2e-k8s.sh --node-image registry.zilliz.com/kindest/node:v1.20.2 --test-extra-arg \"--tags=smoke\""
sh """
MILVUS_STANDALONE_ENABLED=${standaloneEnabled} \
./e2e-k8s.sh \
--node-image registry.zilliz.com/kindest/node:v1.20.2 \
--test-extra-arg "--tags=smoke"
"""
}
}
}
@ -78,6 +82,12 @@ pipeline {
sh 'docker rm -f \$(docker network inspect -f \'{{ range \$key, \$value := .Containers }}{{ printf "%s " \$key}}{{ end }}\' kind) || true'
sh 'docker network rm kind 2>&1 > /dev/null || true'
}
}
}
}
cleanup {
container('main') {
script {
sh 'find . -name . -o -prune -exec rm -rf -- {} +' /* clean up our workspace */
}
}

View File

@ -40,7 +40,6 @@ pipeline {
SEMVER = "${BRANCH_NAME.contains('/') ? BRANCH_NAME.substring(BRANCH_NAME.lastIndexOf('/') + 1) : BRANCH_NAME}"
IMAGE_REPO = "dockerhub-mirror-sh.zilliz.cc/milvusdb"
DOCKER_BUILDKIT = 1
CUSTOM_THIRDPARTY_PATH = "/tmp/third_party"
ARTIFACTS = "${env.WORKSPACE}/artifacts"
DOCKER_CREDENTIALS_ID = "ba070c98-c8cc-4f7c-b657-897715f359fc"
DOKCER_REGISTRY_URL = "registry.zilliz.com"
@ -58,7 +57,11 @@ pipeline {
standaloneEnabled = "false"
}
sh "MILVUS_STANDALONE_ENABLED=${standaloneEnabled} ./e2e-k8s.sh --node-image registry.zilliz.com/kindest/node:v1.20.2"
sh """
MILVUS_STANDALONE_ENABLED=${standaloneEnabled} \
./e2e-k8s.sh \
--node-image registry.zilliz.com/kindest/node:v1.20.2
"""
}
}
}
@ -100,6 +103,12 @@ pipeline {
sh 'docker rm -f \$(docker network inspect -f \'{{ range \$key, \$value := .Containers }}{{ printf "%s " \$key}}{{ end }}\' kind) || true'
sh 'docker network rm kind 2>&1 > /dev/null || true'
}
}
}
}
cleanup {
container('main') {
script {
sh 'find . -name . -o -prune -exec rm -rf -- {} +' /* clean up our workspace */
}
}

View File

@ -54,7 +54,7 @@ pipeline {
}
}
post {
always {
cleanup {
container('main') {
script {
sh 'find . -name . -o -prune -exec rm -rf -- {} +' /* clean up our workspace */

View File

@ -23,10 +23,12 @@ services:
PULSAR_ADDRESS: ${PULSAR_ADDRESS}
ETCD_ENDPOINTS: ${ETCD_ENDPOINTS}
MINIO_ADDRESS: ${MINIO_ADDRESS}
CUSTOM_THIRDPARTY_PATH: /tmp/thirdparty
volumes: &ubuntu-volumes
- .:/go/src/github.com/milvus-io/milvus:delegated
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-ubuntu${UBUNTU}-ccache:/ccache:delegated
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-ubuntu${UBUNTU}-go-mod:/go/pkg/mod:delegated
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-ubuntu${UBUNTU}-thirdparty:/tmp/thirdparty:delegated
- ${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-ubuntu${UBUNTU}-vscode-extensions:/home/milvus/.vscode-server/extensions:delegated
working_dir: "/go/src/github.com/milvus-io/milvus"
# Command

View File

@ -52,6 +52,7 @@ pushd "$ROOT_DIR"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/amd64-ubuntu18.04-ccache"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/amd64-ubuntu18.04-go-mod"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/amd64-ubuntu18.04-thirdparty"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/amd64-ubuntu18.04-vscode-extensions"
chmod -R 777 "${DOCKER_VOLUME_DIRECTORY:-.docker}"