未验证 提交 c633e579 编写于 作者: Q quicksilver 提交者: GitHub

Fix cleanup workspace bug for jenkins ci (#6780)

Signed-off-by: Nquicksilver <zhifeng.zhang@zilliz.com>
上级 21bc5810
......@@ -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 */
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册