Adding JDK>=9 builds to Jenkinsfile
*/
LABEL = 'ubuntu'
buildJdk = 'JDK 1.8 (latest)'
+buildJdk9 = 'JDK 1.9 (latest)'
+buildJdk10 = 'JDK 10 (latest)'
buildMvn = 'Maven 3.5.2'
deploySettings = 'DefaultMavenSettingsProvider.1331204114925'
INTEGRATION_PIPELINE = "Archiva-IntegrationTests-Gitbox"
@@ -40,21 +42,6 @@ pipeline {
stages {
-
- stage('Checkout') {
- steps {
- script {
- echo "Info: Job-Name=${JOB_NAME}, Branch=${BRANCH_NAME}, Workspace=${PWD}"
- }
- checkout scm
- }
- post {
- failure {
- notifyBuild("Checkout failure (${currentBuild.currentResult})")
- }
- }
- }
-
stage('BuildAndDeploy') {
steps {
timeout(120) {
@@ -105,13 +92,57 @@ pipeline {
}
}
+ stage('JDKs') {
+ parallel {
+ stage('JDK9') {
+ steps {
+ ws("${env.JOB_NAME}-JDK9") {
+ checkout scm
+ timeout(120) {
+ withMaven(maven: buildMvn, jdk: buildJdk9,
+ mavenSettingsConfig: deploySettings,
+ mavenLocalRepo: ".repository",
+ options: [concordionPublisher(disabled: true), dependenciesFingerprintPublisher(disabled: true),
+ findbugsPublisher(disabled: true), artifactsPublisher(disabled: true),
+ invokerPublisher(disabled: true), jgivenPublisher(disabled: true),
+ junitPublisher(disabled: true, ignoreAttachments: false),
+ openTasksPublisher(disabled: true), pipelineGraphPublisher(disabled: true)]
+ )
+ {
+ sh "mvn clean install -B -U -e -fae -T2"
+ }
+ }
+ }
+ }
+ }
+ stage('JDK10') {
+ steps {
+ ws("${env.JOB_NAME}-JDK10") {
+ checkout scm
+ timeout(120) {
+ withMaven(maven: buildMvn, jdk: buildJdk10,
+ mavenSettingsConfig: deploySettings,
+ mavenLocalRepo: ".repository",
+ options: [concordionPublisher(disabled: true), dependenciesFingerprintPublisher(disabled: true),
+ findbugsPublisher(disabled: true), artifactsPublisher(disabled: true),
+ invokerPublisher(disabled: true), jgivenPublisher(disabled: true),
+ junitPublisher(disabled: true, ignoreAttachments: false),
+ openTasksPublisher(disabled: true), pipelineGraphPublisher(disabled: true)]
+ )
+ {
+ sh "mvn clean install -B -U -e -fae -T2"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
post {
unstable {
notifyBuild("Unstable Build")
}
- always {
- cleanWs deleteDirs: true, notFailBuild: true, patterns: [[pattern: '.repository', type: 'EXCLUDE']]
- }
success {
script {
def previousResult = currentBuild.previousBuild?.result
