This is an automated email from the ASF dual-hosted git repository. sjaranowski pushed a commit to branch jenkis-fix in repository https://gitbox.apache.org/repos/asf/maven-dist-tool.git
commit 7c5ccd0c873a05fddcac5dd2041d57ed4809e4a4 Author: Slawomir Jaranowski <s.jaranow...@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')