mirror of https://github.com/milvus-io/milvus.git
Fix cleanup workspace bug for jenkins ci (#6780)
Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>pull/6783/head
parent
21bc5810c0
commit
c633e579a5
|
@ -86,6 +86,20 @@ pipeline {
|
|||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
container('main') {
|
||||
script {
|
||||
sh "./tests/scripts/export_logs.sh"
|
||||
dir("${env.ARTIFACTS}") {
|
||||
sh "find ./kind -path '*/history/*' -type f | xargs tar -zcvf artifacts-${PROJECT_NAME}-${MILVUS_SERVER_TYPE}-${SEMVER}-${env.BUILD_NUMBER}-${MILVUS_CLIENT}-e2e-logs.tar.gz --transform='s:^[^/]*/[^/]*/[^/]*/[^/]*/::g' || true"
|
||||
if ("${MILVUS_CLIENT}" == "pymilvus-orm") {
|
||||
sh "tar -zcvf artifacts-${PROJECT_NAME}-${MILVUS_SERVER_TYPE}-${MILVUS_CLIENT}-pytest-logs.tar.gz ./tests/pytest_logs --remove-files || true"
|
||||
}
|
||||
archiveArtifacts artifacts: "**.tar.gz", allowEmptyArchive: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
unsuccessful {
|
||||
container('jnlp') {
|
||||
script {
|
||||
|
@ -101,14 +115,6 @@ pipeline {
|
|||
cleanup {
|
||||
container('main') {
|
||||
script {
|
||||
sh "./tests/scripts/export_logs.sh"
|
||||
dir("${env.ARTIFACTS}") {
|
||||
sh "find ./kind -path '*/history/*' -type f | xargs tar -zcvf artifacts-${PROJECT_NAME}-${MILVUS_SERVER_TYPE}-${SEMVER}-${env.BUILD_NUMBER}-${MILVUS_CLIENT}-e2e-logs.tar.gz --transform='s:^[^/]*/[^/]*/[^/]*/[^/]*/::g' || true"
|
||||
if ("${MILVUS_CLIENT}" == "pymilvus-orm") {
|
||||
sh "tar -zcvf artifacts-${PROJECT_NAME}-${MILVUS_SERVER_TYPE}-${MILVUS_CLIENT}-pytest-logs.tar.gz ./tests/pytest_logs --remove-files || true"
|
||||
}
|
||||
archiveArtifacts artifacts: "**.tar.gz", allowEmptyArchive: true
|
||||
}
|
||||
sh "kind delete cluster --name kind -v9 || true"
|
||||
sh 'find . -name . -o -prune -exec rm -rf -- {} +' /* clean up our workspace */
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
cleanup {
|
||||
always {
|
||||
container('main') {
|
||||
script {
|
||||
sh "./tests/scripts/export_logs.sh"
|
||||
|
@ -134,6 +134,12 @@ pipeline {
|
|||
}
|
||||
archiveArtifacts artifacts: "**.tar.gz", allowEmptyArchive: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cleanup {
|
||||
container('main') {
|
||||
script {
|
||||
sh "kind delete cluster --name kind -v9 || true"
|
||||
sh 'find . -name . -o -prune -exec rm -rf -- {} +' /* clean up our workspace */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue