mirror of https://github.com/milvus-io/milvus.git
Cleanup workspace after jenkins ci build (#5850)
Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>pull/5867/head
parent
676a30e418
commit
5b85bda30f
|
@ -6,7 +6,10 @@ pipeline {
|
|||
timestamps()
|
||||
timeout(time: 30, unit: 'MINUTES')
|
||||
buildDiscarder logRotator(artifactDaysToKeepStr: '30')
|
||||
// This is required if you want to clean before build
|
||||
skipDefaultCheckout(true)
|
||||
// parallelsAlwaysFailFast()
|
||||
|
||||
}
|
||||
stages {
|
||||
stage ('E2E Test') {
|
||||
|
@ -33,6 +36,7 @@ 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"
|
||||
}
|
||||
stages {
|
||||
|
@ -76,6 +80,11 @@ 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'
|
||||
}
|
||||
cleanWs(cleanWhenNotBuilt: false,
|
||||
deleteDirs: true,
|
||||
disableDeferredWipeout: true,
|
||||
notFailBuild: true,
|
||||
patterns: [[pattern: '.gitignore', type: 'INCLUDE']])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,8 @@ pipeline {
|
|||
timestamps()
|
||||
timeout(time: 1, unit: 'HOURS')
|
||||
buildDiscarder logRotator(artifactDaysToKeepStr: '30')
|
||||
// This is required if you want to clean before build
|
||||
skipDefaultCheckout(true)
|
||||
// parallelsAlwaysFailFast()
|
||||
}
|
||||
stages {
|
||||
|
@ -40,6 +42,7 @@ 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"
|
||||
|
@ -99,6 +102,11 @@ 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'
|
||||
}
|
||||
cleanWs(cleanWhenNotBuilt: false,
|
||||
deleteDirs: true,
|
||||
disableDeferredWipeout: true,
|
||||
notFailBuild: true,
|
||||
patterns: [[pattern: '.gitignore', type: 'INCLUDE']])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,8 @@ pipeline {
|
|||
options {
|
||||
timestamps()
|
||||
timeout(time: 30, unit: 'MINUTES')
|
||||
// This is required if you want to clean before build
|
||||
skipDefaultCheckout(true)
|
||||
// parallelsAlwaysFailFast()
|
||||
}
|
||||
|
||||
|
@ -53,4 +55,17 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
container('main') {
|
||||
script {
|
||||
cleanWs(cleanWhenNotBuilt: false,
|
||||
deleteDirs: true,
|
||||
disableDeferredWipeout: true,
|
||||
notFailBuild: true,
|
||||
patterns: [[pattern: '.gitignore', type: 'INCLUDE']])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue