Skip to content

Commit

Permalink
enhance: able to upload pytest logs when test is done
Browse files Browse the repository at this point in the history
Signed-off-by: Yellow Shine <[email protected]>
  • Loading branch information
yellow-shine committed Oct 14, 2024
1 parent 44564f0 commit be847ef
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
14 changes: 12 additions & 2 deletions ci/jenkins/Nightly2.groovy
Original file line number Diff line number Diff line change
@@ -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'

Expand Down Expand Up @@ -50,7 +50,6 @@ pipeline {
steps {
container('tkn') {
script {

def job_name = tekton.run arch: 'amd64',
isPr: isPr,
gitMode: gitMode ,
Expand Down Expand Up @@ -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
}
}
Expand All @@ -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,
Expand Down Expand Up @@ -128,6 +133,11 @@ pipeline {
build_id: env.BUILD_ID
}
}
container('jnlp') {
script {
tekton.archive_pytest_logs(milvus_deployment_option)
}
}
}
}
}
Expand Down
14 changes: 13 additions & 1 deletion ci/jenkins/PR.groovy
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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
}
}
Expand All @@ -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') {
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,
Expand All @@ -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,
Expand Down Expand Up @@ -127,6 +134,11 @@ pipeline {
build_id: env.BUILD_ID
}
}
container('jnlp') {
script {
tekton.archive_pytest_logs(milvus_deployment_option)
}
}
}
}
}
Expand Down

0 comments on commit be847ef

Please sign in to comment.