You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sg...@apache.org on 2015/02/05 14:01:53 UTC
cordova-medic git commit: [INFRA-8588] Using local npm cache for npm
install to avoid conflicts with other builders. Switching from 9989 to 9889
for slave port.
Repository: cordova-medic
Updated Branches:
refs/heads/master 8ed5c44ff -> 4f76c1af3
[INFRA-8588] Using local npm cache for npm install to avoid conflicts with other builders. Switching from 9989 to 9889 for slave port.
github close #25
Project: http://git-wip-us.apache.org/repos/asf/cordova-medic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-medic/commit/4f76c1af
Tree: http://git-wip-us.apache.org/repos/asf/cordova-medic/tree/4f76c1af
Diff: http://git-wip-us.apache.org/repos/asf/cordova-medic/diff/4f76c1af
Branch: refs/heads/master
Commit: 4f76c1af3ef4a2e014ab9395e3ee4485e4346302
Parents: 8ed5c44
Author: Dmitry Blotsky <db...@microsoft.com>
Authored: Wed Jan 28 20:13:35 2015 -0800
Committer: sgrebnov <v-...@microsoft.com>
Committed: Thu Feb 5 15:59:46 2015 +0300
----------------------------------------------------------------------
cordova.conf | 35 ++++++++++++++++++++---------------
master.cfg | 4 ++--
2 files changed, 22 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/4f76c1af/cordova.conf
----------------------------------------------------------------------
diff --git a/cordova.conf b/cordova.conf
index 36760a7..4ce6798 100644
--- a/cordova.conf
+++ b/cordova.conf
@@ -85,7 +85,8 @@ for test in CONFIG.json_repos['tests']:
builderNames=test_builders))
c['schedulers'].append(ForceScheduler(name="force", builderNames=FORCE_BUILDERS))
-c['schedulers'].append(Nightly(
+c['schedulers'].extend([
+ Nightly(
name = 'cordova_nightly',
reason = 'nightly',
branch = 'master',
@@ -99,7 +100,8 @@ c['schedulers'].append(Nightly(
'cordova-windows',
'cordova-windows8-vs2012-win8',
],
-))
+ ),
+])
# new build steps
@@ -112,8 +114,11 @@ def RMCommand(path, **kwargs):
js_script = "var s = require('shelljs'); console.log('removing {path}'); s.rm('-rf', '{path}');".format(path=path)
return ShellCommand(command=['node -e "'+ js_script + '"> rm.txt 2>&1'], logfiles = {"log": "rm.txt"}, **kwargs)
+def NPMInstall(command=list(), **kwargs):
+ return ShellCommand(command=["npm", "install"] + command + ["--cache=./npm_cache"], **kwargs)
+
def InstallShellJS():
- return ShellCommand(command=["npm", "install", "shelljs"], workdir='build', haltOnFailure=True, description='Install shelljs')
+ return NPMInstall(["shelljs"], workdir='build', haltOnFailure=True, description='Install shelljs')
class PlatformTestBase(object):
"""Base class with common build steps for all platforms"""
@@ -128,11 +133,11 @@ class PlatformTestBase(object):
RMCommand(path="*", workdir='build', haltOnFailure=False, description='Clean workdir'),
ShellCommand(command=["git", "clone", "--depth", "1", "-b", CONFIG.branches['TESTMASTER'], CONFIG.repos['TESTMASTER'], "medic"], workdir='build', haltOnFailure=True, description='Get Medic'),
# --production switch is used to speed up installation + fruitstrap dev dependency is not supported on Windows
- ShellCommand(command=["npm", "install", "--production"], workdir='build/medic', haltOnFailure=True, description='Install Medic'),
+ NPMInstall(["--production"], workdir='build/medic', haltOnFailure=True, description='Install Medic'),
FileDownload(mastersrc=FP+"cordova-config.json", slavedest="medic/config.json", haltOnFailure=True),
FileDownload(mastersrc=FP+"cordova-repos.json", slavedest="medic/repos.json", haltOnFailure=True),
ShellCommand(command=["git", "clone", "--depth", "1", CONFIG.repos['COHO']], workdir='build', haltOnFailure=True, description='Get COHO'),
- ShellCommand(command=["npm", "install", "--production"], workdir='build/cordova-coho', haltOnFailure=True, description='Install COHO'),
+ NPMInstall(["--production"], workdir='build/cordova-coho', haltOnFailure=True, description='Install COHO'),
]
def repos_clone_steps(self):
@@ -153,11 +158,11 @@ class PlatformTestBase(object):
return [
ShellCommand(command=["git", "clone", "-b", CONFIG.branches['CLI'], CONFIG.repos['CLI'], "cordova-cli"], workdir='build', haltOnFailure=True, description='Clone CLI'),
ShellCommand(command=["git", "clone", "--depth", "1", "-b", CONFIG.branches['CORDOVA-LIB'], CONFIG.repos['CORDOVA-LIB'], "cordova-lib"], workdir='build', haltOnFailure=True, description='Clone cordova-lib'),
- ShellCommand(command=["npm", "install", "--production"], workdir='build/cordova-lib/cordova-lib', haltOnFailure=True, description='Install cordova-lib'),
+ NPMInstall(["--production"], workdir='build/cordova-lib/cordova-lib', haltOnFailure=True, description='Install cordova-lib'),
ShellCommand(command=["rm", "-f", "npm-shrinkwrap.json"], workdir='build/cordova-cli', haltOnFailure=False, description='Remove CLI SW'),
- ShellCommand(command=["npm", "install"], workdir='build/cordova-cli', haltOnFailure=True, description='Install CLI'),
+ NPMInstall(workdir='build/cordova-cli', haltOnFailure=True, description='Install CLI'),
ShellCommand(command=["npm", "test"], workdir='build/cordova-cli', haltOnFailure=True, description='Test CLI'),
- ShellCommand(command=["npm", "install"], workdir='build/cordova-js', haltOnFailure=True, description='Install JS'),
+ NPMInstall(workdir='build/cordova-js', haltOnFailure=True, description='Install JS'),
]
def plugman_steps(self):
@@ -168,7 +173,7 @@ class PlatformTestBase(object):
return [
ShellCommand(command=["rm", "-rf", "cordova-*"], workdir='build', haltOnFailure=False, description='Cordova Clean'),
ShellCommand(command=["git", "clone", CONFIG.repos['PLUGMAN'], "cordova-plugman"], workdir='build', haltOnFailure=True, description='Get Plugman'),
- ShellCommand(command=["npm", "install"], workdir='build/cordova-plugman', haltOnFailure=True, description='Install Plugman'),
+ NPMInstall(workdir='build/cordova-plugman', haltOnFailure=True, description='Install Plugman'),
ShellCommand(command=["npm", "test"], workdir='build/cordova-plugman', haltOnFailure=True, description='Test Plugman'),
]
@@ -179,7 +184,7 @@ class PlatformTestBase(object):
if platform == "blackberry10":
platform = "blackberry"
return [
- ShellCommand(command=["npm", "install"], workdir='build/cordova-mobile-spec/createmobilespec', haltOnFailure=True, description='Install createmobilespec'),
+ NPMInstall(workdir='build/cordova-mobile-spec/createmobilespec', haltOnFailure=True, description='Install createmobilespec'),
ShellCommand(command=["cordova-coho/coho", "npm-link"], workdir='build', haltOnFailure=True, description='COHO npm-link'),
# add --skiplink for createmobilespec since
# it requires cordova-plugman repo to be cloned
@@ -296,10 +301,10 @@ if CONFIG.has_platform("chrome"):
factory_chrome_desktop.addStep(ShellCommand(command=["rm", "-rf", "medic"], workdir='build', haltOnFailure=False, description='Medic Clean', descriptionDone='Medic Clean'))
factory_chrome_desktop.addStep(ShellCommand(command=["git", "clone", "-b", CONFIG.branches['TESTMASTER'], CONFIG.repos['TESTMASTER'], "medic"], workdir='build', haltOnFailure=True, description='Get Medic', descriptionDone='Get Medic'))
# --production switch is used to speed up installation + fruitstrap dev dependency is not supported on Windows
- factory_chrome_desktop.addStep(ShellCommand(command=["npm", "install", "--production"], workdir='build/medic', haltOnFailure=True, description='Install Medic', descriptionDone='Install Medic'))
+ factory_chrome_desktop.addStep(NPMInstall(["--production"], workdir='build/medic', haltOnFailure=True, description='Install Medic', descriptionDone='Install Medic'))
factory_chrome_desktop.addStep(ShellCommand(command=["rm", "-rf", "mobile-chrome-apps"], workdir='build', haltOnFailure=True, description='Clean Chromespec', descriptionDone='Clean Chromespec'))
factory_chrome_desktop.addStep(ShellCommand(command=["git", "clone", CONFIG.repos['CCA']], workdir='build', haltOnFailure=True, description='Fetch Chromespec', descriptionDone='Fetch Chromespec'))
- factory_chrome_desktop.addStep(ShellCommand(command=["npm", "install"], workdir='build/medic/runner', haltOnFailure=True, description='Install Runner', descriptionDone='Install Runner'))
+ factory_chrome_desktop.addStep(NPMInstall(workdir='build/medic/runner', haltOnFailure=True, description='Install Runner', descriptionDone='Install Runner'))
factory_chrome_desktop.addStep(ShellCommand(command=["node", "medic/runner/testrunner.js", "--cmd=medic/runner/runchrome.sh", "--path=mobile-chrome-apps/chrome-cordova/chrome-apps-api-tests", "--args=mobile-chrome-apps/chrome-cordova/chrome-apps-api-tests"], workdir='build', haltOnFailure=True, description='Run Chrome', descriptionDone='Run Chrome'))
c['builders'].append(BuilderConfig(name="cordova-zchrome-desktop", slavenames=["cordova-common-slave"], factory=factory_chrome_desktop))
@@ -307,12 +312,12 @@ if CONFIG.has_platform("chrome"):
factory_chrome_mobile.addStep(ShellCommand(command=["rm", "-rf", "medic"], workdir='build', haltOnFailure=False, description='Medic Clean', descriptionDone='Medic Clean'))
factory_chrome_mobile.addStep(ShellCommand(command=["git", "clone", "-b", CONFIG.branches['TESTMASTER'], CONFIG.repos['TESTMASTER'], "medic"], workdir='build', haltOnFailure=True, description='Get Medic', descriptionDone='Get Medic'))
# --production switch is used to speed up installation + fruitstrap dev dependency is not supported on Windows
- factory_chrome_mobile.addStep(ShellCommand(command=["npm", "install", "--production"], workdir='build/medic', haltOnFailure=True, description='Install Medic', descriptionDone='Install Medic'))
- factory_chrome_mobile.addStep(ShellCommand(command=["npm", "install"], workdir='build/medic/runner', haltOnFailure=True, description='Install Runner', descriptionDone='Install Runner'))
+ factory_chrome_mobile.addStep(NPMInstall(["--production"], workdir='build/medic', haltOnFailure=True, description='Install Medic', descriptionDone='Install Medic'))
+ factory_chrome_mobile.addStep(NPMInstall(workdir='build/medic/runner', haltOnFailure=True, description='Install Runner', descriptionDone='Install Runner'))
factory_chrome_mobile.addStep(ShellCommand(command=["rm", "-rf", "mobile-chrome-apps"], workdir='build', haltOnFailure=True, description='Clean cca', descriptionDone='Clean cca'))
factory_chrome_mobile.addStep(ShellCommand(command=["git", "clone", "--recurse-submodules", CONFIG.repos['CCA']], workdir='build', haltOnFailure=True, description='Fetch cca', descriptionDone='Fetch cca'))
- factory_chrome_mobile.addStep(ShellCommand(command=["npm", "install"], workdir='build/mobile-chrome-apps', haltOnFailure=True, description='Install cca', descriptionDone='Install cca'))
+ factory_chrome_mobile.addStep(NPMInstall(workdir='build/mobile-chrome-apps', haltOnFailure=True, description='Install cca', descriptionDone='Install cca'))
factory_chrome_mobile.addStep(ShellCommand(command=["rm", "-rf", "ccatest"], workdir='build', haltOnFailure=True, description='Clean ccatest', descriptionDone='Clean ccatest'))
factory_chrome_mobile.addStep(ShellCommand(command=["mobile-chrome-apps/src/cca.js", "create", "ccatest", "--copy-from", "mobile-chrome-apps/chrome-cordova/chrome-apps-api-tests"], workdir='build', haltOnFailure=True, description='cca create', descriptionDone='cca create'))
http://git-wip-us.apache.org/repos/asf/cordova-medic/blob/4f76c1af/master.cfg
----------------------------------------------------------------------
diff --git a/master.cfg b/master.cfg
index 28eda7b..45c3543 100644
--- a/master.cfg
+++ b/master.cfg
@@ -41,7 +41,7 @@ c['slaves'] = [
BuildSlave("cordova-windows-slave", "pass", max_builds=2),
BuildSlave("cordova-win8-slave", "pass", max_builds=2),
BuildSlave("cordova-blackberry-slave", "pass", max_builds=1),
- BuildSlave("cordova-common-slave", "pass", max_builds=3)
+ BuildSlave("cordova-common-slave", "pass", max_builds=3),
]
# to limit to two concurrent builds on a slave, use
@@ -51,7 +51,7 @@ c['slaves'] = [
# 'slavePortnum' defines the TCP port to listen on. This must match the value
# configured into the buildslaves (with their --master option)
-c['slavePortnum'] = 9989
+c['slavePortnum'] = 9889
####### CHANGESOURCES
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org