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 16:51:43 UTC

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

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 27120cd12929e33060790e5a60417d4439dd0abe
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Dec 18 00:06:06 2018 +0100

    SLING-7245 - Validate pull requests using Jenkins
    
    Consistently use the terms job and build, where applicable.
---
 vars/slingOsgiBundleBuild.groovy | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/vars/slingOsgiBundleBuild.groovy b/vars/slingOsgiBundleBuild.groovy
index bb53ca6..0754961 100644
--- a/vars/slingOsgiBundleBuild.groovy
+++ b/vars/slingOsgiBundleBuild.groovy
@@ -3,7 +3,7 @@ def call(Map params = [:]) {
     def availableJDKs = [ 8: 'JDK 1.8 (latest)', 9: 'JDK 1.9 (latest)', 10: 'JDK 10 (latest)', 11: 'JDK 11 (latest)' ]
     def mvnVersion = 'Maven 3.3.9'
     // defaults for the build
-    def buildDesc = [
+    def jobConfig = [
         jdks: [8],
         downstreamProjects: [],
         archivePatterns: [],
@@ -30,30 +30,30 @@ def call(Map params = [:]) {
                 overrides = readJSON file: '.sling-module.json'
                 echo "Jenkins overrides: ${overrides.jenkins}"
                 overrides.jenkins.each { key,value ->
-                    buildDesc[key] = value;
+                    jobConfig[key] = value;
                 }
             }
-            echo "Final build config: ${buildDesc}"
+            echo "Final job config: ${jobConfig}"
         }
 
-        if ( buildDesc.enabled ) {
+        if ( jobConfig.enabled ) {
             deploy = true
-            buildDesc.jdks.each { jdkVersion -> 
-                def goal = buildDesc.mavenGoal ? buildDesc.mavenGoal : ( deploy ? "deploy" : "verify" )
+            jobConfig.jdks.each { jdkVersion -> 
+                def goal = jobConfig.mavenGoal ? jobConfig.mavenGoal : ( deploy ? "deploy" : "verify" )
                 stage("Build (Java ${jdkVersion}, ${goal})") {
                     def jenkinsJdkLabel = availableJDKs[jdkVersion]
                     if ( !jenkinsJdkLabel )
                         throw new RuntimeException("Unknown JDK version ${jdkVersion}")
                     withMaven(maven: mvnVersion, jdk: jenkinsJdkLabel ) {
                     dir(moduleDir) {
-                            sh "mvn clean ${goal} ${buildDesc.additionalMavenParams}"
+                            sh "mvn clean ${goal} ${jobConfig.additionalMavenParams}"
                         }
                     }
                 }
                 deploy = false
             }
         } else {
-            echo "Build is disabled, not building"
+            echo "Job is disabled, not building"
         }
     }
 }
\ No newline at end of file