You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2018/12/18 09:46:18 UTC

[sling-tooling-jenkins] branch feature/SLING-7245 updated (3fee5f9 -> ab91e3c)

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

rombert pushed a change to branch feature/SLING-7245
in repository https://gitbox.apache.org/repos/asf/sling-tooling-jenkins.git.


    from 3fee5f9  SLING-7245 - Validate pull requests using Jenkins
     new e9300e8  SLING-7245 - Validate pull requests using Jenkins
     new ab91e3c  SLING-7245 - Validate pull requests using Jenkins

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 vars/slingOsgiBundleBuild.groovy | 33 ++++++++++++++++++++++++++-------
 1 file changed, 26 insertions(+), 7 deletions(-)


[sling-tooling-jenkins] 02/02: SLING-7245 - Validate pull requests using Jenkins

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch feature/SLING-7245
in repository https://gitbox.apache.org/repos/asf/sling-tooling-jenkins.git

commit ab91e3c899454ef65d88db5de7595d5b1708e0a1
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Dec 18 00:06:06 2018 +0100

    SLING-7245 - Validate pull requests using Jenkins
    
    Start parsing .sling-module.xml
---
 vars/slingOsgiBundleBuild.groovy | 31 +++++++++++++++++++++++++------
 1 file changed, 25 insertions(+), 6 deletions(-)

diff --git a/vars/slingOsgiBundleBuild.groovy b/vars/slingOsgiBundleBuild.groovy
index cea544b..92ee5ec 100644
--- a/vars/slingOsgiBundleBuild.groovy
+++ b/vars/slingOsgiBundleBuild.groovy
@@ -1,20 +1,39 @@
 def call(Map params = [:]) {
     def availableJDKs = [ 8: 'JDK 1.8 (latest)', 9: 'JDK 1.9 (latest)']
-    
-    def moduleDir = params.containsKey('moduleDir') ? params.moduleDir : '.'
     def mvnVersion = 'Maven 3.3.9'
-    def jdkVersions = [8, 9]
+    // defaults for the build
+    def buildDesc = {
+        jdks: [8],
+        downstreamProjects: [],
+        archivePatterns: [],
+        mavenGoal: 'install',
+        additionalMavenParams: '',
+        rebuildFrequency: '@weekly',
+        enableXvfb: false,
+        enabled: true
+    }
+
+    def moduleDir = params.containsKey('moduleDir') ? params.moduleDir : '.'
 
     node('ubuntu') {
 
         checkout scm
 
         stage('Init') {
-            def overrides = readFile('.sling-module.xml')
-            echo "Got overrides ${overrides}"
+            if ( fileExists('.sling-module.xml') ) {
+                def overrides = readFile('.sling-module.xml')
+                def slingMod = new XmlParser().parse(overrides)
+                if ( slingMod?.jenkins?.jdks ) {
+                    def jdks = []
+                    slingMod.jenkins.jdks.jdk.each { jdks.add it.text() }
+                    buildDesc.jdks = jdks
+
+                    echo "$Overriding JDKs list to be ${jdks}"
+                }
+            }
         }
 
-        jdkVersions.each { jdkVersion -> 
+        buildDesc.jdks.each { jdkVersion -> 
             stage("Build (Java ${jdkVersion})") {
                 def jenkinsJdkLabel = availableJDKs[jdkVersion]
                 if ( !jenkinsJdkLabel )


[sling-tooling-jenkins] 01/02: SLING-7245 - Validate pull requests using Jenkins

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch feature/SLING-7245
in repository https://gitbox.apache.org/repos/asf/sling-tooling-jenkins.git

commit e9300e81d4731bd9ac1981fd130b682a9701b8aa
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Dec 18 00:06:06 2018 +0100

    SLING-7245 - Validate pull requests using Jenkins
    
    Whitespace fix
---
 vars/slingOsgiBundleBuild.groovy | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vars/slingOsgiBundleBuild.groovy b/vars/slingOsgiBundleBuild.groovy
index 8a113e6..cea544b 100644
--- a/vars/slingOsgiBundleBuild.groovy
+++ b/vars/slingOsgiBundleBuild.groovy
@@ -22,7 +22,7 @@ def call(Map params = [:]) {
                 withMaven(maven: mvnVersion, jdk: jenkinsJdkLabel ) {
                    dir(moduleDir) {
                         sh 'mvn clean install' 
-                    }                
+                    }
                 }
             }
         }