You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by db...@apache.org on 2015/05/14 23:09:34 UTC

cordova-medic git commit: Removed extra Cordova config from repo. There is now only a sample file, just like cordova-config.json and private.py.

Repository: cordova-medic
Updated Branches:
  refs/heads/master 9dd297c07 -> 298c08d66


Removed extra Cordova config from repo. There is now only a sample file, just like cordova-config.json and private.py.


Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/298c08d6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/298c08d6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/298c08d6

Branch: refs/heads/master
Commit: 298c08d6674cf10fa07fe590ce2c8d08dc7432b7
Parents: 9dd297c
Author: Dmitry Blotsky <dm...@gmail.com>
Authored: Thu May 14 14:09:30 2015 -0700
Committer: Dmitry Blotsky <dm...@gmail.com>
Committed: Thu May 14 14:09:30 2015 -0700

----------------------------------------------------------------------
 .gitignore                              |  1 +
 buildbot-conf/cordova-extra.conf.sample | 38 ++++++++++++
 buildbot-conf/cordova-internal.conf     | 92 ----------------------------
 buildbot-conf/cordova.conf              | 13 ++++
 buildbot-conf/projects.conf             |  1 -
 5 files changed, 52 insertions(+), 93 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/298c08d6/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index ed0d1eb..3ae9089 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 node_modules
 cordova-config.json
 private.py
+cordova-extra.conf

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/298c08d6/buildbot-conf/cordova-extra.conf.sample
----------------------------------------------------------------------
diff --git a/buildbot-conf/cordova-extra.conf.sample b/buildbot-conf/cordova-extra.conf.sample
new file mode 100644
index 0000000..bca6a81
--- /dev/null
+++ b/buildbot-conf/cordova-extra.conf.sample
@@ -0,0 +1,38 @@
+# NOTE:
+#      this file gets executed at the bottom of cordova.conf, and
+#      has access to all of its globals
+
+####### UTILITIES
+
+# None
+
+####### SLAVES
+
+c['slaves'].extend([])
+
+####### CHANGESOURCES
+
+# NOTE:
+#      Apache's (and our) master.cfg sets this to one change source,
+#      so we should make it a list before adding our own change sources
+old_change_source  = c['change_source']
+c['change_source'] = list()
+c['change_source'].append(old_change_source)
+
+c['change_source'].extend([])
+
+####### STEPS
+
+# None
+
+####### BUILDERS
+
+c['builders'].extend([])
+
+####### STATUS TARGETS
+
+c['status'].extend([])
+
+####### SCHEDULERS
+
+c['schedulers'].extend([])

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/298c08d6/buildbot-conf/cordova-internal.conf
----------------------------------------------------------------------
diff --git a/buildbot-conf/cordova-internal.conf b/buildbot-conf/cordova-internal.conf
deleted file mode 100644
index e87dd22..0000000
--- a/buildbot-conf/cordova-internal.conf
+++ /dev/null
@@ -1,92 +0,0 @@
-import os
-import json
-
-from buildbot.changes.gitpoller import GitPoller
-from buildbot.schedulers.forcesched import ForceScheduler
-
-# config
-MEDIC_CONFIG_FILE    = os.path.join(FP, 'cordova-config.json')
-PROJECTS_CONFIG_FILE = os.path.join(FP, 'cordova-repos.json')
-
-def parse_config_file(file_name):
-    with open(file_name, 'r') as config_file:
-        return json.load(config_file)
-
-medic_config    = parse_config_file(MEDIC_CONFIG_FILE)
-projects_config = parse_config_file(PROJECTS_CONFIG_FILE)
-
-# constants
-GIT_BIN       = 'git' if os.name != 'nt' else 'C:\Program Files (x86)\Git\cmd\git.exe'
-GITPOLLER_DIR = 'gitpoller-workdir'
-
-POLLED_PROJECT_PATTERNS = [
-    'cordova-mobile-spec',
-    'cordova-lib',
-    'cordova-js',
-    'cordova-cli',
-    'cordova-medic',
-    'cordova-plugman',
-    'cordova-windows',
-    'cordova-android',
-]
-
-####### UTILITIES
-
-# helpers
-def is_polled_project(project_name):
-    return True if any(pattern in project_name for pattern in POLLED_PROJECT_PATTERNS) else False
-
-def get_polled_projects():
-    return (project for project_name, project in projects_config.items() if is_polled_project(project_name))
-
-def make_git_poller(repo_uri):
-    # NOTE:
-    #      branches=True means watching all branches
-    return GitPoller(repo_uri, workdir=GITPOLLER_DIR, branches=True, pollinterval=120, gitbin=GIT_BIN)
-
-####### SLAVES
-
-c['slaves'].extend([])
-
-####### CHANGESOURCES
-
-# NOTE:
-#      Apache's (and our) master.cfg sets this to one change source,
-#      so we make it a list before adding our own change sources
-old_change_source  = c['change_source']
-c['change_source'] = list()
-c['change_source'].append(old_change_source)
-
-# add a git poller for each codebase of each project
-for project in get_polled_projects():
-    for codebase_name, codebase in project['codebases'].items():
-        c['change_source'].append(make_git_poller(codebase['repo']))
-
-####### STEPS
-
-# None
-
-####### BUILDERS
-
-c['builders'].extend([])
-
-####### STATUS TARGETS
-
-c['status'].extend([])
-
-####### SCHEDULERS
-
-c['schedulers'].extend([
-    ForceScheduler(
-        name         = 'cordova_force',
-        builderNames = [
-            'cordova-ios',
-            'cordova-android-osx',
-            'cordova-blackberry-osx',
-            'cordova-windows',
-            'cordova-wp8',
-            'cordova-android-win',
-            'cordova-blackberry-win',
-        ]
-    ),
-])

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/298c08d6/buildbot-conf/cordova.conf
----------------------------------------------------------------------
diff --git a/buildbot-conf/cordova.conf b/buildbot-conf/cordova.conf
index 9caa0a8..12e3d10 100644
--- a/buildbot-conf/cordova.conf
+++ b/buildbot-conf/cordova.conf
@@ -34,6 +34,7 @@ projects_config = parse_config_file(PROJECTS_CONFIG_FILE)
 DEFAULT_REPO_NAME      = 'src'
 BASE_WORKDIR           = '.'
 TEST_APP_NAME          = 'mobilespec'
+EXTRA_CONFIG_FILE_NAME = 'cordova-extra.conf'
 REPOS_PROPERTY_NAME    = 'repositories_config'
 NPM_CACHE_DIR          = 'npm_cache'
 NPM_TEMP_DIR           = 'npm_tmp'
@@ -353,3 +354,15 @@ c['schedulers'].extend([
         ],
     ),
 ])
+
+####### EXTRA CONFIG
+
+# run the extra config file as if it was pasted
+# below, passing it a copy of our globals
+extra_config_path = os.path.join(FP, EXTRA_CONFIG_FILE_NAME)
+if os.path.exists(extra_config_path):
+    print 'Loading extra Cordova config'
+    globals_copy = globals().copy()
+    execfile(extra_config_path, globals_copy, globals_copy)
+else:
+    print 'No extra Cordova config found'

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/298c08d6/buildbot-conf/projects.conf
----------------------------------------------------------------------
diff --git a/buildbot-conf/projects.conf b/buildbot-conf/projects.conf
index da3051b..926bd74 100644
--- a/buildbot-conf/projects.conf
+++ b/buildbot-conf/projects.conf
@@ -8,4 +8,3 @@ def one_file(f, symbols_to_keep = set()):
             globals().update({symbol: globals_copy[symbol]})
 
 one_file('cordova.conf')
-one_file('cordova-internal.conf')


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org