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


The following commit(s) were added to refs/heads/feature/SLING-7245 by this 
push:
     new 574a265  SLING-7245 - Validate pull requests using Jenkins
574a265 is described below

commit 574a265484fde180df7e62ece2c6fbcd98704ff4
Author: Robert Munteanu <[email protected]>
AuthorDate: Tue Dec 18 00:06:06 2018 +0100

    SLING-7245 - Validate pull requests using Jenkins
    
    Deploy on the first Java build
---
 vars/slingOsgiBundleBuild.groovy | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/vars/slingOsgiBundleBuild.groovy b/vars/slingOsgiBundleBuild.groovy
index a23678d..817e7fc 100644
--- a/vars/slingOsgiBundleBuild.groovy
+++ b/vars/slingOsgiBundleBuild.groovy
@@ -6,7 +6,7 @@ def call(Map params = [:]) {
         jdks: [8],
         downstreamProjects: [],
         archivePatterns: [],
-        mavenGoal: 'install',
+        mavenGoal: '',
         additionalMavenParams: '',
         rebuildFrequency: '@weekly',
         enableXvfb: false,
@@ -29,8 +29,10 @@ def call(Map params = [:]) {
             }
         }
 
+        deploy = true
         buildDesc.jdks.each { jdkVersion -> 
-            stage("Build (Java ${jdkVersion})") {
+            def goal = buildDesc.mavenGoal ? buildDesc.mavenGoal : ( deploy ? 
"deploy" : "verify" )
+            stage("Build (Java ${jdkVersion}, goal : ${goal})") {
                 def jenkinsJdkLabel = availableJDKs[jdkVersion]
                 if ( !jenkinsJdkLabel )
                     throw new RuntimeException("Unknown JDK version 
${jdkVersion}")
@@ -40,6 +42,7 @@ def call(Map params = [:]) {
                     }
                 }
             }
+            deploy = false
         }
     }
 }
\ No newline at end of file

Reply via email to