@@ -66,7 +66,7 @@ node(jenkinsEnv.nodeSelection(osNode)) {
66
66
}
67
67
}
68
68
69
- tests = resolveScm source : [$class : ' GitSCMSource' , credentialsId : ' ' , id : ' _' , remote : ' https://gitbox.apache.org/repos/asf/maven-integration-testing .git' , traits : [[$class : ' jenkins.plugins.git.traits.BranchDiscoveryTrait' ], [$class : ' GitToolSCMSourceTrait' , gitTool : ' Default' ]]], targets : [BRANCH_NAME , ' master' ]
69
+ tests = resolveScm source : [$class : ' GitSCMSource' , credentialsId : ' ' , id : ' _' , remote : ' https://gitbox.apache.org/repos/asf/maven.git' , traits : [[$class : ' jenkins.plugins.git.traits.BranchDiscoveryTrait' ], [$class : ' GitToolSCMSourceTrait' , gitTool : ' Default' ]]], targets : [BRANCH_NAME , ' master' ]
70
70
}
71
71
}
72
72
@@ -78,48 +78,38 @@ for (String os in runITsOses) {
78
78
String mvnName = jenkinsEnv. mvnFromVersion(os, " ${ runITsMvn} " )
79
79
echo " OS: ${ os} JDK: ${ jdk} => Label: ${ osLabel} JDK: ${ jdkName} "
80
80
81
+ def cmd = [
82
+ ' mvn' ,
83
+ ' verify' ,
84
+ ' -DskipTests' , ' -Drat.skip'
85
+ ]
86
+ if (jdk == ' 7' ) {
87
+ // Java 7u80 has TLS 1.2 disabled by default: need to explicitely enable
88
+ cmd + = ' -Dhttps.protocols=TLSv1.2'
89
+ }
90
+
81
91
String stageId = " ${ os} -jdk${ jdk} "
82
- String stageLabel = " Run ITs ${ os.capitalize()} Java ${ jdk} "
92
+ String stageLabel = " Rebuild ${ os.capitalize()} Java ${ jdk} "
83
93
runITsTasks[stageId] = {
84
94
node(jenkinsEnv. nodeSelection(osLabel)) {
95
+ def WORK_DIR = pwd()
85
96
stage(" ${ stageLabel} " ) {
86
97
echo " NODE_NAME = ${ env.NODE_NAME} "
87
- // on Windows, need a short path or we hit 256 character limit for paths
88
- // using EXECUTOR_NUMBER guarantees that concurrent builds on same agent
89
- // will not trample each other plus workaround for JENKINS-52657
90
- dir(isUnix() ? ' test' : " c:\\ mvn-it-${ EXECUTOR_NUMBER} .tmp" ) {
91
- def WORK_DIR = pwd()
92
- checkout tests
93
- if (isUnix()) {
94
- sh " rm -rvf $WORK_DIR /apache-maven-dist.zip $WORK_DIR /it-local-repo"
95
- } else {
96
- bat " if exist it-local-repo rmdir /s /q it-local-repo"
97
- bat " if exist apache-maven-dist.zip del /q apache-maven-dist.zip"
98
- }
99
- unstash ' dist'
100
- try {
101
- withMaven(jdk : jdkName, maven : mvnName, mavenLocalRepo :" ${ WORK_DIR} /it-local-repo" , options :[
102
- junitPublisher(ignoreAttachments : false )
103
- ]) {
104
- String cmd = " ${ runITscommand} -DmavenDistro=$WORK_DIR /apache-maven-dist.zip -Dmaven.test.failure.ignore=true"
105
- if (stageId. endsWith(' -jdk7' )) {
106
- // Java 7u80 has TLS 1.2 disabled by default: need to explicitly enable
107
- cmd = " ${ cmd} -Dhttps.protocols=TLSv1.2"
108
- }
109
-
110
- if (isUnix()) {
111
- sh ' df -hT'
112
- sh " ${ cmd} "
113
- } else {
114
- bat ' wmic logicaldisk get size,freespace,caption'
115
- bat " ${ cmd} "
116
- }
117
- }
118
- } finally {
119
- archiveDirs(stageId, [' core-it-suite-logs' :' core-it-suite/target/test-classes' ,
120
- ' core-it-suite-reports' :' core-it-suite/target/surefire-reports' ])
121
- deleteDir() // clean up after ourselves to reduce disk space
122
- }
98
+ checkout tests
99
+ withMaven(jdk : jdkName, maven : mvnName, mavenLocalRepo :" ${ WORK_DIR} /.repository" , options :[
100
+ artifactsPublisher(disabled : false ),
101
+ junitPublisher(ignoreAttachments : false ),
102
+ findbugsPublisher(disabled : false ),
103
+ openTasksPublisher(disabled : false ),
104
+ dependenciesFingerprintPublisher(),
105
+ invokerPublisher(),
106
+ pipelineGraphPublisher()
107
+ ]) {
108
+ if (isUnix()) {
109
+ sh cmd. join(' ' )
110
+ } else {
111
+ bat cmd. join(' ' )
112
+ }
123
113
}
124
114
}
125
115
}
0 commit comments