4

I have a project on gitlab, and I would use gitlab CI for unit testing. Actually, I have a other repository name "docker" with docker-compose.yml and Dockerfile for two project (because i reproduce the production configuration, the two project are interdependant)

Actually in my dev configuration

in Projects directory:

  • docker
  • project_1
  • project_2

in docker directory:

  • docker-compose.yml
  • Dockerfile-project1
  • Dockerfile-project2
  • [some config file ask in dockerFile]

docker-compose.yml have relative path as ../project_1 and ../project_2

For set up my configuration, I make :

  • cd docker
  • docker-compose up -d project1 (name in docker-compose.yml)
  • docker exec -ti project1 bash

Question ? I want know how I can pull the git repository "docker" and launch docker-compose up for the project1 since gitlab CI start ?

Thanks

4

1 回答 1

1

我们已经构建了一个支持docker-compose的 gitlab 运行器。有关设置和配置,请参阅其自述文件。

基本上,您只需使用与开发中相同的命令,请参阅此处以获取使用 Makefile 的示例或使用docker-compose命令的示例。

于 2016-11-06T19:25:00.963 回答