You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: replace GitHub weblog base image build with a poll for GitLab's push
GitHub Actions has no dependency mechanism on GitLab CI jobs, so instead of
building weblog base images itself (via the removed, already-broken
utils/script/build_base_image.py and PR labels), it now waits for the tag
declared in the weblog's Dockerfile to be pushed by GitLab's build_base_images
job, polling Docker Hub every 30s with a 15 minute timeout
(utils/scripts/wait_for_base_image.py).
Drops the _build_weblog_base_images label-gated flag entirely: waiting is
cheap (a single manifest inspect when the tag already exists) so it now runs
unconditionally for every weblog that has a base image tag.
Some of images used in system-tests are prebuild and used threw [hub.docker.com/datadog/system-tests](https://hub.docker.com/repository/docker/datadog/system-tests/).
2
2
3
-
If you need to update them, you will need to follow those
3
+
For weblog base images (nodejs, python, php), the build and push are fully automated:
4
4
5
-
1. update the version in the tag for the image you've just modified (there should be 3 or 4 occurences in the code)
6
-
2. create your PR, and add the relevant label to rebuild the image in the CI
7
-
*`build-python-base-images` for python weblogs
8
-
*`build-php-base-images` for PHP weblogs
9
-
*`build-nodejs-base-images` for Node.js weblogs
10
-
*`build-proxy-image` for proxy image
11
-
3. just before merging your PR, ping somebody from Reliability & Performance team to push your image to hub.docker.com (`#apm-shared-testing` on slack)
5
+
1. GitLab CI's `build_base_images` job (`utils/scripts/build_base_images.py`) runs on every push, on every
6
+
branch. For each `docker-bake.hcl` target declared in a library's `weblog_metadata.yml`
7
+
`base_image_dependencies` section (see `docs/understand/weblogs/weblog-metadata.md`), it computes a
8
+
content hash of the target's dependencies and, if a base image tagged with that hash doesn't already
9
+
exist on Docker Hub, builds and pushes it as `<base tag>-<hash>`.
10
+
2. If you changed a file listed in `base_image_dependencies`, a new tag will automatically be pushed by
11
+
that job. Update the `FROM` line of the relevant weblog Dockerfile(s) to point to the new tag (you can
12
+
find it by running `python utils/scripts/build_base_images.py --dry-run` locally).
13
+
3. GitHub Actions never builds these images itself: it just waits (polling Docker Hub, with a timeout) for
14
+
the tag referenced in the weblog's `FROM` line to become available before building the weblog, via
15
+
`utils/scripts/wait_for_base_image.py`. So make sure the GitLab job has had a chance to push the new tag
16
+
before (or shortly after) your PR's GitHub CI run starts.
17
+
18
+
For other prebuilt images (e.g. the proxy image), add the `build-proxy-image` label to your PR to force a
19
+
rebuild in GitHub CI; then, just before merging, ping somebody from Reliability & Performance team to push
20
+
your image to hub.docker.com (`#apm-shared-testing` on slack).
0 commit comments