From 27e64921ef6223144d2b12b5ee0c0f3d34c74958 Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Sat, 24 Sep 2022 11:23:40 +0200 Subject: [PATCH] migration to new jenkins --- Jenkinsfile | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ pom.xml | 24 +++++++++++++----------- 2 files changed, 65 insertions(+), 11 deletions(-) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..833b6ad0 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,52 @@ +String cron_string = BRANCH_NAME == "trunk" ? "10 3 * * *" : "" + + +pipeline { + agent { + kubernetes agentsetup(containers: 'java8') + } + options { + disableConcurrentBuilds() + } + triggers { cron(cron_string) } + + stages { + stage('Main') { + steps { + sh """ + export + rm -rf ~/.m2/repository/org/wamblee + + mvn install + + for sitexml in $( find . -name site.xml ) + do + dir=$( dirname $sitexml ) + dir=$( dirname $dir ) + dir=$( dirname $dir ) + ( + cd $dir + echo "" + echo "Building site for $dir" + echo "" + mvn -N -Ddistrib=/data/www/http.utils.wamblee.org/ site site:deploy + echo "" + echo "" + ) + done + mvn javadoc:aggregate + + rsync -a --delete target/site/apidocs/ /data/www/http.wamblee.org/apidocs/ + + + """ + } + } + } + post { + always { + junit '**/surefire-reports/*.xml' + cobertura coberturaReportFile: '**/target/site/cobertura/coverage.xml' + } + } +} diff --git a/pom.xml b/pom.xml index adad13c9..5f43e556 100644 --- a/pom.xml +++ b/pom.xml @@ -404,19 +404,21 @@ org.codehaus.mojo cobertura-maven-plugin - 2.3 + 2.7 - - - clean - - + + post-integration-test + + cobertura + + - - - - + true + + html + xml + @@ -433,7 +435,7 @@ maven-site-plugin - 3.0-beta-3 + 3.12.0 -- 2.31.1