mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-21 19:35:28 -05:00
Build autoconf and automake and add autoregen.py from https://sourceware.org/git/builder.git Add forge action to build container images. ChangeLog: * .forgejo/workflows/build-containers.yaml: New file. contrib/ChangeLog: * ci-containers/README: New file. * ci-containers/autoregen/Containerfile: New file. * ci-containers/autoregen/autoregen.py: New file. * ci-containers/build-image.sh: New file. Signed-off-by: Pietro Monteiro <pietro@sociotechnical.xyz>
48 lines
1.4 KiB
Plaintext
48 lines
1.4 KiB
Plaintext
# CI Containers
|
|
|
|
Each subdirectory under `contrib/ci-containers/` holds a hermetic description of
|
|
a container image that powers jobs on the [Sourceware
|
|
Forge](https://forge.sourceware.org). The directory itself is used as the build
|
|
context, so any assets referenced by the `Containerfile` must be present
|
|
in the subdirectory.
|
|
|
|
Keeping the description self-contained guarantees reproducible builds.
|
|
|
|
## Building Images
|
|
|
|
Images are built with [buildah](https://buildah.io) via the helper script
|
|
`build-image.sh`. A typical invocation looks like:
|
|
|
|
```bash
|
|
./contrib/ci-containers/build-image.sh \
|
|
-d ./contrib/ci-containers/foo \
|
|
-t v1.0 \
|
|
-- --layers --no-cache
|
|
```
|
|
|
|
* `-d` - Path to the directory containing the `Containerfile`.
|
|
* `-t` - Tag to apply to the resulting image.
|
|
* The trailing `--` passes additional flags directly to `buildah` (here we
|
|
request layered output and disable the cache).
|
|
|
|
The full image tag will be the basename of the directory, in this case `foo`,
|
|
and the value passed to the `-t/--tag` argument. Our hypothetical image will be
|
|
tagged locally as `foo:v1.0`.
|
|
|
|
### Verify the build
|
|
|
|
```bash
|
|
buildah images --json foo:v1.0
|
|
```
|
|
|
|
The command returns a JSON object with the image's ID, size, and other metadata.
|
|
|
|
### Test the image locally
|
|
|
|
```bash
|
|
podman run --rm -it foo:v1.0 /bin/bash
|
|
```
|
|
|
|
By running the image interactively you can confirm that the environment behaves
|
|
as expected.
|