From b25e26cdea6bb4ffe7f4eae7a596e055de0cba20 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Mon, 11 Jan 2021 08:30:42 +0100 Subject: [PATCH] Drops builds on JDK9 and moves SonarCloud under JDK11 --- Jenkinsfile | 48 ++++++------------------------------------------ 1 file changed, 6 insertions(+), 42 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 05cdb2806..bb07e6042 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -55,39 +55,13 @@ pipeline { } } } - post { - always { - cleanWs deleteDirs: true, patterns: [[pattern: '**/target/**', type: 'INCLUDE']] + stage('Code Quality') { + when { + branch 'master' } - } - } - stage('JDK 9') { - agent { - label 'ubuntu' - } - tools { - jdk 'jdk_1.9_latest' - maven 'maven_3_latest' - } - environment { - MAVEN_OPTS = "-Xmx1024m" - } - stages { - stage('Build') { - steps { - sh 'mvn -B clean install -DskipTests -DskipAssembly' - } - } - stage('Test') { - steps { - sh 'mvn -B test' - // step([$class: 'JiraIssueUpdater', issueSelector: [$class: 'DefaultIssueSelector'], scm: scm]) - } - post { - always { - junit(testResults: '**/surefire-reports/*.xml', allowEmptyResults: true) - junit(testResults: '**/failsafe-reports/*.xml', allowEmptyResults: true) - } + steps { + withCredentials([string(credentialsId: 'asf-struts-sonarcloud', variable: 'SONARCLOUD_TOKEN')]) { + sh 'mvn sonar:sonar -DskipAssembly -Dsonar.projectKey=apache_struts -Dsonar.organization=apache -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${SONARCLOUD_TOKEN}' } } } @@ -167,16 +141,6 @@ pipeline { ]) } } - stage('Code Quality') { - when { - branch 'master' - } - steps { - withCredentials([string(credentialsId: 'asf-struts-sonarcloud', variable: 'SONARCLOUD_TOKEN')]) { - sh 'mvn sonar:sonar -DskipAssembly -Dsonar.projectKey=apache_struts -Dsonar.organization=apache -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${SONARCLOUD_TOKEN}' - } - } - } } post { always {