From 03bb9e7251cc7548bb8d391d60cc96ce9030432c Mon Sep 17 00:00:00 2001 From: Jenny Li Date: Fri, 18 Feb 2022 11:35:49 +0800 Subject: [PATCH] Use stash instead of clone code multi times (#15618) Signed-off-by: Jenny Li --- build/ci/jenkins/PR.groovy | 9 +++++++++ build/ci/jenkins/qa/PR.groovy | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/build/ci/jenkins/PR.groovy b/build/ci/jenkins/PR.groovy index 97505d1aec..4840a5f897 100644 --- a/build/ci/jenkins/PR.groovy +++ b/build/ci/jenkins/PR.groovy @@ -91,6 +91,7 @@ pipeline { stage('Install') { steps { container('main') { + stash includes: 'tests/**', name: 'testCode', useDefaultExcludes: false dir ('tests/scripts') { script { sh 'printenv' @@ -138,9 +139,13 @@ pipeline { } } } + } } stage('E2E Test'){ + options { + skipDefaultCheckout() + } agent { kubernetes { label 'milvus-e2e-test-pr' @@ -152,6 +157,10 @@ pipeline { } steps { container('pytest') { + unstash('testCode') + script { + sh 'ls -lah' + } dir ('tests/scripts') { script { def release_name=sh(returnStdout: true, script: './get_release_name.sh') diff --git a/build/ci/jenkins/qa/PR.groovy b/build/ci/jenkins/qa/PR.groovy index 249d66be21..8d765889a6 100644 --- a/build/ci/jenkins/qa/PR.groovy +++ b/build/ci/jenkins/qa/PR.groovy @@ -12,6 +12,7 @@ pipeline { buildDiscarder logRotator(artifactDaysToKeepStr: '30') parallelsAlwaysFailFast() preserveStashes(buildCount: 5) + } agent { kubernetes { @@ -87,7 +88,9 @@ pipeline { stages { stage('Install') { steps { + container('main') { + stash includes: 'tests/**', name: 'testCode', useDefaultExcludes: false dir ('tests/scripts') { script { sh 'printenv' @@ -137,6 +140,10 @@ pipeline { } } stage('E2E Test'){ + options { + skipDefaultCheckout() + } + agent { kubernetes { label 'milvus-qa-e2e-test-pr' @@ -148,6 +155,10 @@ pipeline { } steps { container('pytest') { + unstash('testCode') + script { + sh 'ls -lah' + } dir ('tests/scripts') { script { def release_name=sh(returnStdout: true, script: './get_release_name.sh')