Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
ca9b73dd
Commit
ca9b73dd
authored
3 years ago
by
Corné Lukken
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-205
: Improve CI image building documentation
parent
fd9cfb61
No related branches found
No related tags found
1 merge request
!183
Docker image building & pushing with CI pipeline caching
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docker-compose/README.md
+23
-3
23 additions, 3 deletions
docker-compose/README.md
with
23 additions
and
3 deletions
docker-compose/README.md
+
23
−
3
View file @
ca9b73dd
...
@@ -12,7 +12,11 @@ iteration speed. In order to achieve this the project requires properly tagged
...
@@ -12,7 +12,11 @@ iteration speed. In order to achieve this the project requires properly tagged
images and mechanisms for change detection.
images and mechanisms for change detection.
For change detection the system relies on git. Git is used to determine the
For change detection the system relies on git. Git is used to determine the
directories that have changes between the current and previous commit.
directories and files that have changes between the current and previous commit.
All image related change detection mechanisms are based on this difference.
Using docker cache within the dind service is impractical see:
https://gitlab.com/gitlab-org/gitlab-foss/-/issues/17861
### Types of containers and specific strategies.
### Types of containers and specific strategies.
...
@@ -28,10 +32,26 @@ pulled from a local registry.
...
@@ -28,10 +32,26 @@ pulled from a local registry.
Simulators, Since the source code for simulators is maintained by other teams
Simulators, Since the source code for simulators is maintained by other teams
we can not accurately determine from our repository if the simulator has
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
changed. Instead, the images should be build by the teams their respective CI
pipelines. We would simply pull these images.
pipelines. We would simply pull these
images as base
images.
Base images, these are detected by changes to the .env file in the
Base images, these are detected by changes to the .env file in the
docker-compose directory.
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
Services, these are detected by changes to the .yml file or directory of the
respective service inside the docker-compose directory.
respective service inside the docker-compose directory.
### Setup and maintenance
All behavioral logic to orchestrate change detection and image pushing can be
found in the sbin/tag_and_push_docker_images.sh script as well as the
.gitlab-ci.yml. The shell script relies on the fact that each .yml file in the
docker-compose directory corresponds to one image.
### Gitlab CI phases
The building and pushing of docker images is performed in two separate phases.
This is because certain stages will depend on the presence of the base images.
The base images will run as first
`git diff --name-only HEAD~1..HEAD ./`
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment