You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2024/10/30 21:40:54 UTC
(maven-dist-tool) branch master updated: Improve jenkins build
This is an automated email from the ASF dual-hosted git repository.
sjaranowski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-dist-tool.git
The following commit(s) were added to refs/heads/master by this push:
new f36cb60 Improve jenkins build
f36cb60 is described below
commit f36cb6000c94af9802f88c32b2a68071e6d9b363
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Wed Oct 30 21:49:30 2024 +0100
Improve jenkins build
- publish only on master
---
Jenkinsfile | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 115ed8c..445ce19 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -34,27 +34,25 @@ pipeline {
}
}
stage('Check') {
- when {
- branch 'master'
- }
steps {
withMaven(jdk:'jdk_17_latest', maven:'maven_3_latest', mavenLocalRepo:'.repository', options: [
artifactsPublisher(disabled: true),
findbugsPublisher(disabled: true),
]) {
- sh "mvn -ntp -V -e -Preporting -Dscreenshot=false clean install site"
+ catchError {
+ sh "mvn -ntp -V -e -Preporting -Dscreenshot=clean install site"
+ }
+ }
+ archiveArtifacts artifacts: "**/target/site/**/*",allowEmptyArchive: true
+ script {
+ if (env.BRANCH_NAME == 'master') {
+ publishHTML([allowMissing: false, alwaysLinkToLastBuild: true, keepAll: true, reportDir: "${env.WORKSPACE}/target/site", reportFiles: 'index.html', reportName: 'site', reportTitles: ''])
+ }
}
}
}
}
- post {
- always {
- // not sure what is this
- //jenkinsNotify()
- archiveArtifacts artifacts: "**/site/*.*",allowEmptyArchive: true
- publishHTML([allowMissing: false, alwaysLinkToLastBuild: true, keepAll: true, reportDir: "${env.WORKSPACE}/target/site", reportFiles: 'index.html', reportName: 'site', reportTitles: ''])
- }
- }
+
options {
buildDiscarder(logRotator(numToKeepStr:'15'))
timeout(time: 10, unit: 'MINUTES')