如何在Jenkins中启动grunt服务器正确 [英] How to start grunt server in Jenkins correct

查看:375
本文介绍了如何在Jenkins中启动grunt服务器正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在詹金斯工作,在那里我创建web应用程序并通过命令启动它:
grunt server
但是当我在Jenkins不要完成,因为服务器仍然在提示符下运行:

 运行connect:livereload(连接)任务
开始连接网页本地主机上的服务器:80。
运行open:server(打开)任务
运行watch任务



<所以,我怎么能在Jenkins中运行grunt服务器以便服务器仍然运行,但是构建成功完成?

code> grunt server 命令通常会通过节点打开本地服务器,您可以在其上进行测试。如果你使用yeoman或其他你想让Jenkins运行 grunt build 命令。



问题在于 watch 任务,它将继续运行以查找文件更改,并通过实时重新加载自动更新网页。这对开发非常明智,但不适用于构建服务器。


I have job in Jenkins where i build web app and start it via command: grunt server but when i do this build in Jenkins dont finishing because server still running in prompt:

Running "connect:livereload" (connect) task
Started connect web server on localhost:80.
Running "open:server" (open) task
Running "watch" task

So, how can i run grunt server in Jenkins in order to server still run but build finished successfully?

解决方案

The grunt server command usually opens a local server via node, that you can do testing on. If you used yeoman or other you want the Jenkins to run the grunt build command.

The problem is the watch task, it will keep running looking for file changes, and automatically update the webpage via live-reload. It's quite smart for development, but not intended for a build server.

这篇关于如何在Jenkins中启动grunt服务器正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆