未验证 提交 5fdbe237 编写于 作者: Z zhuwenxing 提交者: GitHub

[skip e2e]Add export log step for first deployment (#17337)

Signed-off-by: Nzhuwenxing <wenxing.zhu@zilliz.com>
上级 e5f5d5e0
...@@ -217,7 +217,21 @@ pipeline { ...@@ -217,7 +217,21 @@ pipeline {
} }
} }
} }
stage ('Export log for first deployment') {
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
echo "get pod status"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME} || true"
echo "collecte logs"
sh "bash ../../scripts/export_log_k8s.sh ${env.NAMESPACE} ${env.RELEASE_NAME} k8s_log/${env.RELEASE_NAME}/first_deployment || echo 'export log failed'"
}
}
}
}
}
stage ('Restart Milvus') { stage ('Restart Milvus') {
options { options {
timeout(time: 15, unit: 'MINUTES') // timeout on this stage timeout(time: 15, unit: 'MINUTES') // timeout on this stage
...@@ -309,7 +323,7 @@ pipeline { ...@@ -309,7 +323,7 @@ pipeline {
echo "get pod status" echo "get pod status"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME} || true" sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME} || true"
echo "collecte logs" echo "collecte logs"
sh "bash ../../scripts/export_log_k8s.sh ${env.NAMESPACE} ${env.RELEASE_NAME} k8s_log/${env.RELEASE_NAME} || echo 'export log failed'" sh "bash ../../scripts/export_log_k8s.sh ${env.NAMESPACE} ${env.RELEASE_NAME} k8s_log/${env.RELEASE_NAME}/second_deployment || echo 'export log failed'"
echo "upload logs" echo "upload logs"
sh "tar -zcvf artifacts-${env.RELEASE_NAME}-logs.tar.gz k8s_log/ --remove-files || true" sh "tar -zcvf artifacts-${env.RELEASE_NAME}-logs.tar.gz k8s_log/ --remove-files || true"
archiveArtifacts artifacts: "artifacts-${env.RELEASE_NAME}-logs.tar.gz", allowEmptyArchive: true archiveArtifacts artifacts: "artifacts-${env.RELEASE_NAME}-logs.tar.gz", allowEmptyArchive: true
......
...@@ -219,6 +219,22 @@ pipeline { ...@@ -219,6 +219,22 @@ pipeline {
} }
} }
stage ('Export log for first deployment') {
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
echo "get pod status"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME} || true"
echo "collecte logs"
sh "bash ../../scripts/export_log_k8s.sh ${env.NAMESPACE} ${env.RELEASE_NAME} k8s_log/${env.RELEASE_NAME}/first_deployment || echo 'export log failed'"
}
}
}
}
}
stage ('Restart Milvus') { stage ('Restart Milvus') {
options { options {
timeout(time: 15, unit: 'MINUTES') // timeout on this stage timeout(time: 15, unit: 'MINUTES') // timeout on this stage
...@@ -307,7 +323,7 @@ pipeline { ...@@ -307,7 +323,7 @@ pipeline {
echo "get pod status" echo "get pod status"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME} || true" sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME} || true"
echo "collecte logs" echo "collecte logs"
sh "bash ../../scripts/export_log_k8s.sh ${env.NAMESPACE} ${env.RELEASE_NAME} k8s_log/${env.RELEASE_NAME} || echo 'export log failed'" sh "bash ../../scripts/export_log_k8s.sh ${env.NAMESPACE} ${env.RELEASE_NAME} k8s_log/${env.RELEASE_NAME}/second_deployment || echo 'export log failed'"
echo "upload logs" echo "upload logs"
sh "tar -zcvf artifacts-${env.RELEASE_NAME}-logs.tar.gz k8s_log/ --remove-files || true" sh "tar -zcvf artifacts-${env.RELEASE_NAME}-logs.tar.gz k8s_log/ --remove-files || true"
archiveArtifacts artifacts: "artifacts-${env.RELEASE_NAME}-logs.tar.gz", allowEmptyArchive: true archiveArtifacts artifacts: "artifacts-${env.RELEASE_NAME}-logs.tar.gz", allowEmptyArchive: true
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册