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 4ac44f9 SLING-7245 - Validate pull requests using Jenkins
4ac44f9 is described below
commit 4ac44f9399bd627935582557443f991e655b336e
Author: Robert Munteanu <[email protected]>
AuthorDate: Tue Dec 18 00:06:06 2018 +0100
SLING-7245 - Validate pull requests using Jenkins
Tentatively move to a JSON module descriptor.
---
vars/slingOsgiBundleBuild.groovy | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/vars/slingOsgiBundleBuild.groovy b/vars/slingOsgiBundleBuild.groovy
index 27052ad..a1412af 100644
--- a/vars/slingOsgiBundleBuild.groovy
+++ b/vars/slingOsgiBundleBuild.groovy
@@ -1,8 +1,17 @@
-import sling.SlingModuleParser;
-
def call(Map params = [:]) {
def availableJDKs = [ 8: 'JDK 1.8 (latest)', 9: 'JDK 1.9 (latest)']
def mvnVersion = 'Maven 3.3.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 : '.'
@@ -11,11 +20,13 @@ def call(Map params = [:]) {
checkout scm
stage('Init') {
- def parser = new SlingModuleParser('.sling-module.xml')
- if ( fileExists('.sling-module.xml') ) {
- parser.parse()
+ if ( fileExists('.sling-module.json') ) {
+ overrides = readJson file: '.sling-module.json'
+ echo "Jenkins overrides: ${overrides.jenkins}"
+ if ( overrides.jenkins?.jdks ) {
+ buildDesc.jdks = overrides.jenkins.jdks
+ }
}
- def buildDesc = parser.buildDesc;
}
buildDesc.jdks.each { jdkVersion ->