You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2015/03/19 07:54:20 UTC

[2/2] cordova-medic git commit: [CB-8698] Rewriting cordova.conf: factoring out common build code, parametrising builds with Buildbot Properties, and adding extra steps for cleanup. Removing unused plugin code. Cleaning up documentation. Cleaning up file

[CB-8698] Rewriting cordova.conf: factoring out common build code, parametrising builds with Buildbot Properties, and adding extra steps for cleanup. Removing unused plugin code. Cleaning up documentation. Cleaning up file layout. Adding config extensibility.


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

Branch: refs/heads/master
Commit: 0e37682dc95cbff014bef348aa53f81b2b642479
Parents: eb06049
Author: Dmitry Blotsky <dm...@gmail.com>
Authored: Fri Mar 6 21:35:18 2015 -0800
Committer: Dmitry Blotsky <db...@microsoft.com>
Committed: Wed Mar 18 11:02:29 2015 -0700

----------------------------------------------------------------------
 .gitignore                                     |   9 +-
 README.md                                      | 341 ++++++++-------
 SLAVES.md                                      |  39 ++
 bin/checkout.js                                |  53 +++
 build_android.js                               |   2 +-
 build_blackberry10.js                          |   4 +-
 build_ios.js                                   |   2 +-
 build_windows.js                               |   6 +-
 build_wp8.js                                   |   4 +-
 buildbot-conf/cordova-config.json.sample       |  42 ++
 buildbot-conf/cordova-internal.conf            |  92 ++++
 buildbot-conf/cordova-repos.json               | 457 ++++++++++++++++++++
 buildbot-conf/cordova.conf                     | 331 ++++++++++++++
 buildbot-conf/master.cfg                       | 349 +++++++++++++++
 buildbot-conf/private.py.sample                |  11 +
 buildbot-conf/projects.conf                    |  11 +
 checkout.js                                    |  39 --
 cordova-config.json.sample                     |  53 ---
 cordova-plugin-medic-newstyle-tests/plugin.xml |  14 -
 cordova-plugin-medic/LICENSE                   | 202 ---------
 cordova-plugin-medic/README.md                 |   7 -
 cordova-plugin-medic/docs/medic.md             |  61 ---
 cordova-plugin-medic/docs/medic.sha.md         | 109 -----
 cordova-plugin-medic/plugin.xml                |  41 --
 cordova-plugin-medic/www/jasmine-jsreporter.js | 214 ---------
 cordova-plugin-medic/www/medic.js              |  59 ---
 cordova-repos.json                             | 295 -------------
 cordova.conf                                   | 347 ---------------
 install.js                                     |  24 -
 master.cfg                                     | 306 -------------
 package.json                                   |  26 +-
 projects.conf                                  |  10 -
 src/build/makers/windows.js                    |   2 +-
 src/couchdb/interface.js                       |  10 +-
 src/utils/createMedicJson.js                   |   2 +-
 updateconfig.js                                |   2 +-
 36 files changed, 1585 insertions(+), 1991 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/0e37682d/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 45cf75b..ed0d1eb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,3 @@
-temp
 node_modules
-lib
-posts
-.DS_STORE
-/master/
-/slave_windows/
-Makefile*
+cordova-config.json
+private.py

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/0e37682d/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 6dd3482..2f869d0 100644
--- a/README.md
+++ b/README.md
@@ -1,166 +1,175 @@
-Medic using BuildBot
-=======
-
-> Tools for Automated Testing of Cordova
-
-# Supported Cordova Platforms
-- On Mac
-  - iOS
-  - Android
-- On Windows
-  - Android
-  - Windows Phone 8
-  - Windows Universal Apps (Windows 8.0, Windows 8.1, Windows Phone 8.1)
-
-#Installation
-##Select target OS
-Install on a Mac or Windows depending on target test platform(s)
-
-##Install prerequisites
-medic requires grunt-cli npm package to be installed globally. You can install it by typing `npm install -g grunt-cli` in console.
-
-**Note:** this requires admin privileges on Mac OS.
-
-## Setup CouchDB
-1. Get and install [couchdb](http://couchdb.apache.org/) 1.3.1 
-2. Edit the local.ini to accept request from external host
-
-  `bind_address = 0.0.0.0`
-  
-  Also you may need to add appropriate firewall rules for port 5984.
-  
-  To test access to CouchDB portal try to open \<CouchDB host IP\>:5984 from browser
-
-  **Note:** don't use local IPs (e.g. localhost, 127.0.0.1) for CouchDB as it will produce connection problems for devices and emulators (they will resolve them according to their context)
-
-3. Create the following three databases (functionality for creating of them should be available on \<CouchDB host IP\>:5984/_utils/):
-  - build_errors
-  - mobilespec_results
-  - test_details
-
-4. Add new document to `mobilespec_results` table with the following contents:
-  ```
-  {
-      "_id": "_design/results",
-      "views": {
-          "sha": {
-              "map": "function(doc){emit(doc.sha, {\"total\":doc.mobilespec.total,\"passed\":(doc.mobilespec.total - doc.mobilespec.failed),\"version\":doc.version,\"model\":doc.model,\"fails\":doc.mobilespec.failures});}"
-          }
-      }
-  }
-  ```
-
-5. Set up a wireless access point so that the devices being tested can access the couchDB
-
-## Install BuildBot
-1. Get [buildbot](http://buildbot.net) version 0.8.8
-2. Install buildbot using the buildbot install/tutorial instructions
-    http://docs.buildbot.net/latest/manual/installation.html
-
-    http://trac.buildbot.net/wiki/RunningBuildbotOnWindows
-3. Get the sample running
-4. Stop the slave and the master
-5. Add slaves:
-  - On Mac
-    - buildslave create-slave slave_ios localhost:9889 cordova-ios-slave pass
-    - buildslave create-slave slave_android localhost:9889 cordova-android-slave pass
-  - On Windows
-    - buildslave create-slave slave_windows localhost:9889 cordova-windows-slave pass
- 
-6. Copy the following files from the medic repository to buildbot master directory:
-  - master.cfg
-  - projects.conf
-  - cordova.conf
-  - cordova-repos.json
-  - cordova-config.json.sample
-
-  Then update cordova-config.json.sample with CouchDB host address, test platforms, ios keychain, current release build and _rename_ it to cordova-config.json
-  
-  **Note:** couchdb host must be specified via ip address due to windows platform restrictions.
-
-  **Note 2:** cordova-config.json and cordova-repos.json files should be placed near cordova.conf (for local Medic instance in most cases this means that they need to be placed in BuildBot master directory).
-
-#Running the System
-- start the master with ~buildbot start master
-- start the slaves with:
-  - On Mac
-    -  buildslave start slave_ios
-    -  buildslave start slave_android
-  - On Windows
-    - buildslave start slave_windows
-
-    **Note:**  on Windows slave instance must be run under administrator; git/bin folder must be added to PATH so that rm, cp, mkdir commands are available from the command prompt.
-    
-    **Note:**  if you are using Android emulator, please make sure that it has SD card size bigger than 0 (see [CB-8535](https://issues.apache.org/jira/browse/CB-8535)).
-- point your browser at http://localhost:8010/waterfall to see the buildbot state
-- point your browser to the couchDB http://\<CouchDB host IP\>:5984/_utils/index.html to look at detailed test results
-
-#Controlling
-- restart the master with buildbot restart master
-- stop the master with buildbot stop master
-- force a test by clicking on the test link at the top of the buildbot display and then 'force build'
-
-#Configuring
-- all changes for a local install should only require edits to cordova-config.json in the buildbot base directory
-- new platforms, test procedures, build steps, etc require edits to master.cfg, cordova.conf and cordova-repos.json which should still be global (all platforms)
-- whenever cordova-config.json, cordova-repos.json, cordova.conf or master.cfg changes, you need to restart the master (not slaves)
-
-#Overview
-Buildbot polls all the repositories every few minutes to look for changes. Whenever a change is detected, those changes trigger one or more build requests. 
-
-Buildbot consists of a master that defines all the tests, the repositories, triggers, etc.
-The actual tests are run by slaves that are controlled by the master. The buildbot master describes the steps to run for tests and which slaves those test should run on. 
-Slaves that run tests on devices can only run one test at a time.
-The common slave can run multiple tests at once.
-
-At the start of each test run, the collection of components (git repositories) and the checked out SHA for each is collected into a document and written to the couchDB in test_details. 
-The DB ref from this document is used as the SHA for the test and is what is recorded in mobilespec_results or build_errors
-
-The various test runners are configured to report a fail/pass by device and the buildbot display will report FAIL if any test on any device fails. 
-every command has a link to its output on the main display. When a mobile spec test completes, there is a link to the test result written to the output log.
-
-#Current Test Configuration
-- All slaves (Android, iOS, Windows) are configured to only run a single test at a time.
-- Tools (Coho, CLI, test system) always build from the master branch
-- Changes to tooling or the test scripts will trigger all tests.
-
-- Android tests:
-  - platform, mobilespec, js, and plugins from master branch (cordova-js is built and copied in)
-  - platform and mobilspec 3.0.x branch with the cordova-js embedded in the cordova-android repo, plugins from master
-  - There are additional builder (AndroidWin), which perform builds of mobilespec application for Android in Windows environment.
-
-- iOS tests:
-  - platform, mobilespec, js, and plugins from master branch (cordova-js is built and copied in)
-  - platform and mobilspec 3.0.x branch with the cordova-js embedded in the cordova-ios repo, plugins from master
-
-- Windows Phone8 tests:
-  - platform, mobilespec, js, and plugins from master branch (cordova-js is built and copied in).
-  - There are two separate builders, which performs builds in different environments (VS2012 + MSBuild 4.0 / VS2013 + MSBuild 12.0)
-
-- Windows Universal platform tests:
-  - platform, mobilespec, js, and plugins from master branch (cordova-js is built and copied in)
-  - Tests are executed on Local Machine, mobilespec app for --phone target is launched on emulator. Running mobilespec app on attached devices not supported yet.
-  - There are two separate builders, which performs builds in different environments (VS2012 + MSBuild 4.0 / VS2013 + MSBuild 12.0)
-
-The tests use COHO and CLI for as much as possible to ensure that the developer tool chain is working.
-
-#Configuration Files
-**master.cfg:** The main configuration file for buildbot. It is a python script and defines the triggers, builders and status display.
-It uses both cordova-config.json and cordova-repos.json to determine which platforms and versions to test.
-
-**projects.conf** Configuration script used to load per-project buildbot configurations.
-
-**cordova.conf** Configuration script that contains cordova project-specific buldbot configuration (Build steps, schedulers, build factories definitions, etc.)
-
-The two files above (_projects.conf_ and _cordova.conf_ are necessary to maintain compatibility with Apache Buildbot configuration files structure)
-
-**cordova-config.json:** Used by the buildbot master script and by some of the medic command-line tools. 
-It defines the platforms to test, the current release version, the couchdb url, and the ios keychain. 
-The release version specified here is used anywhere the keyword "RELEASE" is used in a test definition.
-
-**cordova-repos.json:** Contains the definitions for the tests (schedulers) and the various repositories in the project. 
-Tests define the components and branches that should trigger a test run. 
-This requires multiple triggers for each test path since a build might use tools from master, platforms from release and plugins from dev.
-
-For each repo there is a release branch (most recent supported release) and a current branch (tip-of-tree). 
-The branches are used by the python script in conjunction with the tests to set up the trggers.
+Cordova Medic
+=============
+
+# Description
+
+This repository contains Buildbot configuration and automation tools for setting up a continuous integration system for Apache Cordova. It currently supports builds on the following platforms:
+
+- iOS
+- Android (Windows and OS X)
+- Windows Universal Apps (Windows 8.0, Windows 8.1, Windows Phone 8.1)
+- Windows Phone 8
+
+# Prerequisites
+
+## CouchDB
+
+Medic depends on CouchDB for reporting results. The following steps document how to install a CouchDB server for development. If a CouchDB server already exists for use, feel free to skip to the Setting Up section.
+
+### Installation
+
+CouchDB can be installed from [this page][couchdb] as per the documentation provided there. Once CouchDB is installed, configure it to accept requests from external hosts by setting the following value in its `local.ini` file:
+
+    bind_address = 0.0.0.0
+
+Firewall rules for port 5984 (the default CouchDB port) may need to be added to allow access to the server. To test that it is configured correctly, open `http://[COUCHDB_HOST]:5984/_utils/` from a browser.
+
+### Setup
+
+Create the following databases:
+
+- build_errors
+- test_details
+- mobilespec_results
+
+They can be created by going to the CouchDB admin page (located at `http://[COUCHDB_HOST]:5984/_utils/`) and clicking the `Create Database ...` button.
+
+Next, add the following document to the `mobilespec_results` database:
+
+    {
+        "_id": "_design/results",
+        "views": {
+            "sha": {
+                "map": "function(doc){emit(doc.sha, {\"total\":doc.mobilespec.total,\"passed\":(doc.mobilespec.total - doc.mobilespec.failed),\"version\":doc.version,\"model\":doc.model,\"fails\":doc.mobilespec.failures});}"
+            }
+        }
+    }
+
+Lastly, make sure that devices and machines that will be using Medic have access to the Internet and to the CouchDB server that was just created.
+
+## Python
+
+Medic contains Python code and therefore requires Python. Install Python 2.7.x from [here][python]. *Do not install Python 3.x, because Medic does not run on it.* Make sure that the Python package manager, pip, is installed with Python. To verify that Python and pip are installed, run the following:
+
+    python --version
+    pip --version
+
+On Windows, the PyWin32 extensions are required, and they can be acquired [here][pywin32].
+
+## Buildbot
+
+Medic uses Buildbot for running builds and performing continuous integration. Buildbot has the concept of master and slave machines, and has different libraries for each. (More info about Buildbot concepts can be found [here][bbconcepts]). To install the Buildbot library for a master, run the following:
+
+    pip install buildbot
+
+For a machine that will run Buildbot slaves, install the Buildbot slave library by running the following:
+
+    pip install buildbot-slave
+
+## UNIX tools
+
+To run builds, Medic slaves use some standard Unix tools such as `cp`, `rm`, and `git`. To run them on Windows, install Git from [here][git] and make sure to select the option to make basic Unix tools bundled with Git available within `cmd`.
+
+## Cordova
+
+Any core depencencies of Cordova, like Node.js and NPM, are naturally dependencies of the slave machines that will run Cordova builds. Node.js and NPM can be obtained from [here][node].
+
+# Installation
+
+Medic contains configuration for a Buildbot installation to run Apache Cordova continuous integration. Buildbot uses the master-slave paradigm to orchestrate builds, and medic contains configuration for a Buildbot master and slaves, as well as a few extra files, all inside the `buildbot-conf` directory.
+
+The instructions provided below describe a simple development setup, not a full-blown production deployment, which is outside the scope of this document. More official documentation on Buildbot can be found [here][buildbot], and on running Buildbot on Windows can be found [here][buildbot_windows].
+
+Although a Buildbot master and slaves are separate tasks, they do not need to be run on different machines, and the following steps can either be performed on separate machines or the same one. Keep in mind however that a slave can only run builds that its machine's environment supports.
+
+All of the following steps assume that Buildbot's slaves and masters will be installed under `/home/buildbot`.
+
+## Master
+
+First, create a Buildbot master. The following steps are a summary of [these official steps][buildmaster], so please feel free to follow the official ones instead.
+
+Create a master directory at `/home/buildbot/master` by running:
+
+    buildbot create-master /home/buildbot/master
+
+Then, install the Medic master configuration by copying the following files into `/home/buildbot/master`, overwriting any files if prompted:
+
+- master.cfg
+- projects.conf
+- cordova.conf
+- cordova-internal.conf
+- cordova-repos.json
+- *cordova-config.json*<sup>[1]</sup>
+- *private.py*<sup>[1]</sup>
+
+<sup>[1]</sup> These two files do not exist in the repository and must be created for each installation of Medic. Create them from their respective `.sample` files.
+
+## Slaves
+
+Now, create slaves. Similarly to the above instructions, the following steps are a summary of [the official ones][buildslave], so please feel free to follow the official ones.
+
+On OS X:
+
+    buildslave create-slave /home/buildbot/osx http://[MASTER_HOST]:9889 cordova-ios-slave pass
+
+On Linux:
+
+    buildslave create-slave /home/buildbot/linux http://[MASTER_HOST]:9889 cordova-linux-slave pass
+
+On Windows 8 and Windows 8.1:
+
+    buildslave create-slave /home/buildbot/windows http://[MASTER_HOST]:9889 cordova-windows-slave pass
+
+No further steps are necessary to make a slave obey a Medic master. However, every slave needs to be configured appropriately for its platform. For platform-specific details on slave configuration, see [SLAVES.md](SLAVES.md).
+
+# Running
+
+To start the master, run:
+
+    buildbot start /home/buildbot/master
+
+To start a slave (e.g. for Windows), run:
+
+    buildslave start /home/buildbot/windows
+
+To view the master control panel, browse the URI: `http://[MASTER_HOST]/`.
+
+To stop either task, just replace `start` with `stop` in the above commands. **NOTE**: On Windows, the slave task blocks the console, and `Ctrl-C` will stop it. On all other platforms both master and slave run as daemons, and using the `stop` command will terminate them.
+
+To check logs for a master or a slave, look at the `twistd.log` file in its respective directory. Using the `tail` utility is very handy for this, like so:
+
+    tail -n 100 -f /home/buildbot/osx/twistd.log
+
+# Changing Configuration
+
+Buildbot has an unusual configuration mechanism (Python code) and as such requires a restart to reload it. The Buildbot documentation also describes a  `buildbot reconfig` command, but it does not work in all cases. More information is [here][reconfig].
+
+In general, when any of the files in the master directory are changed, a restart/reconfig is necessary. However, slaves do not need to be reconfigured or restarted when the master's configuration changes.
+
+# Configuration Layout
+
+**master.cfg**: The main configuration file for Buildbot. This file is made to be similar to the one used on the Apache Infrastructure Buildbot because Medic runs on there.
+
+**projects.conf**: This file is included because it also mirrors the Apache Infrastructure setup.
+
+**cordova.conf**: This file contains the actual Buildbot configuration that is unique to Apache Cordova.
+
+**cordova-internal.conf**: An extension of `cordova.conf` that is internal to a particular installation of Medic and does not make it into the Apache Infrastructure Buildbot.
+
+**cordova-repos.json:** List of Cordova repositories and their relevant information.
+
+**cordova-config.json**: Installation-specific file that defines miscellaneous parameters like CouchDB host and port, and email credentials. *Only a sample of this file is provided in the repo, with a `.sample` extension.*
+
+**private.py**: Python file containing sensitive configuration. *Only a sample of this file is provided in the repo, with a `.sample` extension.*
+
+[couchdb]:          http://couchdb.apache.org/
+[python]:           https://www.python.org/downloads/
+[pywin32]:          http://sourceforge.net/projects/pywin32/files/
+[buildbot]:         http://docs.buildbot.net/0.8.10/manual/installation.html
+[buildmaster]:      http://docs.buildbot.net/0.8.10/manual/installation.html#creating-a-buildmaster
+[buildslave]:       http://docs.buildbot.net/0.8.10/manual/installation.html#creating-a-buildslave
+[bbconcepts]:       http://docs.buildbot.net/0.8.10/manual/concepts.html
+[git]:              http://git-scm.com/download/win
+[node]:             http://nodejs.org/download/
+[buildbot_windows]: http://trac.buildbot.net/wiki/RunningBuildbotOnWindows
+[reconfig]:         http://docs.buildbot.net/0.8.10/manual/cfg-intro.html#reloading-the-config-file-reconfig

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/0e37682d/SLAVES.md
----------------------------------------------------------------------
diff --git a/SLAVES.md b/SLAVES.md
new file mode 100644
index 0000000..9a1e974
--- /dev/null
+++ b/SLAVES.md
@@ -0,0 +1,39 @@
+Cordova Medic Slaves
+====================
+
+# Introduction
+
+This document describes slave-specific setup for Cordova Medic for running builds on each platform.
+
+### iOS
+
+For iOS slaves, Xcode is required. It can be obtained from the Apple App Store, which requires an Apple ID. For deployment to physical devices, a valid Apple Developer license is also necessary.
+
+Two special NPM packages are also required for Medic builds on iOS: `ios-sim` and `ios-deploy`. You can install them by running the following command with root/Administrator privileges:
+
+    npm install -g ios-deploy ios-sim
+
+### Android
+
+For Android slaves, the Android SDK is required, and can be installed with Android Studio as described [here][android_full] or without Android Studio as described [here][android_cli]. Alternatively, if the slave is running Windows, all tools required for Cordova can be installed in bulk using the the VS [tools for Cordova][vs_cordova].
+
+Once the SDK is installed, Android tools can be installed by running:
+
+    android
+
+For emulation, at least one Android Virtual Device should be available, which can be created by running:
+
+    android avd
+
+**Note:** Due to an [existing issue][issue], configure the AVD such that it has an SD card with space greater than 0KB.
+
+### Windows 8 and Windows 8.1
+
+For Windows slaves, Visual Studio is required. For deployment to devices, a Windows Developer License is also required. To install a developer, run the following from PowerShell:
+
+    Show-WindowsDeveloperLicenseRegistration
+
+[android_full]: http://developer.android.com/sdk/installing/index.html?pkg=studio
+[android_cli]:  http://developer.android.com/sdk/installing/index.html?pkg=tools
+[vs_cordova]:   http://www.visualstudio.com/en-us/explore/cordova-vs.aspx
+[issue]:        https://issues.apache.org/jira/browse/CB-8535

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/0e37682d/bin/checkout.js
----------------------------------------------------------------------
diff --git a/bin/checkout.js b/bin/checkout.js
new file mode 100644
index 0000000..29c6e6f
--- /dev/null
+++ b/bin/checkout.js
@@ -0,0 +1,53 @@
+#!/usr/bin/env node
+
+// node dependencies
+var fs = require('fs');
+
+// external dependencies
+var shell = require('shelljs');
+
+// parse args
+var argv = require('optimist')
+    .usage('Usage: $0 --config {path} --exclude {name[,name[,...]]}')
+    .demand('config')
+    .argv;
+
+function cloneProject(projectName, projectsConfig) {
+
+    var project  = projectsConfig[projectName];
+    var codebase = project.codebases[project.codebase];
+    var command  = 'git clone ' + codebase.repo + ' --branch=' + codebase.branch + ' --depth 1'
+
+    shell.exec(command, {silent: false}, function (returnCode, output) {
+        if (returnCode !== 0) {
+            throw 'Command \'' + command + '\' failed with code ' + returnCode;
+        }
+    });
+}
+
+function main () {
+
+    // get args
+    var configFile    = argv.config;
+    var excludedNames = [];
+
+    if (argv.exclude) {
+        excludedNames = argv.exclude.split(',');
+    }
+
+    // shell config
+    shell.config.fatal  = true;
+    shell.config.silent = false;
+
+    // read in config
+    var projectsConfig = JSON.parse(fs.readFileSync(configFile, 'utf8'));
+
+    // clone all projects in the config
+    for (projectName in projectsConfig) {
+        if (excludedNames.indexOf(projectName) === (-1)) {
+            cloneProject(projectName, projectsConfig);
+        }
+    }
+}
+
+main();

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/0e37682d/build_android.js
----------------------------------------------------------------------
diff --git a/build_android.js b/build_android.js
index 71f9e80..40998ad 100644
--- a/build_android.js
+++ b/build_android.js
@@ -30,7 +30,7 @@ buildinfo('Android', BRANCH, function (error, sha) {
 
         android(output_location, sha, test_timeout)
             .then(function onSuccess() {
-                return testcheck(sha, config.couchdb.host);
+                return testcheck(sha, config.couchdb.uri);
             }, function onError(err) {
                 TEST_OK = false;
                 error_writer('android', sha, 'Android tests execution failed.', err);

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/0e37682d/build_blackberry10.js
----------------------------------------------------------------------
diff --git a/build_blackberry10.js b/build_blackberry10.js
index 8442adc..e089524 100644
--- a/build_blackberry10.js
+++ b/build_blackberry10.js
@@ -10,7 +10,7 @@ var testcheck = require('./testchecker');
 
 var TEST_DIR=process.cwd();
 var BRANCH='master';
-var TOOL_DIR=path.join(TEST_DIR,'medic');
+var TOOL_DIR=path.join(TEST_DIR,'cordova-medic');
 var MSPEC_DIR=path.join(TEST_DIR,'mobilespec');
 
 var TEST_OK=true;
@@ -23,7 +23,7 @@ buildinfo('BlackBerry', BRANCH, function (error, sha ) {
     if(error) {
         TEST_OK=false;
     } else {
-        blackberry10(output_location, sha, config.app.entry, config.couchdb.host, function(err){
+        blackberry10(output_location, sha, config.app.entry, config.couchdb.uri, function(err){
             if(err) {
                 console.log('BlackBerry test prepare failed');
                 TEST_OK=false;

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/0e37682d/build_ios.js
----------------------------------------------------------------------
diff --git a/build_ios.js b/build_ios.js
index 21ba58d..1e60751 100644
--- a/build_ios.js
+++ b/build_ios.js
@@ -27,7 +27,7 @@ buildinfo('ios', branch, function (error, sha) {
 
         ios(output_location, sha, test_timeout)
             .then(function () {
-                return testcheck(sha, config.couchdb.host);
+                return testcheck(sha, config.couchdb.uri);
             }, function (err) {
                 TEST_OK = false;
                 error_writer('ios', sha, 'iOS tests execution failed.', err);

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/0e37682d/build_windows.js
----------------------------------------------------------------------
diff --git a/build_windows.js b/build_windows.js
index bab3d69..9187ad9 100644
--- a/build_windows.js
+++ b/build_windows.js
@@ -12,7 +12,7 @@ var fs              = require('fs'),
 
 var TEST_DIR = process.cwd().replace(/\\/g, '\\\\'),
     BRANCH = 'master',
-    TOOL_DIR = path.join(TEST_DIR, 'medic'),
+    TOOL_DIR = path.join(TEST_DIR, 'cordova-medic'),
     MSPEC_DIR = path.join(TEST_DIR, 'mobilespec'),
     TEST_OK = true;
 
@@ -53,7 +53,7 @@ buildinfo('Windows', BRANCH, function (error, sha) {
         if (build_target === "store80") {
             //setTargetStoreVersion('8.0'); // this value is used by default
         } else if (build_target === "store") {
-            // store target configuration is specified via config.xml 
+            // store target configuration is specified via config.xml
             setTargetStoreVersion('8.1');
         }
 
@@ -62,7 +62,7 @@ buildinfo('Windows', BRANCH, function (error, sha) {
 
         windows(output_location, sha, test_timeout, build_target)
             .then(function onSuccess() {
-                return testcheck(sha, config.couchdb.host);
+                return testcheck(sha, config.couchdb.uri);
             }, function onError(err) {
                 TEST_OK = false;
                 error_writer('windows', sha, 'Windows tests execution failed.', err);

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/0e37682d/build_wp8.js
----------------------------------------------------------------------
diff --git a/build_wp8.js b/build_wp8.js
index 73934db..7bd5b69 100644
--- a/build_wp8.js
+++ b/build_wp8.js
@@ -11,7 +11,7 @@ var path            = require('path'),
 
 var TEST_DIR = process.cwd().replace(/\\/g, '\\\\'),
     BRANCH = 'master',
-    TOOL_DIR = path.join(TEST_DIR, 'medic'),
+    TOOL_DIR = path.join(TEST_DIR, 'cordova-medic'),
     MSPEC_DIR = path.join(TEST_DIR, 'mobilespec'),
     TEST_OK = true;
 
@@ -33,7 +33,7 @@ buildinfo('WP8', BRANCH, function (error, sha) {
 
         wp8(output_location, sha, config.wp8.target, test_timeout)
             .then(function onSuccess() {
-                return testcheck(sha, config.couchdb.host);
+                return testcheck(sha, config.couchdb.uri);
             }, function onError(err) {
                 TEST_OK = false;
                 error_writer('wp8', sha, 'WP8 tests execution failed.', err);

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/0e37682d/buildbot-conf/cordova-config.json.sample
----------------------------------------------------------------------
diff --git a/buildbot-conf/cordova-config.json.sample b/buildbot-conf/cordova-config.json.sample
new file mode 100644
index 0000000..1625bc8
--- /dev/null
+++ b/buildbot-conf/cordova-config.json.sample
@@ -0,0 +1,42 @@
+{
+    "couchdb": {
+        "uri":  "http://localhost:5984"
+    },
+    "dashboard": {
+        "port": 8088
+    },
+    "app": {
+        "entry":   "cdvtests/index.html",
+        "timeout": 600
+    },
+    "blackberry": {
+        "devices": {
+            "ips":      [],
+            "password": "password"
+        },
+        "bb10": {
+            "sdk":             "",
+            "signingPassword": ""
+        },
+        "tablet": {
+            "sdk":             "",
+            "signingPassword": ""
+        }
+    },
+    "ios": {
+        "keychainPassword": "",
+        "keychainLocation": ""
+    },
+    "wp8": {
+        "target": "emulator"
+    },
+    "windows8": {
+        "target": "emulator"
+    },
+    "mail": {
+        "to":        ["someone@someplace.com"],
+        "from":      "yourbuildbot@yourEmailService.com",
+        "password":  "yourSMTPpassword",
+        "serverURL": "put your external url here"
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/0e37682d/buildbot-conf/cordova-internal.conf
----------------------------------------------------------------------
diff --git a/buildbot-conf/cordova-internal.conf b/buildbot-conf/cordova-internal.conf
new file mode 100644
index 0000000..e87dd22
--- /dev/null
+++ b/buildbot-conf/cordova-internal.conf
@@ -0,0 +1,92 @@
+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/0e37682d/buildbot-conf/cordova-repos.json
----------------------------------------------------------------------
diff --git a/buildbot-conf/cordova-repos.json b/buildbot-conf/cordova-repos.json
new file mode 100644
index 0000000..88da448
--- /dev/null
+++ b/buildbot-conf/cordova-repos.json
@@ -0,0 +1,457 @@
+{
+    "mobile-chrome-apps": {
+        "codebase":  "chrome",
+        "codebases": {
+            "chrome": {
+                "repo":   "https://github.com/MobileChromeApps/mobile-chrome-apps.git",
+                "branch": "master"
+            }
+        }
+    },
+
+    "cordova-medic": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-medic.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-medic.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-coho": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-coho.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-coho.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-mobile-spec": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-mobile-spec.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-mobile-spec.git",
+                "branch": "master"
+            }
+        }
+    },
+
+    "cordova-cli": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-cli.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-cli.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugman": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugman.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugman.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-lib": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-lib.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-lib.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-js": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-js.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-js.git",
+                "branch": "master"
+            }
+        }
+    },
+
+    "cordova-android": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-android.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-android.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-ios": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-ios.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-ios.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-wp8": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-wp8.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-wp8.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-windows": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-windows.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-windows.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-blackberry": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-blackberry.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-blackberry.git",
+                "branch": "master"
+            }
+        }
+    },
+
+    "cordova-plugin-test-framework": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-test-framework.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugins": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugins.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugins.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-battery-status": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-battery-status.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-camera": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-camera.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-console": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-console.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-contacts": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-contacts.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-device": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-device.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-device-motion": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-device-motion.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-device-orientation": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-device-orientation.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-device-orientation.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-dialogs": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-dialogs.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-file": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-file.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-file-transfer": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-file-transfer.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-geolocation": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-geolocation.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-globalization": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-globalization.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-inappbrowser": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-inappbrowser.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-media": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-media.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-media.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-media-capture": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-media-capture.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-network-information": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-network-information.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-splashscreen": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-splashscreen.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-statusbar": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-statusbar.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-vibration": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-vibration.git",
+                "branch": "master"
+            }
+        }
+    },
+    "cordova-plugin-whitelist": {
+        "codebase":  "github",
+        "codebases": {
+            "asf":  {
+                "repo":   "https://git-wip-us.apache.org/repos/asf/cordova-plugin-whitelist.git",
+                "branch": "master"
+            },
+            "github":  {
+                "repo":   "https://github.com/apache/cordova-plugin-whitelist.git",
+                "branch": "master"
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/0e37682d/buildbot-conf/cordova.conf
----------------------------------------------------------------------
diff --git a/buildbot-conf/cordova.conf b/buildbot-conf/cordova.conf
new file mode 100644
index 0000000..743e51c
--- /dev/null
+++ b/buildbot-conf/cordova.conf
@@ -0,0 +1,331 @@
+import os
+import re
+import json
+
+from buildbot.schedulers.timed import Nightly
+
+from buildbot.process.factory import BuildFactory
+from buildbot.config import BuilderConfig
+
+from buildbot.process.properties import renderer
+from buildbot.process.properties import Interpolate as I
+
+from buildbot.steps.source.git import Git
+from buildbot.steps.transfer import FileDownload
+from buildbot.steps.shell import ShellCommand
+from buildbot.steps.master import SetProperty
+
+from buildbot.status.results import SUCCESS
+
+# 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
+DEFAULT_REPO_NAME = 'src'
+BASE_WORKDIR      = '.'
+TEST_APP_NAME     = 'mobilespec'
+
+OSX     = 'osx'
+LINUX   = 'linux'
+WINDOWS = 'windows'
+
+# patterns
+CORDOVA_REPO_PATTERN = r'^.*(cordova-[^\.]+)\.git$'
+
+# interpretation of every byte-sized return code as success
+ALWAYS_SUCCESS = {i: SUCCESS for i in range(0, 256)}
+
+####### UTILITIES
+
+# helper functions
+def repo_name_from_url(url):
+    match = re.match(CORDOVA_REPO_PATTERN, url)
+    if match is not None:
+        return match.group(1)
+    return DEFAULT_REPO_NAME
+
+def repo_codebase_from_name(name):
+    repo          = projects_config[name]
+    codebase_name = repo['codebase']
+    return repo['codebases'][codebase_name]
+
+def repo_url_from_name(name):
+    return repo_codebase_from_name(name)['repo']
+
+def repo_branch_from_name(name):
+    return repo_codebase_from_name(name)['branch']
+
+def slugify(string):
+    return string.replace(' ', '-')
+
+def running_tasks_on_platform(platform_name, os_name):
+    """
+    Return the names of tasks possibly started by
+    builds on the given platform and OS.
+    """
+    if platform_name == 'windows':
+        return ['WWAHost.exe']
+    elif platform_name == 'wp8':
+        return ['Xde.exe']
+    elif platform_name == 'ios':
+        return ['iOS Simulator']
+    return []
+
+def can_find_running_tasks(step):
+    """
+    Return true if an OS and a platform is specified. Those are the
+    criteria for finding a task because running_tasks_on_platform uses
+    those properties to determine which tasks could be running.
+    """
+    return (
+        (step.build.getProperty('slaveos') is not None) and
+        (step.build.getProperty('platform') is not None)
+    )
+
+# renderers
+@renderer
+def render_mobilespec_platform(props):
+    platform = props.getProperty('platform')
+    if platform == 'blackberry':
+        platform = 'blackberry10'
+    return '--{0}'.format(platform)
+
+@renderer
+def render_repo_name(props):
+    repo_url = props.getProperty('repository')
+    return repo_name_from_url(repo_url)
+
+@renderer
+def render_task_kill_command(props):
+
+    os_name       = props.getProperty('slaveos')
+    platform_name = props.getProperty('platform')
+    running_tasks = running_tasks_on_platform(platform_name, os_name)
+
+    if not running_tasks:
+        return ['echo', 'No tasks to kill known.']
+
+    if os_name == WINDOWS:
+        command = ['taskkill', '/F']
+        for task in running_tasks:
+            command.append('/IM')
+            command.append(task)
+
+    else:
+        command = ['killall']
+        command.extend(running_tasks)
+
+    return command
+
+# step wrappers
+def DescribedStep(step_class, description, haltOnFailure=True, **kwargs):
+    return step_class(description=description, descriptionDone=description, name=slugify(description), haltOnFailure=haltOnFailure, **kwargs)
+
+def SH(workdir=BASE_WORKDIR, timeout=medic_config['app']['timeout'], **kwargs):
+    return DescribedStep(ShellCommand, workdir=workdir, timeout=timeout, **kwargs)
+
+def NPM(npm_command, command=list(), what='code', **kwargs):
+    return SH(command=['npm', npm_command] + command, description='npm ' + npm_command + 'ing ' + what, **kwargs)
+
+def NPMInstall(command=list(), **kwargs):
+    # NOTE:
+    #      adding the --cache parameter so that we don't use the global
+    #      npm cache, which is shared with other processes
+    return NPM('install', command=command + [I('--cache=%(prop:workdir)s/npm_cache')], **kwargs)
+
+def NPMTest(**kwargs):
+    return NPM('test', **kwargs)
+
+def BuildbotClone(repourl, what='code', workdir=None, **kwargs):
+    if workdir is None:
+        workdir = what
+    return DescribedStep(Git, 'cloning ' + what, repourl=repourl, workdir=workdir, mode='full', method='clobber', shallow=True, **kwargs)
+
+def CordovaClone(project_name, **kwargs):
+    branch   = repo_branch_from_name(project_name)
+    repo_url = repo_url_from_name(project_name)
+    return BuildbotClone(repourl=repo_url, branch=branch, what=project_name, **kwargs)
+
+def MedicClone(config_path, excludes=list(), **kwargs):
+    """
+    Clone repositories using medic's checkout.js script.
+    """
+    command     = ['node', 'cordova-medic/bin/checkout.js', '--config=' + config_path]
+    description = 'cloning configured repos'
+
+    if len(excludes) > 0:
+        excludes_string = ','.join(excludes)
+        command        += ['--exclude', excludes_string]
+        description    += ', except ' + excludes_string
+
+    return SH(command=command, description=description)
+
+def RMRF(path, description=None, **kwargs):
+
+    if description is None:
+        description = 'removing ' + path
+
+    # this is better than 'rm -rf' because it removes excessively long paths on Windows
+    js_script = "var s = require('shelljs'); console.log('removing {path}'); s.rm('-rf', '{path}');".format(path=path)
+
+    return SH(command=['node', '-e', js_script], description=description, **kwargs)
+
+def Set(name, value, **kwargs):
+    return DescribedStep(SetProperty, 'setting ' + name, property=name, value=value, **kwargs)
+
+def Download(mastersrc, slavedest):
+    return FileDownload(mastersrc=mastersrc, slavedest=slavedest, workdir=BASE_WORKDIR)
+
+####### SLAVES
+
+# NOTE:
+#      these slave names refer to the ones specified in master.cfg,
+#      and they must remain defined in master.cfg in order to work
+#      with the master.cfg used on Apache's Buildbot
+OSX_SLAVES     = ['cordova-ios-slave']
+WINDOWS_SLAVES = ['cordova-windows-slave']
+
+####### CHANGESOURCES
+
+# None, because Apache Buildbot's master.cfg manages them, and since
+# this file is shared with Apache Buildbot, we should not touch them.
+
+####### STEPS
+
+get_medic_steps = [
+
+    CordovaClone('cordova-medic'),
+
+    # --production switch is used to speed up installation + fruitstrap dev dependency is not supported on Windows
+    NPMInstall(command=['--production'], what='cordova-medic', workdir='cordova-medic'),
+]
+
+plugins_cleanup_steps = [
+
+    # set build properties
+    Set('repositoryname', render_repo_name),
+
+    # kill running emulators
+    SH(
+        command         = render_task_kill_command,
+        doStepIf        = can_find_running_tasks,
+        description     = 'killing running tasks',
+        haltOnFailure   = False,
+        flunkOnWarnings = False,
+        warnOnWarnings  = False,
+        decodeRC        = ALWAYS_SUCCESS,
+    ),
+
+    # clean up
+    NPMInstall(command=['shelljs'], what='shelljs'),
+    RMRF('~/.cordova/*', description='removing cache', haltOnFailure=False),
+    RMRF(BASE_WORKDIR + '/*', description='cleaning workspace', haltOnFailure=False),
+]
+
+common_plugins_steps = plugins_cleanup_steps + get_medic_steps + [
+
+    # download medic's config to slave
+    Download(mastersrc=PROJECTS_CONFIG_FILE, slavedest='cordova-medic/cordova-repos.json'),
+    Download(mastersrc=MEDIC_CONFIG_FILE, slavedest='cordova-medic/config.json'),
+
+    # clone all repos
+    MedicClone(config_path='cordova-medic/cordova-repos.json', excludes=['cordova-medic']),
+
+    # install tools
+    NPMInstall(what='cordova-coho',        workdir='cordova-coho'),
+    NPMInstall(what='cordova-lib',         workdir='cordova-lib/cordova-lib'),
+    NPMInstall(what='cordova-cli',         workdir='cordova-cli'),
+    NPMInstall(what='cordova-js',          workdir='cordova-js'),
+    NPMInstall(what='cordova-plugman',     workdir='cordova-plugman'),
+    NPMInstall(what='platform',            workdir=I('cordova-%(prop:platform)s')),
+    NPMInstall(what='cordova-mobile-spec', workdir='cordova-mobile-spec/createmobilespec'),
+
+    # link the installed code
+    SH(command=['cordova-coho/coho', 'npm-link'], description='coho link'),
+
+    # prepare the test app
+    SH(
+        command = [
+            'node',
+            'cordova-mobile-spec/createmobilespec/createmobilespec.js',
+            '--copywww',
+            '--skiplink',
+            render_mobilespec_platform,
+            TEST_APP_NAME
+        ],
+        description='creating mobilespec app'
+    ),
+    SH(
+        command=[
+            'node',
+            'cordova-medic/updateconfig.js',
+            I('--%(prop:platform)s'),
+        ],
+        description='preparing mobilespec app'
+    ),
+]
+
+cordova_plugins_all = BuildFactory()
+cordova_plugins_all.addSteps(common_plugins_steps)
+cordova_plugins_all.addSteps([
+    SH(command=['node', I('cordova-medic/build_%(prop:platform)s.js')], description='running tests'),
+])
+
+# WORKAROUND:
+#            this is here to match what medic already does; these
+#            should be their own builders in the future, using a
+#            proper test matrix
+cordova_plugins_windows = BuildFactory()
+cordova_plugins_windows.addSteps(common_plugins_steps)
+cordova_plugins_windows.addSteps([
+    SH(command=['node', I('cordova-medic/build_%(prop:platform)s.js'), "--store80"], haltOnFailure=False, description='running tests (Windows 8.0)'),
+    SH(command=['node', I('cordova-medic/build_%(prop:platform)s.js'), "--store"], haltOnFailure=False, description='running tests (Windows 8.1)'),
+    SH(command=['node', I('cordova-medic/build_%(prop:platform)s.js'), "--phone"], haltOnFailure=False, description='running tests (Windows Phone 8.1)'),
+])
+
+####### BUILDERS
+
+c['builders'].extend([
+
+    # plugins builders
+    BuilderConfig(name='cordova-ios',            slavenames=OSX_SLAVES,     factory=cordova_plugins_all,     properties={'platform': 'ios',        'slaveos': OSX}),
+    BuilderConfig(name='cordova-android-osx',    slavenames=OSX_SLAVES,     factory=cordova_plugins_all,     properties={'platform': 'android',    'slaveos': OSX}),
+    BuilderConfig(name='cordova-blackberry-osx', slavenames=OSX_SLAVES,     factory=cordova_plugins_all,     properties={'platform': 'blackberry', 'slaveos': OSX}),
+    BuilderConfig(name='cordova-windows',        slavenames=WINDOWS_SLAVES, factory=cordova_plugins_windows, properties={'platform': 'windows',    'slaveos': WINDOWS}),
+    BuilderConfig(name='cordova-wp8',            slavenames=WINDOWS_SLAVES, factory=cordova_plugins_all,     properties={'platform': 'wp8',        'slaveos': WINDOWS}),
+    BuilderConfig(name='cordova-android-win',    slavenames=WINDOWS_SLAVES, factory=cordova_plugins_all,     properties={'platform': 'android',    'slaveos': WINDOWS}),
+    BuilderConfig(name='cordova-blackberry-win', slavenames=WINDOWS_SLAVES, factory=cordova_plugins_all,     properties={'platform': 'blackberry', 'slaveos': WINDOWS}),
+])
+
+####### STATUS TARGETS
+
+c['status'].extend([])
+
+####### SCHEDULERS
+
+c['schedulers'].extend([
+    Nightly(
+        name         = 'cordova_plugins_periodic',
+        reason       = 'periodic',
+        branch       = None,
+        minute       = [30],
+        hour         = range(0, 24, 2),
+        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/0e37682d/buildbot-conf/master.cfg
----------------------------------------------------------------------
diff --git a/buildbot-conf/master.cfg b/buildbot-conf/master.cfg
new file mode 100644
index 0000000..c3584c0
--- /dev/null
+++ b/buildbot-conf/master.cfg
@@ -0,0 +1,349 @@
+#!/usr/bin/python
+# -*- python -*-
+# ex: set syntax=python:
+
+# This is a sample buildmaster config file. It must be installed as
+# 'master.cfg' in your buildmaster's base directory (although the filename
+# can be changed with the --basedir option to 'mktap buildbot master').
+
+# It has one job: define a dictionary named BuildmasterConfig. This
+# dictionary has a variety of keys to control different aspects of the
+# buildmaster. They are documented in docs/config.xhtml .
+
+
+# This is the dictionary that the buildmaster pays attention to. We also use
+# a shorter alias to save typing.
+
+# Absolute or relative path to buildbot per-project configureations.
+# For local Buildbot installation it is convenient to use the same directory
+# for main master.cfg and projects .conf files
+FP = './'
+
+c = BuildmasterConfig = {}
+
+####### BUILDSLAVES
+
+# import the passwords
+import private
+reload(private)
+
+# c['db_url'] = private.mysqlConnection
+
+c['db'] = {
+    'db_url' : "sqlite:///state.sqlite",
+}
+
+# the 'slaves' list defines the set of allowable buildslaves. Each element is
+# a tuple of bot-name and bot-password. These correspond to values given to
+# the buildslave's mktap invocation.
+from buildbot.buildslave import BuildSlave
+
+c['slaves'] = []
+
+c['slaves'].extend([
+
+    # NOTE:
+    #      these slave definitions have to at least contain the
+    #      same ones as the ones on the ci.apache.org Buildbot's
+    #      master.cfg
+
+    # used slaves
+    BuildSlave(
+        'cordova-ios-slave',
+        private.cordovaIOSSlavePwd,
+        missing_timeout = 300,
+        max_builds      = 1
+    ),
+    BuildSlave(
+        'cordova-windows-slave',
+        private.cordovaWindowsSlavePwd,
+        missing_timeout = 300,
+        max_builds      = 1
+    ),
+
+    # obsolete slaves
+    BuildSlave(
+        'cordova-android-slave',
+        private.cordovaAndroidSlavePwd,
+        missing_timeout = 300,
+        max_builds      = 1
+    ),
+    BuildSlave(
+        'cordova-win8-slave',
+        private.cordovaWin8SlavePwd,
+        missing_timeout = 300,
+        max_builds      = 2
+    ),
+    BuildSlave(
+        'cordova-blackberry-slave',
+        private.cordovaBlackberrySlavePwd,
+        missing_timeout = 300,
+        max_builds      = 1
+    ),
+    BuildSlave(
+        'cordova-common-slave',
+        private.cordovaCommonSlavePwd,
+        missing_timeout = 300,
+        max_builds      = 3
+    ),
+])
+
+# to limit to two concurrent builds on a slave, use
+#  c['slaves'] = [BuildSlave("bot1name", "bot1passwd", max_builds=2)]
+
+# 'slavePortnum' defines the TCP port to listen on. This must match the value
+# configured into the buildslaves (with their --master option)
+
+c['slavePortnum'] = 9889
+
+####### CHANGESOURCES
+
+# the 'change_source' setting tells the buildmaster how it should find out
+# about source code changes. Any class which implements IChangeSource can be
+# put here: there are several in buildbot/changes/*.py to choose from.
+
+from buildbot.changes.pb import PBChangeSource
+
+c['change_source'] = PBChangeSource(
+    port   = 9999,
+    user   = private.pbcsUser,
+    passwd = private.pbcsPwd
+)
+
+# from buildbot.changes.svnpoller import SVNPoller)
+
+# For example, if you had CVSToys installed on your repository, and your
+# CVSROOT/freshcfg file had an entry like this:
+#pb = ConfigurationSet([
+#    (None, None, None, PBService(userpass=('foo', 'bar'), port=4519)),
+#    ])
+
+# then you could use the following buildmaster Change Source to subscribe to
+# the FreshCVS daemon and be notified on every commit:
+#
+#from buildbot.changes.freshcvs import FreshCVSSource
+#fc_source = FreshCVSSource("cvs.example.com", 4519, "foo", "bar")
+#c['change_source'] = fc_source
+
+# or, use a PBChangeSource, and then have your repository's commit script run
+# 'buildbot sendchange', or use contrib/svn_buildbot.py, or
+# contrib/arch_buildbot.py :
+#
+#from buildbot.changes.pb import PBChangeSource
+#c['change_source'] = PBChangeSource()
+
+####### GLOBAL EXCLUDES LIST - DO NOT TRIGGER BUILDS ON THESE FILES
+
+import re
+
+masterExcludes = ['STATUS' , 'README' , 'CHANGES' , 'INSTALL']
+
+def isGlobalImportant(change):
+
+    if not masterExcludes:
+        return True
+
+    for file in change.files:
+        triggerBuild = True
+        for pattern in masterExcludes:
+            match = re.match(pattern, file)
+            if match:
+                triggerBuild = False
+                break
+        if triggerBuild:
+            return True
+
+## NOTES
+#
+# add 'fileIsImportant = isGlobalImportant' to any project scheduler(s)
+# that you want to apply this global list to.
+#
+# Projects can individually extend this global default :
+#
+# Place something like this in the projects/$project.conf file:
+#
+# $projectExcludes = [masterExcludes , "exclude.me" , "andme.too" , "etc..."]
+#
+# def isProjectimportant
+#     if not $projectExcludes:
+#        return True
+#
+#   for file in change.files:
+#        triggerBuild = True
+#        for pattern in $projectExcludes:
+#            match = re.match(pattern, file)
+#            if match:
+#                triggerBuild = False
+#                break
+#        if triggerBuild:
+#            return True
+#
+##
+# Then add 'fileisImportant = is$Projectimportant' to the scheduler.
+# (replace $project in all above with actual project name!)
+##
+
+####### SCHEDULERS
+
+## configure the Schedulers
+from buildbot.scheduler import AnyBranchScheduler, Periodic, Scheduler, Nightly, Dependent
+from buildbot.schedulers.basic  import SingleBranchScheduler
+from buildbot.changes import filter
+
+c['schedulers'] = []
+
+# append project schedulers in projects/$project.conf
+
+####### BUILDERS
+
+# the 'builders' list defines the Builders. Each one is configured with a
+# dictionary, using the following keys:
+#  name (required): the name used to describe this bilder
+#  slavename (required): which slave to use, must appear in c['bots']
+#  builddir (required): which subdirectory to run the builder in
+#  factory (required): a BuildFactory to define how the build is run
+#  periodicBuildTime (optional): if set, force a build every N seconds
+
+# buildbot/process/factory.py provides several BuildFactory classes you can
+# start with, which implement build processes for common targets (GNU
+# autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the
+# base class, and is configured with a series of BuildSteps. When the build
+# is run, the appropriate buildslave is told to execute each Step in turn.
+
+# the first BuildStep is typically responsible for obtaining a copy of the
+# sources. There are source-obtaining Steps in buildbot/steps/source.py for
+# CVS, SVN, and others.
+
+# cvsroot = ":pserver:anonymous@cvs.sourceforge.net:/cvsroot/buildbot"
+# cvsmodule = "buildbot"
+
+from buildbot.process.properties import Interpolate
+from buildbot.process import factory
+from buildbot.steps.source.git import Git
+from buildbot.steps.source.svn import SVN
+from buildbot.steps.shell import Compile
+from buildbot.steps.python_twisted import Trial
+
+# append project builders in projects/$project.conf
+
+c['builders'] = []
+
+####### STATUS TARGETS
+
+# 'status' is a list of Status Targets. The results of each build will be
+# pushed to these targets. buildbot/status/*.py has a variety to choose from,
+# including web pages, email senders, and IRC bots.
+
+import json
+with open(FP + 'cordova-config.json') as f:
+    json_config = json.load(f)
+
+c['status'] = []
+
+from buildbot.status import html
+from buildbot.status.web import authz, auth
+from buildbot.status.mail import MailNotifier
+
+# change any of these to True to enable, and to 'auth' to
+# enable when authenticated; see the manual for more options
+authz_cfg = authz.Authz(
+    auth               = auth.BasicAuth([(private.webAuthUser, private.webAuthPwd)]),
+    gracefulShutdown   = False,
+    forceBuild         = True,
+    forceAllBuilds     = 'auth',
+    pingBuilder        = False,
+    stopBuild          = 'auth',
+    stopAllBuilds      = 'auth',
+    cancelPendingBuild = 'auth',
+)
+
+mail_from = str(json_config['mail']['from'])
+mail_to = []
+for mt in json_config['mail']['to']:
+    mail_to.append(str(mt))
+
+mail_pw = str(json_config['mail']['password'])
+
+mn1 = MailNotifier(
+    fromaddr              = mail_from,
+    sendToInterestedUsers = False,
+    mode                  = ('change', 'failing', 'warnings'),
+    extraRecipients       = mail_to,
+    relayhost             = 'smtp.gmail.com',
+    smtpPort              = 587,
+    useTls                = True,
+    smtpUser              = mail_from,
+    smtpPassword          = mail_pw,
+)
+
+c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
+c['status'].append(mn1)
+
+# Include any global imports here that more than one project needs.
+
+from buildbot.steps.master import MasterShellCommand
+from buildbot.steps.transfer import FileUpload
+from buildbot.steps.transfer import FileDownload
+from buildbot.steps.transfer import DirectoryUpload
+from buildbot.steps.shell import ShellCommand, SetProperty
+from buildbot.steps.shell import Configure
+from buildbot.steps.shell import Test
+from buildbot.steps.python import PyFlakes
+from buildbot.process.buildstep import BuildStep
+from buildbot.process.properties import WithProperties
+from buildbot import locks
+
+# import the rat report fileupload class
+
+# from rat_report_upload import rat_report_upload
+
+# Ensure that projects include is below all definition imports.
+
+execfile(FP + 'projects.conf', globals(), locals())
+
+# Data Lifetime - how long to keep old build logs and status around.
+
+c['changeHorizon'] = 200
+c['buildHorizon'] = 100
+c['eventHorizon'] = 50
+c['logHorizon'] = 40
+c['buildCacheSize'] = 50 # Not sure about value of this one, should be ok though.
+c['changeCacheSize'] = 10000
+
+####### DEBUGGING OPTIONS
+
+# if you set 'debugPassword', then you can connect to the buildmaster with
+# the diagnostic tool in contrib/debugclient.py . From this tool, you can
+# manually force builds and inject changes, which may be useful for testing
+# your buildmaster without actually commiting changes to your repository (or
+# before you have a functioning 'sources' set up). The debug tool uses the
+# same port number as the slaves do: 'slavePortnum'.
+
+#c['debugPassword'] = "debugpassword"
+
+# if you set 'manhole', you can ssh into the buildmaster and get an
+# interactive python shell, which may be useful for debugging buildbot
+# internals. It is probably only useful for buildbot developers. You can also
+# use an authorized_keys file, or plain telnet.
+#from buildbot import manhole
+#c['manhole'] = manhole.PasswordManhole("tcp:9999:interface=127.0.0.1",
+#                                       "admin", "password")
+
+####### PROJECT IDENTITY
+
+# the 'projectName' string will be used to describe the project that this
+# buildbot is working on. For example, it is used as the title of the
+# waterfall HTML page. The 'projectURL' string will be used to provide a link
+# from buildbot HTML pages to your project's home page.
+
+c['title'] = 'Cordova Testing'
+c['titleURL'] = 'http://cordova.apache.org'
+
+# the 'buildbotURL' string should point to the location where the buildbot's
+# internal web server (usually the html.Waterfall page) is visible. This
+# typically uses the port number set in the Waterfall 'status' entry, but
+# with an externally-visible host name which the buildbot cannot figure out
+# without some help.
+
+mail_serverURL = str(json_config['mail']['serverURL'])
+c['buildbotURL'] = mail_serverURL

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/0e37682d/buildbot-conf/private.py.sample
----------------------------------------------------------------------
diff --git a/buildbot-conf/private.py.sample b/buildbot-conf/private.py.sample
new file mode 100644
index 0000000..776e2b8
--- /dev/null
+++ b/buildbot-conf/private.py.sample
@@ -0,0 +1,11 @@
+pbcsUser    = 'password'
+pbcsPwd     = 'password'
+webAuthUser = 'password'
+webAuthPwd  = 'password'
+
+cordovaIOSSlavePwd        = 'password'
+cordovaWindowsSlavePwd    = 'password'
+cordovaAndroidSlavePwd    = 'password'
+cordovaWin8SlavePwd       = 'password'
+cordovaBlackberrySlavePwd = 'password'
+cordovaCommonSlavePwd     = 'password'

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/0e37682d/buildbot-conf/projects.conf
----------------------------------------------------------------------
diff --git a/buildbot-conf/projects.conf b/buildbot-conf/projects.conf
new file mode 100644
index 0000000..da3051b
--- /dev/null
+++ b/buildbot-conf/projects.conf
@@ -0,0 +1,11 @@
+#!/usr/bin/python
+
+def one_file(f, symbols_to_keep = set()):
+    globals_copy = globals().copy()
+    execfile(FP + f, globals_copy, globals_copy)
+    for symbol in symbols_to_keep:
+        if symbol in globals_copy:
+            globals().update({symbol: globals_copy[symbol]})
+
+one_file('cordova.conf')
+one_file('cordova-internal.conf')

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/0e37682d/checkout.js
----------------------------------------------------------------------
diff --git a/checkout.js b/checkout.js
deleted file mode 100644
index bbe4653..0000000
--- a/checkout.js
+++ /dev/null
@@ -1,39 +0,0 @@
-var path = require ('path');
-var glob=require('glob');
-var shell = require('shelljs');
-var fs = require('fs');
-var argv = require('optimist').argv;
-
-var CAT='TOOLS';
-var isRelease=false;
-var jsonpath ='./repos.json';
-var branch_release = 'release';
-
-function getDir(reponame) {
-   return path.basename(reponame,'.git');
-}
-
-if(argv.cat) CAT = argv.cat;
-if(argv.release) isRelease = true;
-if(argv.path) jsonpath = argv.path;
-if(argv.releasebranch) branch_release = argv.releasebranch;
-
-var repos = JSON.parse(fs.readFileSync(jsonpath, 'utf8'));
-
-repos.repos.forEach( function(repo) {
-    if(repo.category == CAT.toUpperCase()) {
-        var branch = isRelease ? repo.release : repo.current;
-        branch = branch == "RELEASE" ? branch_release : branch;
-        var dir = getDir(repo.repo);
-        var remotename = path.basename(path.dirname(repo.repo));
-
-        if(fs.existsSync(dir + '/.git')) {
-            console.log('Repo ' + repo.repo + ' has already cloned!');
-            process.exit(1);
-        } else {
-            shell.exec('git clone ' + repo.repo + ' --branch=' + branch + ' --depth ' + '1');
-        }
-    }
-});
-
-

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/0e37682d/cordova-config.json.sample
----------------------------------------------------------------------
diff --git a/cordova-config.json.sample b/cordova-config.json.sample
deleted file mode 100644
index 366b506..0000000
--- a/cordova-config.json.sample
+++ /dev/null
@@ -1,53 +0,0 @@
-{
-    "couchdb":{
-        "host":"http://localcouchdb:5984"
-    },
-    "dashboard":{
-        "port":8088
-    },
-    "app":{
-        "static":{
-            "path":null
-        },
-        "dynamic":{
-            "commit_hook":"src/build/makers/mobile_spec/commit_hook.js",
-            "builder":"src/build/makers/mobile_spec",
-            "git":"https://git-wip-us.apache.org/repos/asf/cordova-mobile-spec.git"
-        },
-        "entry":"autotest/pages/all.html",
-        "platforms":"android ios windows wp8",
-        "release":"master",
-        "timeout": 600
-    },
-    "blackberry":{
-        "devices":{
-            "ips":[],
-            "password":"password"
-        },
-        "bb10":{
-            "sdk":"/Users/fil/SDKs/BB10-WebWorks-1.0.4.7",
-            "signingPassword":""
-        },
-        "tablet":{
-            "sdk":"/Users/fil/SDKs/WebWorks-Tablet-2.2/bbwp",
-            "signingPassword":""
-        }
-    },
-    "ios":{
-        "keychainPassword":"",
-        "keychainLocation":""
-    },
-    "wp8":{
-        "target": "device",
-        "TODO" : "add several targets support: emulators: WVGA, WXGA, 720p, 1080p or devices: default or specified by id 7988B8C3-3ADE-488d-BA3E-D052AC9DC710"
-    },
-    "windows8": {
-        "target": "local|emulator|device"
-    },
-    "mail":{
-        "to":["someone@someplace.com"],
-        "from":"yourbuildbot@yourEmailService.com",
-        "password":"yourSMTPpassword",
-        "serverURL":"put your external url here"
-    }
-}

http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/0e37682d/cordova-plugin-medic-newstyle-tests/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-plugin-medic-newstyle-tests/plugin.xml b/cordova-plugin-medic-newstyle-tests/plugin.xml
deleted file mode 100644
index ad9ddaf..0000000
--- a/cordova-plugin-medic-newstyle-tests/plugin.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
-    xmlns:rim="http://www.blackberry.com/ns/widgets"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    id="org.apache.cordova.core.medic-newstyle-tests"
-    version="0.0.1">
-    <name>Medic New Style Tests</name>
-    <license>Apache 2.0</license>
-    <keywords>cordova,medic,testing</keywords>
-
-    <access origin="http://192.168.1.122:6800" />
-    <content src="cdvtests/index.html" />
-</plugin>


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