Skip to content
Merged
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
21 changes: 12 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -831,20 +831,23 @@ def archiveTestOutput(Map args = [:]) {
catchError(buildResult: 'SUCCESS', message: 'Failed to archive the build test results', stageResult: 'SUCCESS') {
withMageEnv(version: "${env.GO_VERSION}"){
dir(directory){
cmd(label: "Archive system tests files", script: 'mage packageSystemTests')
cmd(label: "Archive system tests files", script: 'mage packageSystemTests', returnStatus: true)
}
}

def fileName = 'build/system-tests-*.tar.gz' // see dev-tools/mage/target/common/package.go#PackageSystemTests method
def files = findFiles(glob: "${fileName}")
files.each { file ->
echo "${file.name}"

if (files?.length() > 0) {
googleStorageUploadExt(
bucket: "gs://${JOB_GCS_BUCKET}/${env.JOB_NAME}-${env.BUILD_ID}",
credentialsId: "${JOB_GCS_EXT_CREDENTIALS}",
pattern: "${fileName}",
sharedPublicly: true
)
} else {
log(level: 'WARN', text: "There are no system-tests files to upload Google Storage}")
}
googleStorageUploadExt(
bucket: "gs://${JOB_GCS_BUCKET}/${env.JOB_NAME}-${env.BUILD_ID}",
credentialsId: "${JOB_GCS_EXT_CREDENTIALS}",
pattern: "${fileName}",
sharedPublicly: true
)
}
}
}
Expand Down