enhance: able to upload pytest logs when test is done (#36861)

https://github.com/milvus-io/milvus/pull/36842

---------

Signed-off-by: Yellow Shine <sammy.huang@zilliz.com>
pull/36873/head
yellow-shine 2024-10-15 11:49:23 +08:00 committed by GitHub
parent 6b9e28bc8f
commit f67f69a9c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 4 deletions

View File

@ -1,4 +1,4 @@
@Library('jenkins-shared-library@v0.53.0') _
@Library('jenkins-shared-library@v0.59.0') _
def pod = libraryResource 'io/milvus/pod/tekton-4am.yaml'
@ -50,7 +50,6 @@ pipeline {
steps {
container('tkn') {
script {
def job_name = tekton.run arch: 'amd64',
isPr: isPr,
gitMode: gitMode ,
@ -81,6 +80,9 @@ pipeline {
agent {
kubernetes {
cloud '4am'
// 'milvus' template defined a ephemeral volume used for pytest result archiving
// pvc name would be <pod-name>-volume-0
inheritFrom 'milvus'
yaml pod
}
}
@ -96,8 +98,11 @@ pipeline {
container('tkn') {
script {
def helm_release_name = get_helm_release_name milvus_deployment_option
// pvc name would be <pod-name>-volume-0, used for pytest result archiving
def pvc = env.JENKINS_AGENT_NAME + '-volume-0'
tekton.pytest helm_release_name: helm_release_name,
pvc: pvc,
milvus_helm_version: milvus_helm_chart_version,
ciMode: 'nightly',
milvus_image_tag: milvus_image_tag,
@ -128,6 +133,11 @@ pipeline {
build_id: env.BUILD_ID
}
}
container('jnlp') {
script {
tekton.archive_pytest_logs(milvus_deployment_option)
}
}
}
}
}

View File

@ -1,4 +1,4 @@
@Library('jenkins-shared-library@v0.57.0') _
@Library('jenkins-shared-library@v0.59.0') _
def pod = libraryResource 'io/milvus/pod/tekton-4am.yaml'
def milvus_helm_chart_version = '4.2.8'
@ -66,6 +66,9 @@ pipeline {
agent {
kubernetes {
cloud '4am'
// 'milvus' template defined a ephemeral volume used for pytest result archiving
// pvc name would be <pod-name>-volume-0
inheritFrom 'milvus'
yaml pod
}
}
@ -81,10 +84,13 @@ pipeline {
container('tkn') {
script {
def helm_release_name = get_helm_release_name milvus_deployment_option
// pvc name would be <pod-name>-volume-0, used for pytest result archiving
def pvc = env.JENKINS_AGENT_NAME + '-volume-0'
if (milvus_deployment_option == 'distributed-streaming-service') {
if (milvus_deployment_option == 'standalone-one-pod') {
try {
tekton.pytest helm_release_name: helm_release_name,
pvc: pvc,
milvus_helm_version: milvus_helm_chart_version,
ciMode: 'e2e',
milvus_image_tag: milvus_image_tag,
@ -97,6 +103,7 @@ pipeline {
}
} else {
tekton.pytest helm_release_name: helm_release_name,
pvc: pvc,
milvus_helm_version: milvus_helm_chart_version,
ciMode: 'e2e',
milvus_image_tag: milvus_image_tag,
@ -127,6 +134,11 @@ pipeline {
build_id: env.BUILD_ID
}
}
container('jnlp') {
script {
tekton.archive_pytest_logs(milvus_deployment_option)
}
}
}
}
}