Commit Graph

365 Commits

Author SHA1 Message Date
Justin Kromlinger
ae0527df18
Disable sandbox in oci images due to missing kernel landlock
Resolves the `error: restricting filesystem access failed because the
landlock ruleset could not be applied!` when running pacman.

Closes #103.
2025-01-31 12:22:15 +01:00
hashworks
cac42fb2e6 Merge branch 'renovate/alpine-3.x' into 'master'
Update alpine Docker tag to v3.21

See merge request archlinux/archlinux-docker!90
2025-01-31 11:01:54 +00:00
renovate
b232b17c94
Update alpine Docker tag to v3.21 2024-12-05 22:24:48 +00: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 210098dcc3.
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
hashworks
19c9adc97f Merge branch 'renovate/alpine-3.x' into 'master'
Update alpine Docker tag to v3.19

See merge request archlinux/archlinux-docker!88
2023-12-09 21:58:12 +00:00
renovate
7229f536b4
Update alpine Docker tag to v3.19 2023-12-08 02:23:29 +00: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
a162c7ebbe
Fix typo 2023-11-18 17:24:36 +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
hashworks
7dd6177315 Merge branch 'releasing' into 'master'
Remove misc workarounds, split/rework release stage

See merge request archlinux/archlinux-docker!86
2023-11-18 16:07:40 +00: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
hashworks
199f647532 Merge branch 'multilib-devel' into 'master'
Introduce multilib-devel

See merge request archlinux/archlinux-docker!81
2023-10-31 19:40:54 +00: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
hashworks
b34fe7a1e0 Merge branch 'dedup-cleanup' into 'master'
Misc de-duplication and cleanups

See merge request archlinux/archlinux-docker!85
2023-10-16 21:20:41 +00: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
0a6910cade Use pattern rules in the makefile
Less duplication ftw, specially with multilib-devel on the horizon.
Unfortunately we'd need to tag the file pattern rules as precious,
otherwise make thinks they are intermediate files and nukes them.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-02 12:45:57 +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
2f43fc413a scripts/make-dockerfile.sh: tweak sha256 sum handling
Drop the spurious cat, we already echo the value the like above so it's
pretty clear what it is in the logs.

While here, rename the file to the what's commonly used by us (see the
ISOs) and others, while removing the misleading "rootfs.tar" - we're
having a tar.zst tarball.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-25 23:49:58 +01:00
Emil Velikov
c4b62bb18f scripts/make-rootfs.sh: move non-wrapper calls further up
Move the cp/ln calls outside of the WRAPPER call block. The files that
are referenced are either disowned by pacman or are explicitly "backup"
files, such that pacman will not override them.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-25 23:49:58 +01:00
Emil Velikov
0067757d21 scripts/make-rootfs.sh: drop pacman gnupg removal
The files are explicitly omitted from the tarball via the excludes file.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-25 23:49:52 +01:00
Emil Velikov
f737d64397 Move shell scripts out of the Makefile
Embedding one pieces of code into another (shell script into a makefiles
in this case) is rarely pretty. Split things up, as appropriate.

While here, simplify the rootfs in a few ways:
 - pass only the extra non-base (and effectively group name) package
 - add a handy variable for the fakeroot/fakechroot combo
 - split and rewrap long lines

As a bonus point, this makes it easier to use pattern rules in the
makefile - which will be handy for the upcoming multilib-devel
group/target.

Plus we can check the scripts via shellcheck/etc CI stage, as follow-up.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-25 23:40:44 +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
Kristian Klausen
e688cede58
Merge branch 'install-git' into 'master'
Install git, add to the README

See merge request archlinux/archlinux-docker!83
2023-09-25 20:21:11 +02: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
Kristian Klausen
486eadb65e
Merge branch 'omit-tar-artefacts' into 'master'
Remove the uncompressed tar artefact

See merge request archlinux/archlinux-docker!82
2023-09-23 00:44:36 +02: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
Kristian Klausen
6d3ea0c032
Fix incorrect cosign verify commands
The identity has been changed[1] to also include the "CI config path"
and the ref path should be the git tag of the release.

Also remove `jq` as it is only nice to have, not needed and it masks the
return code of `cosign verify`.

[1] a4b3e128c1

Fixes: 8317be4 ("Sign the images with sigstore's fulcio/rekor")
2023-09-21 06:42:36 +02:00
Kristian Klausen
c432cbcbe2
Add use-sigstore-attachments: true to the image:publish:secure job
Fixes: 8317be4 ("Sign the images with sigstore's fulcio/rekor")
2023-09-21 06:12:54 +02:00