| .gitlab | ||
| assets | ||
| patches | ||
| scripts | ||
| .dockerignore | ||
| .gitattributes | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| CODEOWNERS | ||
| CONTRIBUTING.md | ||
| Dockerfile.alpine-bash-jq-curl-git | ||
| Dockerfile.apollo | ||
| Dockerfile.build-git | ||
| Dockerfile.cache-chrome | ||
| Dockerfile.custom | ||
| Dockerfile.danger | ||
| Dockerfile.gitlab-charts-build-base-helm-3.9 | ||
| Dockerfile.gitlab-helm3.9-kubectl1.23 | ||
| Dockerfile.gitlab-operator-build-base-golang-1.20 | ||
| Dockerfile.gitlab-vscode-nodeless | ||
| Dockerfile.golangci-lint-1.50-alpine | ||
| Dockerfile.golangci-lint-1.51-alpine | ||
| Dockerfile.golangci-lint-1.52-alpine | ||
| Dockerfile.kaniko | ||
| Dockerfile.postgres-12-pgvector-0.4.1 | ||
| Dockerfile.postgres-13-pgvector-0.4.1 | ||
| Dockerfile.postgres-14-pgvector-0.4.1 | ||
| Dockerfile.postgres-15-pgvector-0.4.1 | ||
| Dockerfile.redis-cluster-6.2.12 | ||
| Dockerfile.redis-cluster-7.0.11 | ||
| Dockerfile.release-tools | ||
| Dockerfile.sitespeed-gitlab | ||
| Dockerfile.terraform | ||
| Dockerfile.triage-ops-ruby-2.7 | ||
| Dockerfile.ubi-release | ||
| Dockerfile.www-gitlab-com-debian-bullseye-ruby-3.0-node-16 | ||
| Dockerfile.www-gitlab-com-debian-bullseye-ruby-3.2-node-18 | ||
| Dockerfile.zoekt-ci-image-1.2 | ||
| Dockerfile.zoekt-ci-image-1.5 | ||
| LICENSE | ||
| README.md | ||
GitLab Build Images
This repository is used to build docker images that are used to build and test various parts of GitLab:
- Build Omnibus packages
- Test GitLab-CE/EE project
- Build gitlab-org/www-gitlab-com project
Adding a new image
There are two methods to adding a new image:
- Use a Dockerfile.
- Use a custom image with versioned features.
Use a Dockerfile
A bespoke image is one that uses it's own Dockerfile. In the interests of avoiding repetition, it's better to use the custom docker build if possible.
Images from a custom Dockerfile are built from job definitions in custom.images.yml
Assuming the image you want to add is called new-image:
- Add a new build job:
new-image:
extends: .build_static_image
NOTE: You can use parallel:matrix keyword to build images for multiple architectures:
new-image:
extends: .build_static_image
parallel:
matrix:
- ARCH: [ 'arm64', 'amd64' ]
- Add a Dockerfile:
Dockerfile.new-image.
Use a custom image with versioned features
To add a new image to the build, create a new images definition file like gitlab.images.yml.
With custom images, the components and versions define the resulting image name and tag.
Major components define image path. Base image is defined by OS component. Supported base images are:
debian:$versionubi:$version
Supported major components are:
OSRUBYGOLANGRUSTNODEPOSTGRES
Minor components define tag name. Supported minor components are:
BUNDLERRUBYGEMSGITLFSCHROMEYARNGRAPHICSMAGICKEXIFTOOLBAZELISKDOCKERBUILDXGCLOUDKUBECTLHELM
The names are defined as [feature]-[version] pairs, separated by -.
Here are some example build names:
debian-bullseye-ruby-2.7-golang-1.15:git-2.29debian-bullseye-ruby-3.0.0-node-14.15:git-2.29-lfs-2.9-yarn-1.22-graphicsmagick-1.3.34debian-bullseye-ruby-3.0.0.patched-golang-1.14-postgresql-12:git-2.29-lfs-2.9-chrome-87-node-14.15-yarn-1.22-graphicsmagick-1.3.34
Adding a new build
As an example, if you want to add new image for Ruby 3.0 with git 2.29 and golang 1.15 based on debian bullseye,
following job definition would have to be created:
new_image:
extends:
- .build_dynamic_image
variables:
OS: 'debian:bookworm'
RUBY: '3.0'
GOLANG: '1.15'
RUST: '1.73.0'
GIT: '2.29'
Note that tag name is limited to 128 characters so amount of minor components an image can have is limited by it.
Pushing a rebuild image
Images are built and pushed automatically after a merge request is merged.
Note regarding Google Chrome
Google has a policy of yanking older versions of Google Chrome from their PPA
whenever a new major version is released. To help maintain consistent build
images, there is a CI step that saves the latest Google Chrome and Chromium .deb into an the
GitLab package registry. The install for Chrome will use registry to fetch corresponding packages.
Make sure a certain version is cached before updating it in build jobs.
See scripts/cache-google-chrome for more details.
Contributing
See Contributing