What type of PR is this?
/kind feature
What this PR does / why we need it:
It implements --link for COPY and ADD instructions and enables the creation of
cachable layers that can be reused independently across builds.
Follows buildkit `--link` specifications
How to verify it
bats tests/bud.bats
Which issue(s) this PR fixes:
Fixes#4325
Does this PR introduce a user-facing change?
Yes, gives extra functionality to Containerfiles
Signed-off-by: Joshua Arrevillaga <2004jarrevillaga@gmail.com>
Update "the bud with --cpu-shares" test to expect the a cgroupsv2 value
computed using either the older formula or the newer one introduced in
github.com/opencontainers/cgroups v0.0.3, and give it a unique name so
that it can be selected more easily with bats's "--filter" flag.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
- Changed GitHub username from 'Neil-Smith' to 'actionmancan'
- Fixed GitHub URL from https://github.com/Neil-Smith to https://github.com/actionmancan
- Corrected column alignment by removing extra spaces
- Maintains Neil Smith's role as Community Manager
Does this PR introduce a user-facing change?
```release-note
None
```
Signed-off-by: G A Neil Smith <nesmith@redhat.com>
When SOURCE_DATE_EPOCH is passed in as a build-arg, treat it as we would
if it was passed in via the environment or its own CLI flag.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Unfortunately on a number of occasions, Buildah has been released
officially with a `-dev` suffix in the version number. Assist in
catching this mistake at release time by the addition of a simple
conditional test. Note that it must be positively enabled by a
magic env. var. before executing the system tests.
Also (thanks to @lsm5) update the TMT test to trigger the new
condition for future Fedora releases.
Signed-off-by: Chris Evich <cevich@redhat.com>
Use the "formats" package to format `info` and `inspect` output, so that
template users will be able to use whatever functions are provided with
`images` and `containers` output, including "json", "lower", and "upper".
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Use the containers/common "formats" package, which started off as a copy
of our own and is still mostly the same, instead of our own.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
When building or committing an image in OCI format, default to setting
the org.opencontainers.image.created annotation to the value used in the
image's config blob for the image's creation date. The behavior can be
controlled using the new --created-annotation flag.
Add --annotation and --unsetannotation flags to `buildah commit` which
mimic the same flags for `buildah build`.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
When RUN requires us to create the target for a mountpoint, make note of
it and any parent directories that needed to be created, and filter them
out when generating a layer diff or --output data.
The exceptions will be directories that the conformance tests confirm
that BuildKit also leaves behind, though for compatibility with the
classic builder, we have to make that conditional.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
When RUN requires us to create the target for a mountpoint, make note of
it and any parent directories that needed to be created, and clear them
all out if they look basically the same after the command finishes.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
The TempVolumes field is used to track data that's specific to a Run()
call, and there can be more than one of those going at a time. Merge
its data into the runMountArtifacts struct, which already keeps a list
of locations that we have to clean up in exactly the same way.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Add an OmitLayerHistoryEntry field to CommitOptions, which more or less
causes us to reproduce our base image, except with PrependedEmptyLayers,
AppendedEmptyLayers, PrependedLinkedLayers, AppendedLinkedLayers, and
config changes still added in.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>