[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [websites/build-kde-org/sok-work] /: Missing a very important file..
From:       Scarlett Clark <scarlett () scarlettgatelyclark ! com>
Date:       2015-03-28 21:10:52
Message-ID: E1Yby0K-0002rl-Ln () scm ! kde ! org
[Download RAW message or body]

Git commit 8e61ecdbf0f82026640369228f7e727c712d2fa2 by Scarlett Clark.
Committed on 28/03/2015 at 21:10.
Pushed by scarlettclark into branch 'sok-work'.

Missing a very important file..

M  +25   -43   base.groovy

http://commits.kde.org/websites/build-kde-org/8e61ecdbf0f82026640369228f7e727c712d2fa2

diff --git a/base.groovy b/base.groovy
index 7c81ad0..72b1af6 100644
--- a/base.groovy
+++ b/base.groovy
@@ -16,7 +16,6 @@ import static helpers.PublishersProjectHelper.*
 import static helpers.ProjectNotificationsHelper.*
 import groovy.lang.Closure;
 import javaposse.jobdsl.dsl.helpers.*
-
 import java.lang.Object;
 import java.util.ArrayList;
 
@@ -37,28 +36,7 @@ projectsfile.close()
 ArrayList jobjsonfiles = (ArrayList) getJobConfig('identifiers.json', "${WORKSPACE}")
 Iterator projects = jobjsonfiles.iterator();
 
-/*//Verify that identifiers and kde_projects.xml have the same jobs.
-Node kdeprojects = new XmlParser().parse("${WORKSPACE}/projects.xml")
-Iterator aproject = kdeprojects.iterator();
-
-aproject.component[0].module.each { module ->
-	def xmlprojectname
-	assert component[0].@identifier == 'kdesupport'
-	if (module.project.@identifier != null && module.project.status != "inactive") {
-		xmlprojectname = module.project.@identifier.text()
-	} else if (module.@identifier != null && module.status != "inactive") {
-		xmlprojectname = module.@identifier.text()
-	} else if (module.project.status == "inactive") {
-		println "${module.project.@identifier} is inactive"
-	}
-	def findprojectname = jobjsonfiles.findAll("${xmlprojectname}")
-	println findprojectname
-	//boolean verified = findprojectname
-	println xmlprojectname
-if (verified == false ) {
-	println "${xmlprojectname} is a new job that needs to be added to identifiers please." 
-	}
-}*/
+//println verificationCheck(jobjsonfiles, "${WORKSPACE}")
 /* Start the job variable configuration section for each each job*/	
 while(projects.hasNext()) {
 	/* This object contains the json config from
@@ -102,10 +80,16 @@ while(projects.hasNext()) {
 	/* Repo specific variables */
 	//Configure the repo from dependencies //TO-DO this better
 	def repo
-	if (jobname == 'kdesupport-svn') {
-		repo = "svn://anonsvn.kde.org/home/kde/trunk/kdesupport"
+	def external
+	if (json.svn != null) {
+		repo = json.svn
+		external = true
+	} else if (json.git !=null) {
+		repo = json.git
+		external = true
 	} else {
 		repo = projectxml.repourl.find { it.value }.toString()
+		external = false
 	}	
 	// Redmine
 	def redmine = projectxml.redmine ?: null
@@ -121,10 +105,10 @@ while(projects.hasNext()) {
 	def result = new groovy.json.JsonSlurper().parse(JOBCONFIG)
 	Object metadata = result
 	// Now with the metadata we need to search for the <path> and find data and or wildcards.	
-	def grouppath = findPath(path, metadata, jobname )
+	def grouppath = findPath(path, metadata, jobname, external)
 	
 	// Remove pesky null entries.
-	if (repo =~ "svn:/") { 
+	if (external == true ) { 
 	} else {
 		grouppath.removeAll([null])
 	}
@@ -133,16 +117,21 @@ while(projects.hasNext()) {
 	
 	if (repo =~ 'svn:/') {		
 		println "Creating SVN job ${jobname}"
-	} else if (grouppath == [] && repo !=~ 'svn:/') {		
+	} else if (external == true && json.git != null) {
+		println "Creating External job ${jobname}"
+	} else if (grouppath == [] && external != true) {		
 		println "Unable to create ${jobname} it is not defined in logical_module_structure"	
 		continue;
 	} else {
 		newmap = [:] << grouppath
 	}
 	// Retrieve the branchGroup/branch map from the path result.
-	def branchlist
-	if (repo =~ 'svn:/') {
-		branchlist = ['master']		
+	def branchlist	
+	if (external == true) {
+		def bl = json.getAt("branchgroups")
+		newmap = [:] << bl
+		def Map branchgroups = ['branchgroups':newmap]
+		branchlist = branchgroups.values() as HashMap;
 	} else {
 		branchlist = newmap.values() as HashMap;
 		def iterator = branchlist.entrySet().iterator()
@@ -152,21 +141,13 @@ while(projects.hasNext()) {
 			}
 		}
 	}	
-	// Gather the branchGroup keys and iterate branchGroup as a closure
-	
-	def branchgroups
-	if (repo =~ 'svn:/') {
-		 branchgroups = ['stable-qt4', 'kf5-qt5', 'stable-kf5-qt5']		 
-	} else {	
-		 branchgroups = branchlist.keySet() as String[];
-	}	
+	// Gather the branchGroup keys and iterate branchGroup as a closure		
+	def branchgroups = branchlist.keySet() as String[];
+		
 	// Now for each branchGroup determine branchGroup specific values.
 	branchgroups.each { branchGroup ->
 		try{
-		if (repo =~ 'svn:/') {				
-		} else {
-			branch = branchlist.getAt(branchGroup).toString().trim()
-		}
+		branch = branchlist.getAt(branchGroup).toString().trim()
 		/* Here we determine the combinations we want to build. 
 		 * It is *VERY* important that if platforms or compilers are 
 		 * changed in identifiers.json the appropriate combination
@@ -269,6 +250,7 @@ while(projects.hasNext()) {
 			// createDownstream(ArrayList downstream, String branchGroup)
 			createEmailNotifications(jobname, email)
 			//createIRCNotifications(jobname, irc)
+			
 		}
 		/* We need to check for qt5 jobname and create a pre SCM to run --init-repository for
 		 * submodules. I could not find an easy way to accomplish this with the git plugin.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic