Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 30 additions & 10 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,17 @@ def generateFunctionalTestStep(Map args = [:]){
}
tags += excludeNightlyTag

if (isPR() || isUpstreamTrigger(filter: 'PR-')) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#883 has not been backported, so, do we need it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, let's discard 6.8.x branch, as per #879

tags += pullRequestFilter
}
def workerLabels = "${platform} && immutable && docker"

return {
node("${platform} && immutable && docker") {
try {
deleteDir()
unstash 'source'
withGoEnv(version: "${GO_VERSION}"){
node("${workerLabels}") {
deleteDir()
unstash 'source'
withGoEnv(version: "${GO_VERSION}"){
try {
if(isInstalled(tool: 'docker', flag: '--version')) {
dockerLogin(secret: "${DOCKER_ELASTIC_SECRET}", registry: "${DOCKER_REGISTRY}")
}
Expand All @@ -333,12 +338,27 @@ def generateFunctionalTestStep(Map args = [:]){
}
}
}
}
} catch(e) {
error(e.toString())
} finally {
junit(allowEmptyResults: true, keepLongStdio: true, testResults: "${BASE_DIR}/outputs/TEST-*.xml")
} finally {
junit(allowEmptyResults: true, keepLongStdio: true, testResults: "${BASE_DIR}/outputs/TEST-*.xml")
archiveArtifacts allowEmptyArchive: true, artifacts: "${BASE_DIR}/outputs/TEST-*.xml"
tearDown(labels: workerLabels)
}
}
}
}
}

/**
* Tear down the setup for the static workers.
*/
def tearDown(Map args = [:]){
catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
dir("${BASE_DIR}"){
sh(label: 'Remove the entire module cache', script: 'go clean -modcache', returnStatus: true)
}
if (isStaticWorker(labels: args.labels)) {
dir("${WORKSPACE}") {
deleteDir()
}
}
}
Expand Down