This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-tooling-jenkins.git
The following commit(s) were added to refs/heads/master by this push: new f207646 SLING-7163 - Update Jenkins jobs to reference the git repositories f207646 is described below commit f2076465ef83cc2c17e4e0f9f3e1929ee7bba3d9 Author: Robert Munteanu <romb...@apache.org> AuthorDate: Mon Nov 6 17:32:06 2017 +0200 SLING-7163 - Update Jenkins jobs to reference the git repositories First rough conversion to use GitHub. For now the the repositories are read from the repo manifest but should be stored in a file with more information. This would in turn allow us to store more attributes, like supported jdks, artifacts to archive, etc. --- create_jobs.groovy | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/create_jobs.groovy b/create_jobs.groovy index 08a092c..9ba7484 100644 --- a/create_jobs.groovy +++ b/create_jobs.groovy @@ -1,7 +1,9 @@ -def svnBase = "https://svn.apache.org/repos/asf/sling/trunk" -// all modules should be listed here +def repoUrl = "https://raw.githubusercontent.com/apache/sling-aggregator/master/default.xml" +def repoBase = "https://github.com/apache/" +// Repositories are read from the repo definition file. Not all keys are currently +// read from the repo xml file. // keys: -// - location ( required ) : the SVN directory relatory to svnBase +// - location ( required ) : the GitHub project name // - jdks (optional) : override the default jdks to use for build // - downstream (optional): list of downstream projects // - archive (optional): list of archive patterns @@ -9,9 +11,19 @@ def svnBase = "https://svn.apache.org/repos/asf/sling/trunk" // - rebuildDaily (optional): boolean, when enabled configures the build to run once every // 24 hours,even if no changes are found in source control +def modules = [] +// TODO - move blacklist out of this file +def blacklist = ['sling-tooling-jenkins', 'sling-tooling-scm'] -// force module jobs deletion while we setup the new git jobs -def modules = [] +println "Hello" + +def manifest = new XmlParser().parse(repoUrl) +manifest.project.each { project -> + jobName = project.@name.toString().replace(".git","") + if ( !blacklist.contains(jobName) ) { + modules += [ location: project.@name.toString().replace(".git", "")] + } +} // should be sorted from the oldest to the latest version // so that artifacts built using the oldest version are @@ -28,7 +40,6 @@ def jdkMapping = [ modules.each { module -> - def svnDir = svnBase +"/" + module.location def jdks = module.jdks ?: defaultJdks def deploy = true @@ -57,10 +68,7 @@ for more details</p>''') } scm { - svn(svnDir) { svnNode -> - svnNode / browser(class: 'hudson.scm.browsers.ViewSVN') / - url << 'http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN' - } + github('apache/' + module.location) } blockOnUpstreamProjects() @@ -129,5 +137,5 @@ for more details</p>''') } String jobName(String location, String jdk) { - return "sling-" + location.replaceAll('/','-')+'-' + jdk; + return location + '-' + jdk; } -- To stop receiving notification emails like this one, please contact ['"commits@sling.apache.org" <commits@sling.apache.org>'].