You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by sk...@apache.org on 2022/05/13 13:00:37 UTC

[netbeans-jenkins-lib] 01/01: job dsl to have a common way to generate base jobs

This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch ebarboni-patch-1
in repository https://gitbox.apache.org/repos/asf/netbeans-jenkins-lib.git

commit f43a4b64a67fa255b9eed218da5081c2b113095b
Author: Eric Barboni <sk...@apache.org>
AuthorDate: Fri May 13 15:00:32 2022 +0200

    job dsl to have a common way to generate base jobs
    
    rewrite netbeans-linux,netbeans-windows,netbeans-license using job dsl
    split netbeans-license to have rat and lib verif only and let's have a new build for signature
---
 jobs/netbeansbase.groovy | 147 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 147 insertions(+)

diff --git a/jobs/netbeansbase.groovy b/jobs/netbeansbase.groovy
new file mode 100644
index 0000000..f039eeb
--- /dev/null
+++ b/jobs/netbeansbase.groovy
@@ -0,0 +1,147 @@
+#!groovy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+// ant version
+def antversion='ant_1.10_latest'
+
+// Common job with all default
+// jdk
+// log rotation
+// wrappers
+// git clone from apache netbeans branch master
+def netbeansBaseJob(Map m, Closure c = {}) {
+    freeStyleJob("NetBeans/netbeans-${m.name}") {
+        logRotator {
+            numToKeep(2)
+            daysToKeep(7)
+        }
+        jdk('jdk_11_latest')    
+        triggers {
+            scm('H/5 * * * *')
+        }
+        wrappers {
+            xvfb('Xvfb') { }
+            preBuildCleanup()
+        }
+        scm {
+            git {
+                remote {
+                    url('https://github.com/apache/netbeans.git')
+                }
+                branch('*/master')
+                extensions {
+                    cleanBeforeCheckout()
+                    cleanCheckout {
+                        deleteUntrackedNestedRepositories(true)
+                    } 
+                }
+            }
+        }
+        c.delegate = delegate 
+        c()
+    }
+}
+
+netbeansBaseJob(name:'linux') {
+    description("""Builds Apache NetBeans from <a href="https://github.com/apache/netbeans">its Github repository</a>
+and runs platform tests that aren't marked with <code>@RandomlyFails</code> annotation:
+<p>
+<pre>
+\$ ant test-platform
+</pre>
+<p>
+There is also a <a href="../netbeans-windows">windows version</a> of this job.
+There is also a <a href="../netbeans-linux-jdk11">JDK11 version</a> of this job.
+The <b>licenses</b> are checked by the <a href="../netbeans-license/lastCompletedBuild/testReport/ ">license job</a>.""")
+    
+    label('ubuntu')
+    steps {
+        ant {
+            targets(['build','test-platform', 'build-nbms', 'generate-uc-catalog', 'build-source-zips'])
+            props('do.build.windows.launchers': 'true')
+            antInstallation(antversion)
+        }
+    }
+    publishers {
+        archiveArtifacts('nbbuild/**/*.zip,nbbuild/nbms/**')
+        archiveJunit('**/test/*/results/TEST*.xml')
+    } 
+}
+
+netbeansBaseJob(name:'windows') {
+    description("""<html>Builds Apache NetBeans from <a href="https://github.com/apache/netbeans">its Github repository</a>
+and runs platform tests (ant test-platform) that aren't marked with
+<code>@RandomlyFails</code> annotation.
+There is also a <a href="../netbeans-linux">Linux version</a> of this build.</html>""")        
+    label('Window')
+    steps {
+        ant {
+            targets(['build','test-platform'])
+            props('test-unit-sys-prop.ignore.random.failures': 'true','continue.after.failing.tests':'true')
+            antInstallation(antversion+'_windows')
+        }
+    }
+    publishers {
+        archiveJunit('**/test/*/results/TEST*.xml')
+    }  
+}
+
+netbeansBaseJob(name:'license') {
+    description("""Checks licenses of Apache NetBeans from <a href="https://github.com/apache/netbeans">its Github repository</a>:
+<p>
+<pre>
+\$ ant rat verify-libs-and-licenses
+</pre>
+<p>
+The real code check is done by a <a href="../netbeans-linux">linux job</a>.""")     
+     
+    label('ubuntu')
+    steps {
+        ant {
+            targets(['rat','verify-libs-and-licenses'])
+            antInstallation(antversion)
+        }
+    }
+    publishers {
+        archiveArtifacts('nbbuild/build/rat-report.txt')
+        archiveJunit('nbbuild/build/rat/*.xml,nbbuild/build/verifylibsandlicenses.xml')
+    } 
+}
+
+netbeansBaseJob(name:'apisigcheck') {
+    description("""Checks sig of Apache NetBeans from <a href="https://github.com/apache/netbeans">its Github repository</a>:
+<p>
+<pre>
+\$ ant build gen-sigtests-release
+</pre>
+<p>
+The real code check is done by a <a href="../netbeans-linux">linux job</a>.""")
+    
+    label('ubuntu')
+    steps {
+        ant {
+            targets(['build','gen-sigtests-release'])
+            props('sigtest.gen.fail.on.error':'false')
+            antInstallation(antversion)
+        }
+    }
+    publishers {
+        archiveJunit('**/sigtest/results/*.xml')
+    } 
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists