diff --git a/docker-compose/README.md b/docker-compose/README.md index 13f26446c5be59c624b8c77b8c978a708d716d9d..d76a75b0c79dad1574d9d24912a671a39998abee 100644 --- a/docker-compose/README.md +++ b/docker-compose/README.md @@ -25,21 +25,19 @@ https://gitlab.com/gitlab-org/gitlab-foss/-/issues/17861 - Base images - Services -Devices, are currently bound to the host upon building due to the intrinsics of -how environment variables are used. They will have to be rebuild and can not be -pulled from a local registry. +Devices, these are detected by changes to the .yml file or directory of the +respective service inside the docker-compose directory. Simulators, Since the source code for simulators is maintained by other teams we can not accurately determine from our repository if the simulator has -changed. Instead, the images should be build by the teams their respective CI -pipelines. We would simply pull these images as base images. +changed. Instead, the images is build by the teams their respective CI +pipelines. We simply pull these images as base images. Base images, these are detected by changes to the .env file in the docker-compose directory. When changed they will be downloaded from the remote registry and uploaded to our own using matching tags. -Services, these are detected by changes to the .yml file or directory of the -respective service inside the docker-compose directory. +Services, same mechanism as devices. ### Setup and maintenance @@ -50,7 +48,22 @@ docker-compose directory corresponds to one image. ### Gitlab CI phases -Docker images are build and pushed in two stages. First external images are -downloaded, retagged and pushed to our own registry. +Docker images are managed in three phases. First is remote image storing, second +is image building and change detection with finally image pulling. + +Remote images are downloaded and stored on the local registry when the .env +file for docker-compose has changes. + +Local images are build when either the files in the base context directory +change or if the docker compose file itself has changes. See the gitlab-ci.yml +for how these changes are detected. All local images will be rebuild and tagged +latest when a tagged commit is pushed to master. + +Local images download the latest image from the registry as cache unless it is +a tagged commit on master. -`git diff --name-only HEAD~1..HEAD ./` +Finally, the integration test downloads all images from the registry either +tagged with the current pipeline or with latest. Should both tags be unavailable +than the integration test fails. Not all images are needed for the integration +test. See sbin/tag_and_push_docker_image.sh for how these images are +differentiated.