mirror of
https://github.com/apache/struts.git
synced 2026-08-07 15:46:57 +00:00
Allows run parallel builds
This commit is contained in:
Vendored
+95
-91
@@ -11,125 +11,128 @@ pipeline {
|
||||
pollSCM 'H/15 * * * *'
|
||||
}
|
||||
stages {
|
||||
stage('JDK 11') {
|
||||
agent {
|
||||
docker {
|
||||
label 'ubuntu'
|
||||
image 'maven:3-jdk-11'
|
||||
args '-v $HOME/.m2:/root/.m2 -e MAVEN_OPTS="-Xmx1024m" -e USER=$USER'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'mvn -B clean package -DskipTests -DskipAssembly'
|
||||
parallel {
|
||||
stage('JDK 11') {
|
||||
agent {
|
||||
docker {
|
||||
label 'ubuntu'
|
||||
image 'maven:3-jdk-11'
|
||||
args '-v $HOME/.m2:/root/.m2 -e MAVEN_OPTS="-Xmx1024m" -e USER=$USER'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
sh 'mvn -B test'
|
||||
step([$class: 'JiraIssueUpdater', issueSelector: [$class: 'DefaultIssueSelector'], scm: scm])
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'mvn -B clean package -DskipTests -DskipAssembly'
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
junit(testResults: '**/surefire-reports/*.xml', allowEmptyResults: true)
|
||||
junit(testResults: '**/failsafe-reports/*.xml', allowEmptyResults: true)
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('JDK 9') {
|
||||
agent {
|
||||
docker {
|
||||
label 'ubuntu'
|
||||
image 'maven:3-jdk-9'
|
||||
args '-v $HOME/.m2:/root/.m2 -e MAVEN_OPTS="-Xmx1024m" -e USER=$USER'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'mvn -B clean package -DskipTests -DskipAssembly'
|
||||
stage('JDK 9') {
|
||||
agent {
|
||||
docker {
|
||||
label 'ubuntu'
|
||||
image 'maven:3-jdk-9'
|
||||
args '-v $HOME/.m2:/root/.m2 -e MAVEN_OPTS="-Xmx1024m" -e USER=$USER'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
sh 'mvn -B test'
|
||||
step([$class: 'JiraIssueUpdater', issueSelector: [$class: 'DefaultIssueSelector'], scm: scm])
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'mvn -B clean package -DskipTests -DskipAssembly'
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
junit(testResults: '**/surefire-reports/*.xml', allowEmptyResults: true)
|
||||
junit(testResults: '**/failsafe-reports/*.xml', allowEmptyResults: true)
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('JDK 8') {
|
||||
agent {
|
||||
docker {
|
||||
label 'ubuntu'
|
||||
image 'maven:3-jdk-8'
|
||||
args '-v $HOME/.m2:/root/.m2 -e MAVEN_OPTS="-Xmx1024m" -e USER=$USER'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'mvn -B clean package -DskipTests -DskipAssembly'
|
||||
stage('JDK 8') {
|
||||
agent {
|
||||
docker {
|
||||
label 'ubuntu'
|
||||
image 'maven:3-jdk-8'
|
||||
args '-v $HOME/.m2:/root/.m2 -e MAVEN_OPTS="-Xmx1024m" -e USER=$USER'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
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)
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'mvn -B clean package -DskipTests -DskipAssembly'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build Source & JavaDoc') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
steps {
|
||||
dir("local-snapshots-dir/") {
|
||||
deleteDir()
|
||||
stage('Test') {
|
||||
steps {
|
||||
sh 'mvn -B test'
|
||||
step([$class: 'JiraIssueUpdater', issueSelector: [$class: 'DefaultIssueSelector'], scm: scm])
|
||||
}
|
||||
sh 'mvn -B source:jar javadoc:jar -DskipAssembbly'
|
||||
}
|
||||
}
|
||||
stage('Deploy Snapshot') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
steps {
|
||||
withCredentials([file(credentialsId: 'struts-custom-settings_xml', variable: 'CUSTOM_SETTINGS')]) {
|
||||
sh 'mvn -s \${CUSTOM_SETTINGS} deploy -skipAssembly'
|
||||
post {
|
||||
always {
|
||||
junit(testResults: '**/surefire-reports/*.xml', allowEmptyResults: true)
|
||||
junit(testResults: '**/failsafe-reports/*.xml', allowEmptyResults: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Code Quality') {
|
||||
when {
|
||||
branch 'master'
|
||||
stage('Build Source & JavaDoc') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
steps {
|
||||
dir("local-snapshots-dir/") {
|
||||
deleteDir()
|
||||
}
|
||||
sh 'mvn -B source:jar javadoc:jar -DskipAssembbly'
|
||||
}
|
||||
}
|
||||
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}'
|
||||
stage('Deploy Snapshot') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
steps {
|
||||
withCredentials([file(credentialsId: 'struts-custom-settings_xml', variable: 'CUSTOM_SETTINGS')]) {
|
||||
sh 'mvn -s \${CUSTOM_SETTINGS} deploy -skipAssembly'
|
||||
}
|
||||
}
|
||||
}
|
||||
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 {
|
||||
// If this build failed, send an email to the list.
|
||||
failure {
|
||||
@@ -179,4 +182,5 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
Reference in New Issue
Block a user