You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2019/07/31 15:22:41 UTC
[maven] 01/01: IT archives
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch archives
in repository https://gitbox.apache.org/repos/asf/maven.git
commit 7593f4e573b1ef3591b4d2afc54da7789a642216
Author: tibordigana <ti...@apache.org>
AuthorDate: Wed Jul 31 17:22:07 2019 +0200
IT archives
---
Jenkinsfile | 42 ++++++++++++++++++++++++++++--------------
1 file changed, 28 insertions(+), 14 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index af9a395..e74f428 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -97,22 +97,28 @@ for (String os in runITsOses) {
bat "if exist apache-maven-dist.zip del /q apache-maven-dist.zip"
}
unstash 'dist'
- withMaven(jdk: jdkName, maven: mvnName, mavenLocalRepo:"${WORK_DIR}/it-local-repo", options:[
- junitPublisher(ignoreAttachments: false)
- ]) {
- String cmd = "${runITscommand} -DmavenDistro=$WORK_DIR/apache-maven-dist.zip -Dmaven.test.failure.ignore=true -Dmaven.skip.rc=true"
- if (stageId.endsWith('-jdk7')) {
- // Java 7u80 has TLS 1.2 disabled by default: need to explicitly enable
- cmd = "${cmd} -Dhttps.protocols=TLSv1.2"
- }
-
- if (isUnix()) {
- sh "${cmd}"
- } else {
- bat "${cmd}"
+ try {
+ withMaven(jdk: jdkName, maven: mvnName, mavenLocalRepo:"${WORK_DIR}/it-local-repo", options:[
+ junitPublisher(ignoreAttachments: false)
+ ]) {
+ String cmd = "${runITscommand} -DmavenDistro=$WORK_DIR/apache-maven-dist.zip -Dmaven.test.failure.ignore=true -Dmaven.skip.rc=true"
+ if (stageId.endsWith('-jdk7')) {
+ // Java 7u80 has TLS 1.2 disabled by default: need to explicitly enable
+ cmd = "${cmd} -Dhttps.protocols=TLSv1.2"
+ }
+
+ if (isUnix()) {
+ sh "${cmd}"
+ } else {
+ bat "${cmd}"
+ }
}
+ } catch (Throwable e) {
+ archiveDirs(['core-it-suite': 'core-it-suite/target'], stageDir)
+ throw e
+ } finally {
+ deleteDir() // clean up after ourselves to reduce disk space
}
- deleteDir() // clean up after ourselves to reduce disk space
}
}
}
@@ -156,3 +162,11 @@ parallel(runITsTasks)
jenkinsNotify()
}
}
+
+def archiveDirs(archives, stageId) {
+ if (archives != null) {
+ archives.each { archivePrefix, pathToContent ->
+ zip(zipFile: "${archivePrefix}-${stageId}.zip", dir: pathToContent, archive: true)
+ }
+ }
+}