migration to new jenkins
authorErik Brakkee <erik@brakkee.org>
Sat, 24 Sep 2022 09:23:40 +0000 (11:23 +0200)
committerErik Brakkee <erik@brakkee.org>
Sat, 24 Sep 2022 09:23:40 +0000 (11:23 +0200)
Jenkinsfile [new file with mode: 0644]
pom.xml

diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644 (file)
index 0000000..833b6ad
--- /dev/null
@@ -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 adad13c916e2f52bc81882ac0c5ed4fcf33aafcd..5f43e556dc502d6c4922724a15e80040bedfa01a 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                        <plugin>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>cobertura-maven-plugin</artifactId>
-                               <version>2.3</version>
+                               <version>2.7</version>
                                <executions>
-                                       <execution>
-                                               <goals>
-                                                       <goal>clean</goal>
-                                               </goals>
-                                       </execution>
+                    <execution>
+                                           <phase>post-integration-test</phase>
+                        <goals>
+                            <goal>cobertura</goal>
+                        </goals>
+                    </execution>
                                </executions>
                                <configuration>
-                                       <instrumentation>
-                                               <excludes>
-                                               </excludes>
-                                       </instrumentation>
+                    <aggregate>true</aggregate>
+                    <formats>
+                        <format>html</format>
+                        <format>xml</format>
+                    </formats>
                                </configuration>
                        </plugin>
                        <plugin>
                        <plugins>
                                <plugin>
                                        <artifactId>maven-site-plugin</artifactId>
-                                       <version>3.0-beta-3</version>
+                                       <version>3.12.0</version>
                                        <configuration>
                                                <reportPlugins>
                                                        <plugin>