Files
podman/test/e2e/quadlet/podmanargs.build
Johannes Maibaum 9f823ecb25 Quadlet: Add support for .build files
.build files allow to build an image via Quadlet. The keys from a .build
file are translated to arguments of a `podman build` command by Quadlet.

Minimal keys for .build files are `ImageTag=` and a context directory,
see `SetWorkingDirectory=`, or a `File=` pointing to a Containerfile.

After sorting .build files into the Quadlet dependency order, there
remains a possible dependency cycle issue between .volume and .build
files: A .volume can have `Image=some.build`, and a .build can have
`Volume=some.volume:/some/volume`.

We solve this dependency cycle by prefilling resourceNames with all
image names from .build files before converting all the unit files.

This results in an issue for the test suite though: For .volume's
depending on *.image or *.build, we need to copy these additional
dependencies to the test's quadletDir, otherwise the test will fail.
This is necessary, because `handleImageSource()` actually needs to know
the image name defined in the referenced *.{build,image} file. It cannot
fall back on the default names, as it is done for networks or volumes,
for example.

Signed-off-by: Johannes Maibaum <jmaibaum@gmail.com>
2024-05-27 16:59:39 +02:00

15 lines
334 B
Plaintext

## assert-podman-args "--foo"
## assert-podman-args "--bar"
## assert-podman-args "--also"
## assert-podman-args "--with-key=value"
## assert-podman-args "--with-space" "yes"
[Build]
ImageTag=image:latest
SetWorkingDirectory=unit
PodmanArgs="--foo" \
--bar
PodmanArgs=--also
PodmanArgs=--with-key=value
PodmanArgs=--with-space yes