本文整理汇总了TypeScript中nodemiral.taskList函数的典型用法代码示例。如果您正苦于以下问题:TypeScript taskList函数的具体用法?TypeScript taskList怎么用?TypeScript taskList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了taskList函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: setup
public static setup(config) {
var taskList = nodemiral.taskList('Setup (linux)');
// Installation
if (config.setup && config.setup.node) {
// let nodeVersion =
taskList.executeScript('Installing Node.js: ' + config.nodeVersion, {
script: path.resolve(SCRIPT_DIR, 'install-node.sh'),
vars: {
nodeVersion: config.nodeVersion,
deployPrefix: DEPLOY_PREFIX
}
});
}
if (config.setup && config.setup.phantom) {
taskList.executeScript('Installing PhantomJS', {
script: path.resolve(SCRIPT_DIR, 'install-phantomjs.sh')
});
}
taskList.executeScript('Setting up environment variable script', {
script: path.resolve(SCRIPT_DIR, 'setup-env.sh'),
vars: {
appName: config.appName,
deployPrefix: DEPLOY_PREFIX
}
});
if (config.setup.mongo) {
// If the user prefers some mongodb config, read the option
taskList.copy('Copying MongoDB configuration', {
src: path.resolve(TEMPLATES_DIR, 'mongodb.conf'),
dest: '/etc/mongodb.conf'
});
taskList.executeScript('Installing MongoDB', {
script: path.resolve(SCRIPT_DIR, 'install-mongodb.sh')
});
}
if (config.ssl) {
this.installStud(taskList);
this.configureStud(taskList, config.ssl.pem, config.ssl.backendPort);
}
var upstartConfig = '/etc/init/' + config.appName + '.conf';
taskList.copy('Configuring upstart: ' + upstartConfig, {
src: path.resolve(TEMPLATES_DIR, 'meteor.conf'),
dest: upstartConfig,
vars: {
deployPrefix: DEPLOY_PREFIX,
appName: config.appName
}
});
return taskList;
}
开发者ID:mtarapata,项目名称:typeloy,代码行数:57,代码来源:linux.ts
示例2: start
public static start(appName) {
var taskList = nodemiral.taskList("Starting Application (linux)");
//starting
taskList.execute('Starting app', {
command: '(sudo start ' + appName + ')'
});
return taskList;
}
开发者ID:mtarapata,项目名称:typeloy,代码行数:10,代码来源:linux.ts
示例3: stop
public static stop(appName) {
var taskList = nodemiral.taskList("Stopping Application (sunos)");
//stopping
taskList.execute('Stopping app', {
command: '(sudo svcadm disable ' + appName + ')'
});
return taskList;
}
开发者ID:aadamsx,项目名称:typeloy,代码行数:10,代码来源:sunos.ts
示例4: restart
public static restart(appName) {
var taskList = nodemiral.taskList("Restarting Application (sunos)");
//restarting
taskList.execute('Restarting app', {
command: '(sudo svcadm disable ' + appName + ' || :) && (sudo svcadm enable ' + appName + ')'
});
return taskList;
}
开发者ID:aadamsx,项目名称:typeloy,代码行数:10,代码来源:sunos.ts
示例5: deploy
public static deploy(bundlePath, env, deployCheckWaitTime, appName, enableUploadProgressBar) {
var taskList = nodemiral.taskList("Deploy app '" + appName + "' (linux)");
const remoteBundlePath = DEPLOY_PREFIX + '/' + appName + '/tmp/bundle.tar.gz'
console.log("Transfering " + bundlePath + ' => ' + remoteBundlePath);
taskList.copy('Uploading bundle', {
src: bundlePath,
dest: DEPLOY_PREFIX + '/' + appName + '/tmp/bundle.tar.gz',
progressBar: enableUploadProgressBar
});
var bashenv = {};
for (var key in env) {
var val = env[key];
if (typeof val === "object") {
// Do proper escape
bashenv[key] = JSON.stringify(val).replace(/[\""]/g, '\\"')
} else if (typeof val === "string") {
bashenv[key] = val.replace(/[\""]/g, '\\"');
} else {
bashenv[key] = val;
}
}
taskList.copy('Setting up environment variables', {
src: path.resolve(TEMPLATES_DIR, 'env.sh'),
dest: DEPLOY_PREFIX + '/' + appName + '/config/env.sh',
vars: {
deployPrefix: DEPLOY_PREFIX,
env: bashenv,
appName: appName
}
});
taskList.copy('Creating build.sh', {
src: path.resolve(TEMPLATES_DIR, 'deploy.sh'),
dest: DEPLOY_PREFIX + '/' + appName + '/build.sh',
vars: {
deployPrefix: DEPLOY_PREFIX,
deployCheckWaitTime: deployCheckWaitTime || 10,
appName: appName
}
});
// deploying
taskList.executeScript('Invoking deployment process', {
script: path.resolve(TEMPLATES_DIR, 'deploy.sh'),
vars: {
deployPrefix: DEPLOY_PREFIX,
deployCheckWaitTime: deployCheckWaitTime || 10,
appName: appName
}
});
return taskList;
};
开发者ID:mtarapata,项目名称:typeloy,代码行数:55,代码来源:linux.ts
示例6: reconfig
public static reconfig(env, appName) {
var taskList = nodemiral.taskList("Updating configurations (sunos)");
reconfig(taskList, appName, env);
//deploying
taskList.execute('Restarting app', {
command: '(sudo svcadm disable ' + appName + ' || :) && (sudo svcadm enable ' + appName + ')'
});
return taskList;
};
开发者ID:aadamsx,项目名称:typeloy,代码行数:12,代码来源:sunos.ts
示例7: start
public static start(appName) {
var taskList = nodemiral.taskList("Starting Application (sunos)");
reconfig(taskList, appName, process.env);
//starting
taskList.execute('Starting app', {
command: '(sudo svcadm enable ' + appName + ')'
});
return taskList;
}
开发者ID:aadamsx,项目名称:typeloy,代码行数:12,代码来源:sunos.ts
示例8: setup
public setup(config : Config) {
let installMongo = config.setup.mongo;
let setupNode = config.setup.node;
let nodeVersion = config.setup.node;
let setupPhantom = config.setup.phantom;
const appName = config.app.name;
// installMongo, setupNode, nodeVersion, setupPhantom, appName) {
let taskList = nodemiral.taskList('Setup (sunos)');
// Installation
if (setupNode) {
taskList.executeScript('Installing Node.js', {
script: path.resolve(SCRIPT_DIR, 'install-node.sh'),
vars: {
nodeVersion: nodeVersion
}
});
}
taskList.executeScript('Setting up Environment', {
script: path.resolve(SCRIPT_DIR, 'setup-env.sh'),
vars: {
appName: appName
}
});
taskList.copy('Setting up Running Script', {
src: path.resolve(TEMPLATES_DIR, 'run.sh'),
dest: '/opt/' + appName + '/run.sh',
vars: {
appName: appName
}
});
var serviceManifestDest = '/opt/' + appName + '/config/service-manifest.xml';
taskList.copy('Copying SMF Manifest', {
src: path.resolve(TEMPLATES_DIR, 'service-manifest.xml'),
dest: serviceManifestDest,
vars: {
appName: appName
}
});
taskList.execute('Configuring SMF Manifest', {
command: 'sudo svccfg import ' + serviceManifestDest
});
return taskList;
}
开发者ID:c9s,项目名称:typeloy,代码行数:50,代码来源:SunOSTaskBuilder.ts
示例9: reconfig
public static reconfig(env, appName) {
var taskList = nodemiral.taskList("Updating configurations (linux)");
taskList.copy('Setting up Environment Variables', {
src: path.resolve(TEMPLATES_DIR, 'env.sh'),
dest: DEPLOY_PREFIX + '/' + appName + '/config/env.sh',
vars: {
env: env || {},
appName: appName
}
});
//restarting
taskList.execute('Restarting app', {
command: '(sudo stop ' + appName + ' || :) && (sudo start ' + appName + ')'
});
return taskList;
}
开发者ID:mtarapata,项目名称:typeloy,代码行数:19,代码来源:linux.ts
示例10: deploy
public static deploy(bundlePath, env, deployCheckWaitTime, appName) {
var taskList = nodemiral.taskList("Deploy app '" + appName + "' (sunos)");
taskList.copy('Uploading bundle', {
src: bundlePath,
dest: '/opt/' + appName + '/tmp/bundle.tar.gz'
});
reconfig(taskList, appName, env);
// deploying
taskList.executeScript('Invoking deployment process', {
script: path.resolve(TEMPLATES_DIR, 'deploy.sh'),
vars: {
deployCheckWaitTime: deployCheckWaitTime || 10,
appName: appName
}
});
return taskList;
}
开发者ID:aadamsx,项目名称:typeloy,代码行数:21,代码来源:sunos.ts
注:本文中的nodemiral.taskList函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论