summaryrefslogtreecommitdiffstats
path: root/vars/mergeJunitResults.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'vars/mergeJunitResults.groovy')
-rw-r--r--vars/mergeJunitResults.groovy9
1 files changed, 9 insertions, 0 deletions
diff --git a/vars/mergeJunitResults.groovy b/vars/mergeJunitResults.groovy
new file mode 100644
index 0000000..56495be
--- /dev/null
+++ b/vars/mergeJunitResults.groovy
@@ -0,0 +1,9 @@
+def request = libraryResource 'com/mycorp/pipeline/somelib/request.json'
+
+def call() {
+ tmpdir = env.TMPDIR ? env.TMPDIR : '.'
+ writeFile file:"${tmpdir}/merge-junit-results.py", text: libraryResource('merge-junit-results.py')
+ sh "python ${tmpdir}/merge-junit-results.py junit-*.xml >junit.xml"
+ sh 'rm junit-*.xml'
+ junit 'junit.xml'
+}