You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2023/12/17 15:50:24 UTC
(struts) 01/01: Builds Struts 7 as part of the main pipeline
This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch feature/jenkins-pipeline-struts-7
in repository https://gitbox.apache.org/repos/asf/struts.git
commit 165e464a12630dc427dcc2e22aeecb82168ec4ee
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Sun Dec 17 16:50:17 2023 +0100
Builds Struts 7 as part of the main pipeline
---
Jenkinsfile | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 78 insertions(+), 3 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index b80a9fcd8..22e608f4d 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -25,6 +25,36 @@ pipeline {
}
}
}
+ stage('JDK 21') {
+ agent {
+ label 'ubuntu'
+ }
+ tools {
+ jdk 'jdk_21_latest'
+ maven 'maven_3_latest'
+ }
+ environment {
+ MAVEN_OPTS = "-Xmx1024m"
+ }
+ stages {
+ stage('Test') {
+ steps {
+ sh './mvnw -B -DskipAssembly verify --no-transfer-progress'
+ }
+ post {
+ always {
+ junit(testResults: '**/surefire-reports/*.xml', allowEmptyResults: true)
+ junit(testResults: '**/failsafe-reports/*.xml', allowEmptyResults: true)
+ }
+ }
+ }
+ }
+ post {
+ always {
+ cleanWs deleteDirs: true, patterns: [[pattern: '**/target/**', type: 'INCLUDE']]
+ }
+ }
+ }
stage('JDK 17') {
agent {
label 'ubuntu'
@@ -39,7 +69,7 @@ pipeline {
stages {
stage('Build') {
steps {
- sh './mvnw -B clean install -DskipTests -DskipAssembly'
+ sh './mvnw -B -DskipAssembly verify --no-transfer-progress'
}
}
stage('Test') {
@@ -55,7 +85,9 @@ pipeline {
}
stage('Code Quality') {
when {
- branch 'master'
+ anyOf {
+ branch 'master'; branch 'release/struts-7-0-x'
+ }
}
steps {
withCredentials([string(credentialsId: 'asf-struts-sonarcloud', variable: 'SONARCLOUD_TOKEN')]) {
@@ -63,6 +95,49 @@ pipeline {
}
}
}
+ stage('Build Source & JavaDoc') {
+ when {
+ branch 'release/struts-7-0-x'
+ }
+ steps {
+ dir("local-snapshots-dir/") {
+ deleteDir()
+ }
+ sh './mvnw -B source:jar javadoc:jar -DskipTests -DskipAssembly'
+ }
+ }
+ stage('Deploy Snapshot') {
+ when {
+ branch 'release/struts-7-0-x'
+ }
+ steps {
+ withCredentials([file(credentialsId: 'lukaszlenart-repository-access-token', variable: 'CUSTOM_SETTINGS')]) {
+ sh './mvnw -s \${CUSTOM_SETTINGS} deploy -DskipTests -DskipAssembly'
+ }
+ }
+ }
+ stage('Upload nightlies') {
+ when {
+ branch 'release/struts-7-0-x'
+ }
+ steps {
+ sh './mvnw -B package -DskipTests'
+ sshPublisher(publishers: [
+ sshPublisherDesc(
+ configName: 'Nightlies',
+ transfers: [
+ sshTransfer(
+ remoteDirectory: '/struts/snapshot',
+ removePrefix: 'assembly/target/assembly/out',
+ sourceFiles: 'assembly/target/assembly/out/struts-*.zip',
+ cleanRemote: true
+ )
+ ],
+ verbose: true
+ )
+ ])
+ }
+ }
}
post {
always {
@@ -84,7 +159,7 @@ pipeline {
stages {
stage('Build') {
steps {
- sh './mvnw -B clean install -DskipTests -DskipAssembly'
+ sh './mvnw -B -DskipAssembly verify --no-transfer-progress'
}
}
stage('Test') {