168 Commits

Author SHA1 Message Date
Robin Candau
af60f44b1a
Pull Alpine images from Google's public pull-through cache proxy during build
The CI is pulling the Alpine Linux image during `podman build` (via the [Dockerfile](https://gitlab.archlinux.org/archlinux/archlinux-docker/-/blob/master/Dockerfile.template?ref_type=heads#L13)) for each built images.

With the 3 image versions we have right now (`base`, `base-devel`, `multilib-devel`) plus the new / incoming [`repro` image](https://gitlab.archlinux.org/archlinux/archlinux-docker/-/merge_requests/96) (which is built twice during the CI), that's a total of 5 pull requests made to Docker Hub per CI.

Docker Hub has a rate limit of 100 pull requests per 6 hours for unauthenticated requests (see https://www.docker.com/increase-rate-limit). That means that 20 CI runs within 6 hours (including from forks) would get us blocked (which eventually happened during my *numerous* tests with the repro image MR...).

This commit aims to configure podman to pull the image from [Google's public pull-through cache proxy](https://docs.cloud.google.com/artifact-registry/docs/pull-cached-dockerhub-images) instead (and fallback to Docker Hub if needed), reducing the number of requestis we send to Docker Hub and avoiding being rate limited.

Closes https://gitlab.archlinux.org/archlinux/infrastructure/-/work_items/817
2026-04-20 19:48:47 +02:00
Justin Kromlinger
7161278aa0
Ensure BusyBox compatibility for CI 2026-04-20 15:22:05 +02:00
Robin Candau
aa78d463ca
Add the missing 'source_date_epoch' argument to the make-dockerfile.sh script call in the pre-release CI stage
Since https://gitlab.archlinux.org/archlinux/archlinux-docker/-/merge_requests/96, the make-dockerfile.sh script expects the new SOURCE_DATE_EPOCH variable / argument which was mistankely omitted in the pre-release CI stage call to the script.
2026-04-20 11:23:10 +02:00
Robin Candau
152c2410be
Add missing REPRO build arguments in the CI publish step
The publish CI step was mistankely omitted from https://gitlab.archlinux.org/archlinux/archlinux-docker/-/merge_requests/96
2026-04-19 20:48:45 +02:00
Robin Candau
6529154341
Fix SDE definition for podman build and re-add digest comparison 2026-03-31 20:33:21 +02:00
Robin Candau
cccc73178e
Add repro test for the rootFS
Show bit for bit reproducibility of the rootFS
2026-03-31 01:05:58 +02:00
Robin Candau
af4e991076
Consistency for if blocks style 2026-03-31 00:52:11 +02:00
Robin Candau
8cefb71233
Remove non-relevant digest checks
The container registry is always going to rewrite parts of the image in an uncontrollable way. As far as we know, it's not possible to download a 1:1 copy of a build output from the container registry (until someone figures this out).

As far as I understand it, it also explains why `diffoci --semantic` is a thing and why it's generally considered "good enough" (give current constraints).
2026-03-31 00:48:30 +02:00
Robin Candau
6103dcbc5f
Add repro-test stage to the CI
Rebuild the rootFS and the "repro" image, pull the originally built "repro" image and compare them (with `podman digest` and `diffoci`).
2026-03-30 22:35:00 +02:00
Robin Candau
7069a6cc06
Revert "WIP"
This reverts commit cd87d3eb612d5bc8a660a19e7a7bb9e1bf5c252b.
2026-03-30 20:26:23 +02:00
Robin Candau
cd87d3eb61
WIP 2026-03-30 13:14:59 +02:00
Robin Candau
0e2fd8ee15
Run arch-repro-status when testing the 'repro' image
This is more informative than anything, we're primarily looking at providing a bit for bit reproducible image. The reproducibility of the userspace is not fully guaranteed at the moment
2026-03-28 15:53:21 +01:00
Robin Candau
2f44c1aeba
Re-generate pacman keys before testing the repro image in CI 2026-03-28 15:19:22 +01:00
Robin Candau
2c15b530fe
Syntax fix 2026-03-28 14:55:41 +01:00
Robin Candau
c4462ed40b
Fix ordering in GitLab CI and Makefile 2026-03-28 14:53:14 +01:00
Mark Hegreberg
20bbc94b91
repro POC
this commit takes the relevant repro steps from the wsl image, and wraps
breaking changes to only affect the :repro image

testing reproducability is not yet included, so we can discuss the
approach first
2026-03-27 19:36:32 -07:00
Justin Kromlinger
14a5131df7
Revert "Debug #108"
This reverts commit f7a03d6b9d48bff92af94b6d5bf2f54e0e408260.
2025-12-11 15:41:42 +01:00
Justin Kromlinger
f7a03d6b9d
Debug #108 2025-12-10 16:36:05 +01:00
Justin Kromlinger
61cb892bfc
Replace httpie dependency with curl
Closes #102
2024-07-04 19:28:27 +02:00
Justin Kromlinger
bd60189bf8
Add documentation about GITLAB_PROJECT_TOKEN 2024-06-13 13:13:54 +02:00
Justin Kromlinger
6b71ded64e
Revert "Use predefined env variable for GitLab curl requests"
This reverts commit 210098dcc3c8da9c5c7a63bdf2db5abc8054c3af.
2024-06-06 14:00:51 +02:00
Justin Kromlinger
210098dcc3
Use predefined env variable for GitLab curl requests 2024-06-06 13:53:41 +02:00
Justin Kromlinger
c87f7c259d
Use predefined env variable for GitLab Registry Login 2024-06-06 13:41:26 +02:00
Justin Kromlinger
98cd79111d
Use daily images for CI 2024-01-01 16:45:55 +01:00
Justin Kromlinger
337a19c996
Run release jobs on weekly publish-dockerhub schedule 2023-11-19 16:05:21 +01:00
Justin Kromlinger
f1fa835d97
Fix typo 2023-11-19 15:51:11 +01:00
Justin Kromlinger
9d2060177d
Add pre-release dep to publish-dockerhub, which provides BUILD_COMMIT
Fixes https://gitlab.archlinux.org/archlinux/archlinux-docker/-/jobs/192975
2023-11-19 15:44:39 +01:00
Justin Kromlinger
aaffed1742
Move "inofficial" DockerHub description update out of "official" publish-dockerhub job
See https://gitlab.archlinux.org/archlinux/archlinux-docker/-/merge_requests/86#note_133349

Also adds a link where the description of the "offical" DockerHub
description is maintained.
2023-11-18 17:07:58 +01:00
Emil Velikov
76c722561f Split the release stage, reorder
Currently the release stage does 3-4 fairly distinct things:
 - uploads the rootfs tarballs to the Gitlab Generic Packages repo
 - creates and commits Dockerfile* to the release branch, for the
   Dockerhub/Github publishing
 - creates a Gitlab release, referencing the Packages artefacts and the
   release branch
 - updates the Dockerhub webpage

Currently these are intertwined, where the docker website is updated
first, the packages are uploaded, then the Dockerfiles are created and
committed and finally the release is made.

As result we intermix the tools required and permissions.

Split out the Gitlab release into it's own stage, using the yaml driven
format. This should save us some escaping/quoting mayhem.

In addition, move the Dockerhub webpage update as part of the github
publishing, since they require the same permissions.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-11-18 14:58:56 +00:00
Emil Velikov
d251908f91 Use the PACKAGE_REGISTRY_URL during releasing
The bug that mandated the get-public-download-for-generic-package.sh
use has been fixed a while ago.

Directly use the URL variable and drop the no longer needed script.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-11-18 14:58:56 +00:00
Emil Velikov
ee1b64a7ff Use rootfs_file across the board, rename and quote
Currently things are a bit mixed up - just rename all the files to
include the BUILD_VERSION and consistently use the rootfs_file variable.

Throw in some quotes while in there.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-11-18 14:58:56 +00:00
Emil Velikov
bf931bf033 Don't fetch the tarballs during publish-dockerhub
They are not needed at this point, so don't fetch them.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-11-18 14:58:56 +00:00
Emil Velikov
b06e3250d5 Remove bot workaround for the test stage
The issue referenced was fixed a few months after we added the
workaround.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-11-18 14:58:56 +00:00
Emil Velikov
93e0f66a3a Remove not applicable before_script
The image template, has a before_script stage which is overridden by all
instances that use it. Just drop it - it's rather misleading.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-11-18 14:58:56 +00:00
Justin Kromlinger
34b3f4f131
Push multilib-devel to official dockerhub 2023-11-18 15:58:16 +01:00
Justin Kromlinger
49b83e2f55
Fix missing \ 2023-11-01 16:51:57 +01:00
Emil Velikov
244718b5c9 Also release the multilib-devel container
So it can be useful for the wider community. I've intentionally left it
out as separate commit, since:
 - it is untested
 - there is lots of duplication that can/should be fixed
 - if publishing seems like an overkill, people can locally still use it

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-22 19:20:46 +01:00
Emil Velikov
5d404ea4bd Introduce multilib-devel container
Can be used to build 32bit (aka multilib) packages. With all the
simplification and de-duplication done with the previous commits, this
turns out to be a fairly simple job ;-)

Notes:
 - there is currently no test stage for this container
 - the release bits will come with next commit

v2:
 - preserve extra.conf for base/base-devel

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-22 19:20:06 +01:00
Justin Kromlinger
0ba93e3ec9
Fix copy command removal 2023-10-22 15:45:29 +02:00
Justin Kromlinger
fb332d2218
Provide rootfs file name to make-dockerfile.sh script
Fixes https://gitlab.archlinux.org/archlinux/archlinux-docker/-/jobs/186685
2023-10-22 15:37:37 +02:00
Justin Kromlinger
82f4544917
Make sure bash is available in release job for non-posix scripts 2023-10-22 15:04:02 +02:00
Justin Kromlinger
97fcff2abf
Fix make-dockerfile.sh call 2023-10-22 14:48:22 +02:00
Emil Velikov
ed0440cca2 Parametrise Github/Dockerhub dockerfile
Not a big win as-is. It will make the upcoming introduction of
multilib-devel a bit saner.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-02 12:48:41 +01:00
Emil Velikov
d1254eeee4 scripts/make-dockerfile.sh: reuse in the release stage
Bonus point, we actually error out when the git command fails.

v2:
 - fix curl quoting
 - sed match-complete-line-and-remove
 - inline update make-dockerfile.sh variables

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-02 12:46:17 +01:00
Emil Velikov
64cb18a0c3 scripts/make-dockerfile.sh: drop TEMPLATE_ROOTFS_RELEASE_URL
The field is an inline comment, which by default is not present in the
podman log. Plus we do have the exact URL list a couple of lines further
down.

Haven't seen any other Dockerfile have one either, so let's nuke it.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-02 11:53:30 +01:00
Emil Velikov
a972ead2e0 scripts/make-dockerfile.sh: rework TEMPLATE_ROOTFS_DOWNLOAD handling
Currently the TEMPLATE_ROOTFS_DOWNLOAD handling is overly complicated.
For the local builds, we set a ROOTFS=$GROUP.tar.zst. While for remote
builds, we:
 - invoke curl to fetch the remote tarball - ok
 - do curl and shell escaping contortions to prints the filename - ehhh
   - that we already now
   - and rely upon to not change, otherwise sha256sum will fail

Just use a dummy "true", for the local builds and a normal curl
command otherwise.

v2:
 - don't call curl in a sub-shell - no longer needed

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-02 11:51:59 +01:00
Emil Velikov
b213655855 De-duplicate podman tag/push commands
The commands are identical across the three hosts. Just flesh that into
a simple for loop.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-25 23:40:44 +01:00
Emil Velikov
069a4dee59 Drop duplicate parallel/matrix
The option was moved the to template and an earlier commit
reintroduced/copied them back seemingly by mistake.

Cc: nl6720 <nl6720@gmail.com>
Fixes: ca9957f ("Do not use secure runners on forks")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-25 23:40:44 +01:00
Emil Velikov
92315d6eaa Install git, add to the README
We use git in the makefile to create the container revision label.
This did not have any affect outside the local containers, since the
official ones use the CI_COMMIT_TAG variable from the CI.

Fixes: 5ec09f5 ("gitlab-ci: install devtools without its dependencies")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-25 18:20:34 +00:00
Emil Velikov
cda5b61390 Remove the uncompressed tar artefact
The file may be useful locally, but for the other stages we don't need
it. Explicitly remove it since it tends to be 3-4x the size of
everything else.

v2
 - switch from rm to artefacts:exclude:

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-22 22:56:31 +01:00