这个场景是这样的:
我需要运行在localhost中服务我的应用程序的grunt serve:9000,在我使用一个码头容器进行持续集成的过程中,然后我需要运行另一个容器,该容器使用本地主机中提供的应用程序:9000执行一个集成测试:
我的gitlab.yml文件
unit-testing:
image: karma-testing
script:
- npm install && bower install && karma start && grunt serve
cache:
paths:
- node_modules/
- bower_components/
behavior-testing:
image: protractor-ci
script:
- npm install protractor-cucumber-framework cucumber && xvfb-run --server-args='-screen 0 1280x1024x24' protractor protractor.conf.js
cache:
paths:
- node_modules/
- bower_components/第一个映像运行在localhost中服务我的应用程序的grunt serve任务:9000,我希望第二个映像使用这个正在运行的应用程序来运行另一个脚本。
发布于 2016-07-25 22:03:29
不,你不能那样做。作业可以在不同的运行程序上运行,您无法确定它们是以并行或串行顺序运行的。
您可以并且应该在与使用它的任务相同的任务中运行grunt服务器。准备好的对接者图像或特殊YAML功能在这里可能很有用。
https://stackoverflow.com/questions/38577906
复制相似问题