Skip to content

Commit

Permalink
[CI] avoid a failures with the post-archiving step (#24567)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Mar 17, 2021
1 parent aec4d04 commit 1d30493
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -699,14 +699,19 @@ def archiveTestOutput(Map args = [:]) {
if (isUnix()) {
fixPermissions("${WORKSPACE}")
}
cmd(label: 'Prepare test output', script: 'python .ci/scripts/pre_archive_test.py')
// Remove pycache directory and go vendors cache folders
if (isUnix()) {
dir('build') {
sh(label: 'Delete folders that are causing exceptions (See JENKINS-58421)', returnStatus: true,
script: 'rm -rf ve || true; find . -type d -name vendor -exec rm -r {} \\;')
}
} else {
bat(label: 'Delete ve folder', returnStatus: true,
script: 'FOR /d /r . %%d IN ("ve") DO @IF EXIST "%%d" rmdir /s /q "%%d"')
}
cmd(label: 'Prepare test output', script: 'python .ci/scripts/pre_archive_test.py', returnStatus: true)
dir('build') {
if (isUnix()) {
cmd(label: 'Delete folders that are causing exceptions (See JENKINS-58421)',
returnStatus: true,
script: 'rm -rf ve || true; find . -type d -name vendor -exec rm -r {} \\;')
} else { log(level: 'INFO', text: 'Delete folders that are causing exceptions (See JENKINS-58421) is disabled for Windows.') }
junit(allowEmptyResults: true, keepLongStdio: true, testResults: args.testResults)
junit(allowEmptyResults: true, keepLongStdio: true, testResults: args.testResults)
if (args.upload) {
tarAndUploadArtifacts(file: "test-build-artifacts-${args.id}.tgz", location: '.')
}
Expand Down

0 comments on commit 1d30493

Please sign in to comment.