Concurrency Jenkins在并发grunt任务中崩溃
我试图在Jenkins中构建并运行一个基于grunt的构建任务,该任务是使用yeoman生成器创建的 詹金斯能够成功运行Concurrency Jenkins在并发grunt任务中崩溃,concurrency,jenkins,gruntjs,yeoman,Concurrency,Jenkins,Gruntjs,Yeoman,我试图在Jenkins中构建并运行一个基于grunt的构建任务,该任务是使用yeoman生成器创建的 詹金斯能够成功运行npm安装和bower安装 问题:当我运行gruntJenkins crashs时:无法通过浏览器访问它,它会丢失构建任务的条目,必须重新启动 如果我在任务运行时观察控制台输出,则在服务器崩溃之前收到的最后一条消息是: [4mRunning "concurrent:dist" (concurrent) task[24m [32m>> [39mWarning: The
npm安装
和bower安装
问题:当我运行grunt
Jenkins crashs时:无法通过浏览器访问它,它会丢失构建任务的条目,必须重新启动
如果我在任务运行时观察控制台输出,则在服务器崩溃之前收到的最后一条消息是:
[4mRunning "concurrent:dist" (concurrent) task[24m [32m>>
[39mWarning: There are more tasks than your concurrency limit. After
this limit[32m
>> [39mis reached no further tasks will be run until the current tasksare[32m
>> [39mcompleted. You can adjust the limit in the concurrent task options
到目前为止我所尝试的:
// Run some tasks in parallel to speed up the build process
concurrent: {
server: [
'compass:server'
],
test: [
'compass'
],
dist: [
'compass:dist',
'imagemin',
'svgmin'
]
},
// Run some tasks in parallel to speed up the build process
concurrent: {
server: [
'compass:server'
],
test: [
'compass'
],
dist: [
'compass:dist',
'imagemin',
'svgmin'
]
},
您可以声明要使用的CPU核心数,即:
options:
limit: 2
logConcurrentOutput: true
虽然阿德本的回答是正确的,但他没有解释在哪里设置
限制。它在您的GrunFile中,对于具有2个并发任务的示例,它应该这样看:
grunt.initConfig({
concurrent: {
target: {
tasks: [ 'watch', 'nodemon:run' ],
options: {
limit: 2,
logConcurrentOutput: true
}
},
}
});
这是的文档,我应该把这个限制放在哪里?在格伦特还是在詹金斯?