-
-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' ] | ||
]) |