Skip to content

Commit

Permalink
Do the tests still work on Windows?
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Dec 7, 2021
1 parent 23ba05a commit f04c931
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
14 changes: 9 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ properties([
disableConcurrentBuilds(abortPrevious: true)
])

// TODO: Restore 'Windows' once https://groups.google.com/forum/#!topic/jenkinsci-dev/v9d-XosOp2s is resolved
def buildTypes = ['Linux']
def buildTypes = ['Windows']
def jdks = [8, 11]

def builds = [:]
Expand All @@ -29,7 +28,11 @@ for(j = 0; j < jdks.size(); j++) {
def jdk = jdks[j]
builds["${buildType}-jdk${jdk}"] = {
// see https://github.com/jenkins-infra/documentation/blob/master/ci.adoc#node-labels for information on what node types are available
node(buildType == 'Linux' ? (jdk == 8 ? 'maven' : 'maven-11') : buildType.toLowerCase()) {
String agentContainerLabel = jdk == 8 ? 'maven' : 'maven-11'
if (buildType == 'Windows') {
agentContainerLabel += '-windows'
}
node(agentContainerLabel) {
// First stage is actually checking out the source. Since we're using Multibranch
// currently, we can use "checkout scm".
stage('Checkout') {
Expand All @@ -41,7 +44,7 @@ for(j = 0; j < jdks.size(); j++) {

// Now run the actual build.
stage("${buildType} Build / Test") {
timeout(time: 300, unit: 'MINUTES') {
timeout(time: 500, unit: 'MINUTES') {
// -Dmaven.repo.local=… tells Maven to create a subdir in the temporary directory for the local Maven repository
// -ntp requires Maven >= 3.6.1
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"
Expand All @@ -68,7 +71,7 @@ for(j = 0; j < jdks.size(); j++) {
error 'There were test failures; halting early'
}
}
if (buildType == 'Linux' && jdk == jdks[0]) {
if (buildType == 'Windows' && jdk == jdks[0]) {
def folders = env.JOB_NAME.split('/')
if (folders.length > 1) {
discoverGitReferenceBuild(scm: folders[1])
Expand Down Expand Up @@ -133,5 +136,6 @@ builds.ath = {
}

builds.failFast = failFast
builds.remove('ath')
parallel builds
infra.maybePublishIncrementals()
1 change: 0 additions & 1 deletion test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ THE SOFTWARE.
<buildDirectory>${project.build.directory}</buildDirectory>
</systemPropertyVariables>
<reuseForks>false</reuseForks>
<forkCount>${concurrency}</forkCount>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit f04c931

Please sign in to comment.