场景如下:
在使用 docker 容器进行持续集成的过程中,我需要在 localhost:9000 中运行grunt serve
为我的应用程序提供服务,然后我需要运行另一个容器,该容器使用在 localhost: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/
第一个图像运行grunt serve
在 localhost:9000 中为我的应用程序提供服务的任务,我希望第二个图像使用这个正在运行的应用程序来运行另一个脚本。