Skip to content

Commit

Permalink
Run tests on more platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Dec 19, 2021
1 parent dd87255 commit cd795b6
Showing 1 changed file with 8 additions and 44 deletions.
52 changes: 8 additions & 44 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,45 +1,9 @@
#!/usr/bin/env groovy

properties([[$class: 'BuildDiscarderProperty',
strategy: [$class: 'LogRotator', numToKeepStr: '10']]])


/* These platforms correspond to labels in ci.jenkins.io, see:
* https://github.com/jenkins-infra/documentation/blob/master/ci.adoc
/*
* While this is not a plugin, it is much simpler to reuse the pipeline code for CI. This allows for
* easy Linux/Windows testing and produces incrementals. The only feature that relates to plugins is
* allowing one to test against multiple Jenkins versions.
*/
parallel linux: {
node('maven') {
stage('Checkout') {
checkout scm
}
stage('Build') {
timeout(30) {
sh 'mvn -B -ntp -Dset.changelist clean install -Dmaven.test.failure.ignore -e'
}
}
stage('Archive') {
junit '**/target/surefire-reports/TEST-*.xml'
recordIssues(
enabledForFailure: true, aggregatingResults: true,
tools: [java(), spotBugs(pattern: '**/target/spotbugsXml.xml')]
)
infra.prepareToPublishIncrementals()
}
}
}, windows: {
node('windows') {
stage('Checkout') {
checkout scm
}
stage('Build') {
timeout(30) {
infra.runMaven(['clean verify -Dmaven.test.failure.ignore'])
}
}
stage('Archive') {
junit '**/target/surefire-reports/TEST-*.xml'
}
}
}, failFast: true

infra.maybePublishIncrementals()
buildPlugin(useContainerAgent: true, configurations: [
[ platform: 'linux', jdk: '11' ],
[ platform: 'windows', jdk: '11' ]
])

0 comments on commit cd795b6

Please sign in to comment.