【发布时间】:2015-03-22 12:52:05
【问题描述】:
我正在尝试在 Jenkins 中构建运行一个基于 grunt 的构建任务,该任务是使用 yeoman 生成器创建的。
Jenkins 能够成功运行 npm install 和 bower install。
问题:当我运行grunt Jenkins 崩溃时:无法通过浏览器访问它,它丢失了构建任务的条目,必须重新启动。
如果我在任务运行时观察控制台输出,我在服务器崩溃之前收到的最后一条消息是:
[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
到目前为止我尝试了什么:
- 我尝试将 Jenkins 设置为允许 4 个构建过程。
- 我还尝试将其限制为 1 个构建过程。两者都没有改变任何东西。
- 我无法真正更改 grunt 任务,因为我必须在 30 多个项目中执行此操作。
问题:有没有办法可以在不崩溃的情况下运行并发的 grunt 任务?
Gruntfile.js 的一部分:
// Run some tasks in parallel to speed up the build process
concurrent: {
server: [
'compass:server'
],
test: [
'compass'
],
dist: [
'compass:dist',
'imagemin',
'svgmin'
]
},
【问题讨论】:
标签: concurrency jenkins gruntjs yeoman