From eec73d15c0722beb8445c8b7972829076f8c96cf Mon Sep 17 00:00:00 2001 From: Bruno Bernardo Date: Fri, 29 Nov 2024 15:50:25 +0100 Subject: [PATCH] Images/CI: add a VERSION to trigger fresh build The build of fresh CI images and their push to the registry is done by `images/ci_create_ci_images.sh` in the `oc.docker.ci:` jobs. More precisely, the script computes a tag using a hash of some relevant files (defined in `images/ci/inputs`). If the images with these tags are already in the registry, then no new CI images are built. If not, then they are built and pushed to the registry. In other words, new CI images are produced if and only if the files considered in `images/ci/inputs` have changed. This saves time and computation costs but mean that the CI images do not always use the latest Alpine packages available. In order to force the update of the CI images anytime, we introduce a VERSION file whose modification will trigger a fresh build of these images. For thes sake of simplicity, this file is minimal: it contains the name of these images which should be stable and a revision number. In particular it contains no date (Build date, Revision date, etc.) because this could be misleading: it could be understood as the last build of the image but this could be inaccurate since a new build may be triggered if other relevant files are modified. It does not also mention the Alpine version used as the file could be out of sync the Alpine version defined in `scripts/version.sh`. Basically, the revision number represents the number of times we have wanted to rebuild the CI images only for benefitting from the latest Alpine packages. --- images/ci/VERSION | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 images/ci/VERSION diff --git a/images/ci/VERSION b/images/ci/VERSION new file mode 100644 index 000000000000..200c2379c01b --- /dev/null +++ b/images/ci/VERSION @@ -0,0 +1,2 @@ +Name: CI Images +Revision: 0 -- GitLab