Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix warnings with wildcards and archive system-tests #18695

Merged
merged 28 commits into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9f725c1
ci: fix warnings with wildcards
v1v May 21, 2020
ecceee2
ci: use make as a wrapper and python as the implementation
v1v May 27, 2020
a9c95d9
ci: support windows
v1v May 27, 2020
3f2c1bc
fix: autopep8 lint
v1v May 27, 2020
809b906
fix symlinks, permissions and use python instead make
v1v May 28, 2020
b66aa23
more verbose, skip some folders that causes issues in windows
v1v May 28, 2020
660ddd1
Support multiplatform and overriide copy_tree to filter problematic f…
v1v May 29, 2020
594eb00
platform agnostic
v1v May 29, 2020
f5c4ad8
comment to support system-tests
v1v May 29, 2020
57541c3
prepare context to filter what to archive
v1v May 29, 2020
dc124f5
refactor and support system-tests search for Linux
v1v May 29, 2020
714c8ed
Support system-tests archiving in windows
v1v May 29, 2020
324870c
fix: script path
v1v May 29, 2020
8605d36
Force where to look for
v1v May 29, 2020
7de9a9c
Update .ci/scripts/pre_archive_test.py
v1v Jun 2, 2020
8b737da
ci: use cmd step
v1v Jun 2, 2020
5150beb
ci: rephrase a bit the docs
v1v Jun 2, 2020
b6606c4
Update Jenkinsfile
v1v Jun 3, 2020
ee7f570
fix: use hardcode paths
v1v Jun 3, 2020
fd04fee
Merge remote-tracking branch 'upstream/master' into feature/fix-warni…
v1v Jun 12, 2020
6557388
ci: cosmetic change in the log
v1v Jun 12, 2020
bd8d0d5
fix: the evil regex in groovy with backslashes
v1v Jun 12, 2020
626840d
Revert "fix: use hardcode paths"
v1v Jun 12, 2020
6af8dfb
Support OS in the name of the archived files
v1v Jun 12, 2020
1a069b1
Merge remote-tracking branch 'upstream/master' into feature/fix-warni…
v1v Jun 15, 2020
f7a03a6
ci: platform agnostic
v1v Jun 15, 2020
1838113
ci: fix the script approval for File.Separator
v1v Jun 15, 2020
cf807c2
Merge remote-tracking branch 'upstream/master' into feature/fix-warni…
v1v Jul 20, 2020
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
34 changes: 34 additions & 0 deletions .ci/scripts/pre_archive_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env python3

import os
import distutils
from distutils import dir_util
cachedout marked this conversation as resolved.
Show resolved Hide resolved

# Support filtering in the distutils.dir_util.copy_tree
ORIG_COPY_TREE = distutils.dir_util.copy_tree


def my_copy_tree(src, *args, **kwargs):
'''function my_copy_tree
Override distutils.dir_util.copy_tree to filter the system-tests
'''
if src.endswith('system-tests'):
return []
return ORIG_COPY_TREE(src, *args, **kwargs)


distutils.dir_util.copy_tree = my_copy_tree

if __name__ == "__main__":

if not os.path.exists('build'):
os.makedirs('build')

# Top level folders to be excluded
EXCLUDE = set(['.ci', '.git', '.github', 'vendor', 'dev-tools'])
for root, dirs, files in os.walk('.'):
dirs[:] = [d for d in dirs if d not in EXCLUDE]
if root.endswith(('build')) and not root.startswith(('./build')):
v1v marked this conversation as resolved.
Show resolved Hide resolved
dest = os.path.join('build', root.replace(".{}".format(os.sep), ''))
print("Copy {} into {}".format(root, dest))
distutils.dir_util.copy_tree(root, dest, preserve_symlinks=1)
15 changes: 11 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -848,8 +848,12 @@ def withBeatsEnv(boolean archive, Closure body) {
} finally {
if (archive) {
catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE') {
junitAndStore(allowEmptyResults: true, keepLongStdio: true, testResults: "**/build/TEST*.xml")
archiveArtifacts(allowEmptyArchive: true, artifacts: '**/build/TEST*.out')
fixPermissions("${WORKSPACE}")
sh(label: 'Prepare test output', script: 'python .ci/scripts/pre_archive_test.py')
dir('build') {
junitAndStore(allowEmptyResults: true, keepLongStdio: true, testResults: '**/build/TEST*.xml')
archiveArtifacts(allowEmptyArchive: true, artifacts: '**/build/TEST*.out')
}
}
}
reportCoverage()
Expand Down Expand Up @@ -882,8 +886,11 @@ def withBeatsEnvWin(Closure body) {
}
} finally {
catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE') {
junitAndStore(allowEmptyResults: true, keepLongStdio: true, testResults: "**\\build\\TEST*.xml")
archiveArtifacts(allowEmptyArchive: true, artifacts: '**\\build\\TEST*.out')
bat(label: 'Prepare test output', script: 'python .ci/scripts/pre_archive_test.py')
dir('build') {
junitAndStore(allowEmptyResults: true, keepLongStdio: true, testResults: "**\\build\\TEST*.xml")
archiveArtifacts(allowEmptyArchive: true, artifacts: '**\\build\\TEST*.out')
}
}
}
}
Expand Down