Team City 中的并行构建步骤
Parallel Build steps in Team City
我是 Team City 的新手,我的任务是创建 CI 构建。
我尝试构建的是带有量角器 e2e 测试的 angular2 应用程序。
Team City 中的所有其他构建步骤 运行 好的,但我在尝试 运行 进行 e2e 测试的步骤时遇到问题。
如果我要在本地执行此操作,我会打开命令 window 并键入...
npm run start
然后我会打开另一个命令 window 并输入...
npm run e2e
如何在 Team City 中 运行 并行步骤?
构建步骤在 TeamCity 中不能运行并行。您需要做的是在后台创建 运行s 'npm run start' 的脚本,然后 运行s 'npm run e2e'。您可以使用命令行 运行ner 来 运行 脚本
我仍然无法让永远的东西为我正常工作所以我创建了自己的节点脚本来启动 live-server 然后执行 npm 运行 e2e 这似乎已经成功了谢谢感谢 Oleg 的帮助。
最后我是这样的...
const exec = require('child_process').exec;
var psTree = require('ps-tree');
const server = exec('live-server ./dist --port=3000 --no-browser');
const tests = exec('npm run e2e');
tests.stdout.on('data', function(data) {
console.log(data);
});
tests.stderr.on('data', function(data) {
console.log(data);
});
tests.on('close', function(code) {
console.log('closing code: ' + code);
exec('taskkill /PID ' + server.pid + ' /T /F');
});
我是 Team City 的新手,我的任务是创建 CI 构建。
我尝试构建的是带有量角器 e2e 测试的 angular2 应用程序。
Team City 中的所有其他构建步骤 运行 好的,但我在尝试 运行 进行 e2e 测试的步骤时遇到问题。
如果我要在本地执行此操作,我会打开命令 window 并键入...
npm run start
然后我会打开另一个命令 window 并输入...
npm run e2e
如何在 Team City 中 运行 并行步骤?
构建步骤在 TeamCity 中不能运行并行。您需要做的是在后台创建 运行s 'npm run start' 的脚本,然后 运行s 'npm run e2e'。您可以使用命令行 运行ner 来 运行 脚本
我仍然无法让永远的东西为我正常工作所以我创建了自己的节点脚本来启动 live-server 然后执行 npm 运行 e2e 这似乎已经成功了谢谢感谢 Oleg 的帮助。
最后我是这样的...
const exec = require('child_process').exec;
var psTree = require('ps-tree');
const server = exec('live-server ./dist --port=3000 --no-browser');
const tests = exec('npm run e2e');
tests.stdout.on('data', function(data) {
console.log(data);
});
tests.stderr.on('data', function(data) {
console.log(data);
});
tests.on('close', function(code) {
console.log('closing code: ' + code);
exec('taskkill /PID ' + server.pid + ' /T /F');
});