Continuous integration 与drone.io的集成测试
我正在使用一个名为Drone(Drone.io)的CI工具。所以我真的想用它做一些集成测试。我想要的是Drone在Drone主机的某个端口上启动我的应用程序容器,然后我就能够对其运行集成测试。例如,在.drone.yml文件中:Continuous integration 与drone.io的集成测试,continuous-integration,drone,drone.io,Continuous Integration,Drone,Drone.io,我正在使用一个名为Drone(Drone.io)的CI工具。所以我真的想用它做一些集成测试。我想要的是Drone在Drone主机的某个端口上启动我的应用程序容器,然后我就能够对其运行集成测试。例如,在.drone.yml文件中: build: image: python3.5-uwsgi pull: true auth_config: username: some_user password: some_password email: email
build:
image: python3.5-uwsgi
pull: true
auth_config:
username: some_user
password: some_password
email: email
commands:
- pip install --user --no-cache-dir -r requirements.txt
- python manage.py integration_test -h 127.0.0.1:5000
# this should send various requests to 127.0.0.1:5000
# to test my application's behaviour
compose:
my_application:
# build and run a container based on dockerfile in local repo on port 5000
publish:
deploy:
Drone 0.4无法从您的
Dockerfile
启动服务,如果您想要启动docker容器,您应该在此构建之前、在此构建之外构建它,然后推送到dockerhub或您自己的注册表,并将其放入撰写部分,请参阅
在运行集成测试之前,您还可以在内部版本中启动应用程序,nohup python manage.py server-h 127.0.0.1:5000&
。在运行集成测试之前,请确保应用程序已启动并侦听5000端口
我建议您将drone 0.5与管道一起使用,您可以在构建之前构建docker映像并将其推送到注册表,并将其用作构建内部的服务。drone 0.4无法从您的
docker文件启动服务
,如果您想要启动docker容器,您应该在此构建外部之前构建它,然后推送到dockerhub或您自己的注册表,并将其放入撰写部分,请参阅
在运行集成测试之前,您还可以在内部版本中启动应用程序,nohup python manage.py server-h 127.0.0.1:5000&
。在运行集成测试之前,请确保应用程序已启动并侦听5000端口
我建议您将drone 0.5与管道一起使用,您可以构建docker映像,并在构建之前将其推送到注册表,并将其作为构建中的服务使用