Commit Graph

10 Commits

Author SHA1 Message Date
Aaron Lehmann 9521672fdb Document when BlobDirectory is overridden
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2024-05-27 10:50:27 -07:00
Aaron Lehmann e6c7949aa7 imagebuildah: Support custom image reference lookup for cache push/pull
This allows callers to provide custom SourceLookupReferenceFunc and
DestinationLookupReferenceFunc for cache pull/push. These can be used to
implement custom blob caches, and to wrap the reference being
pushed/pulled to influence the copy behavior.

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2024-05-24 14:27:01 -07:00
Aditya R d68d9a237c
buildah/push/manifest-push: add support for --force-compression
Adds support for `--force-compression` which allows end-users to force
push blobs with the selected compresison in `--compression` option, in
order to make sure that `blobs` of other compression on registry are not
reused.

Is equivalent to: `force-compression` here: https://docs.docker.com/build/exporters/#compression
Closes: https://github.com/containers/buildah/issues/4613

Also Implements:
`--compression-format` and `--compression-level` for `manifest push` just like
`podman`'s `manifest push`

Signed-off-by: Aditya R <arajan@redhat.com>
2023-08-15 10:44:06 +05:30
Daniel J Walsh 8d5d763213
Fix stutters
Podman adds an Error: to every error message. So starting an error
message with "error" ends up being reported to the user as

Error: error ...

This patch removes the stutter.

Also ioutil.ReadFile errors report the Path, so wrapping the err message
with the path causes a stutter.

Signed-off-by: Daniel J Walsh dwalsh@redhat.com

[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-09-19 07:11:44 -04:00
Sascha Grunert ce384684c0
Switch to golang native error wrapping
We now use the golang error wrapping format specifier `%w` instead of
the deprecated github.com/pkg/errors package.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-07-07 11:41:47 +02:00
Valentin Rothberg d9b3a185ca use c/image/pkg/blobcache
Buildah's pkg/blobcache has been moved into containers/image [1] to
consolidate implementations of interfaces such as image destinations
and image sources.

Since there are no functional changes: [NO NEW TESTS NEEDED]

[1] https://github.com/containers/image/pull/1459

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-02 09:55:16 +01:00
Giuseppe Scrivano 1cc85e7c59
push: support to specify the compression format
add two new flags to "buildah push" to allow tweaking the compression
format for the data layers.

The flag --compression-format allows users to specify the compression
algorithm to use.

With --compression-level it is possible to tweak the compression
level.

An image usage for partial pulls can be pushed with:

$ buildah push --compression-format zstd:chunked FOO

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-09-22 23:13:23 +02:00
Miloslav Trmač 2e8668b591 Fix documentation of the --format option of buildah push
It affects all transports; and without --format, we try several manifest formats.

[NO NEW TESTS NEEDED]

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-06-17 20:11:32 +02:00
Daniel J Walsh 65048c85d0
codespell cleanup
[NO TESTS NEEDED] Only code cleanup

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-05 15:56:04 -04:00
Valentin Rothberg fb331c1861 restore push/pull and util API
Restore the push and pull API that commit dcd2a92e56 removed.
These changes would break vendoring into openshift/builder due
to build errors.

For the same reason, restore `util.FindImage` and `util.AddImageNames`
but deprecate the `findRegistry` argument.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-04-23 12:50:31 +02:00