7
7
8
8
def buildNumber = BUILD_NUMBER as int ; if (buildNumber > 1 ) milestone(buildNumber - 1 ); milestone(buildNumber) // JENKINS-43353 / JENKINS-58625
9
9
10
- // TEST FLAG - to make it easier to turn on/off unit tests for speeding up access to later stuff.
11
- def runTests = true
12
10
def failFast = false
13
11
// Same memory sizing for both builds and ATH
14
12
def javaOpts = [" JAVA_OPTS=-Xmx1536m -Xms512m" ," MAVEN_OPTS=-Xmx1536m -Xms512m" ]
@@ -48,21 +46,21 @@ for(j = 0; j < jdks.size(); j++) {
48
46
// Now run the actual build.
49
47
stage(" ${ buildType} Build / Test" ) {
50
48
timeout(time : 300 , unit : ' MINUTES' ) {
49
+ realtimeJUnit(healthScaleFactor : 20.0 , testResults : ' */target/surefire-reports/*.xml,war/junit.xml' ) {
51
50
// -Dmaven.repo.local=… tells Maven to create a subdir in the temporary directory for the local Maven repository
52
51
// -ntp requires Maven >= 3.6.1
53
- def mvnCmd = " mvn -Pdebug -Pjapicmp -U -Dset.changelist help:evaluate -Dexpression=changelist -Doutput=$changelistF clean install ${ runTests ? ' -Dmaven.test.failure.ignore' : '-DskipTests' } -V -B -ntp -Dmaven.repo.local=$m2repo -Dspotbugs.failOnError=false -Dcheckstyle.failOnViolation=false -e"
52
+ def mvnCmd = " mvn -Pdebug -Pjapicmp -U -Dset.changelist help:evaluate -Dexpression=changelist -Doutput=$changelistF clean install -Dmaven.test.failure.ignore -V -B -ntp -Dmaven.repo.local=$m2repo -Dspotbugs.failOnError=false -Dcheckstyle.failOnViolation=false -e"
54
53
infra. runWithMaven(mvnCmd, jdk. toString(), javaOpts, true )
55
54
56
55
if (isUnix()) {
57
56
sh ' git add . && git diff --exit-code HEAD'
58
57
}
58
+ }
59
59
}
60
60
}
61
61
62
62
// Once we've built, archive the artifacts and the test results.
63
63
stage(" ${ buildType} Publishing" ) {
64
- if (runTests) {
65
- junit healthScaleFactor : 20.0 , testResults : ' */target/surefire-reports/*.xml,war/junit.xml'
66
64
archiveArtifacts allowEmptyArchive : true , artifacts : ' **/target/surefire-reports/*.dumpstream'
67
65
if (! fileExists(' core/target/surefire-reports/TEST-jenkins.Junit4TestsRanTest.xml' ) ) {
68
66
error ' junit 4 tests are no longer being run for the core package'
@@ -73,7 +71,6 @@ for(j = 0; j < jdks.size(); j++) {
73
71
if (failFast && currentBuild. result == ' UNSTABLE' ) {
74
72
error ' There were test failures; halting early'
75
73
}
76
- }
77
74
if (buildType == ' Linux' && jdk == jdks[0 ]) {
78
75
def folders = env. JOB_NAME . split(' /' )
79
76
if (folders. length > 1 ) {
0 commit comments