Commit Graph

200 Commits (d21254e7f74b49a84c3fbe1b13260cb23954cf92)

Author SHA1 Message Date
Kohei Tokunaga 35f658525b test: Ensure testPullZstdImage pulls zstd image
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2022-02-25 17:11:58 +09:00
Tõnis Tiigi b0e56cd563
Merge pull request #2654 from crazy-max/buildinfo-contexts
buildinfo: named input contexts support
2022-02-23 12:13:14 -08:00
CrazyMax 2661917e8d
buildinfo: handle deps
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-23 10:40:33 +01:00
Tõnis Tiigi 0154dfcfaf
Merge pull request #2648 from ktock/cache-stargz-snapshotter
Enable estargz-based lazy pulling on registry cache importer
2022-02-22 09:24:17 -08:00
Tõnis Tiigi a08d2ea19b
Merge pull request #2645 from crazy-max/buildinfo-wout-exporter
buildinfo: export metadata without exporter
2022-02-17 21:57:46 -08:00
Kohei Tokunaga bed5a44d52 Enalbe estargz-based lazy pulling on registry cache importer
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2022-02-17 10:44:14 +09:00
CrazyMax fd0af43d77
buildinfo: export metadata without exporter
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-16 20:32:57 +01:00
Kohei Tokunaga 1a22b17852 Fix shared cache mounts result in overlay corruption
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2022-02-16 17:46:07 +09:00
CrazyMax 9cd97fb726
buildinfo: check nil attrs
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 22:55:37 +01:00
CrazyMax cdaafb9303
buildinfo: use metadata to set frontend build sources
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 21:55:20 +01:00
CrazyMax b352c9d5d2
buildinfo: client tests
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 21:55:20 +01:00
CrazyMax b2e5d1938d
buildinfo: set frontend attrs to bridge result
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 21:55:20 +01:00
Brian Goff c332148dd5 push: always skip foreign layers
Foreign layers are only kept as foreign at this point if the user
requested it to be.
Since foreign layers are not meant to be pushed, automatically skip
those layers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-02-11 00:59:53 +00:00
Brian Goff 758410d74a Cleanup foreign-layers implementation
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-02-10 01:12:42 +00:00
Brian Goff 3a2a031ed5 Add foreign-layer integration tests
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-02-10 01:12:42 +00:00
Tonis Tiigi 30a0b02479 exec: allow mounting secret environment variables
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-31 11:22:57 -08:00
Tonis Tiigi dc21885891 hack: enable more linters
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-19 12:20:30 -08:00
Erik Sipsma ce012ab70c remote cache: support arbitrary layers as results
This change enables inline cache to work as expected with MergeOp by
supporting a new type of result, DiffResult, which enables results to be
specified as a specific ordered set of layers inside an image.
Previously, results could only be specified with a singe layer index,
which meant that they had to start at the image's base layer and end at
that index. That meant that merge inputs couldn't be specified as they
are often a subset of the image layers that don't begin at the base.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-01-11 13:27:05 -08:00
Erik Sipsma 0ec885106f Add DiffOp test cases.
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-01-06 11:05:51 -08:00
Akihiro Suda 15fb1145af
Merge pull request #2491 from ktock/overlayfs-redirect
Disable redirect_dir for avoiding incorrect diff
2022-01-05 14:03:04 +09:00
Kohei Tokunaga bc5cfe960b Disable redirect_dir for overlayfs snapshotter
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-12-24 11:58:44 +09:00
Tõnis Tiigi 539be17089
Merge pull request #2428 from tonistiigi/default-user-groups
executor: make sure supplementary groups are set for unset user
2021-12-14 17:02:09 -08:00
Erik Sipsma 2bfad4b0dc Change integration.Test from a func to a interface
Using an interface instead of a func is more flexible while achieving
the same effect. It allows you to succintly define a large number of
test cases as structs, as is common in table-driven testing.

A helper func is added that converts the existing test funcs into the
interface, so the change is fairly seamless.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2021-12-09 20:35:48 -08:00
Erik Sipsma 0539181757 Update tests for consistency w/ dockerd.
When vendored into moby, the local exporter uses a user map that results
in all files being given at most 755 permissions. This change updates
the test to use permissions less than or equal to that to make tests
equivalent whether running w/ dockerd worker or any other type.

Additionally, add assertions that exported images also have the expected
contents, which helps ensures consistency between images created by
dockerd and those created by vanilla buildkit.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2021-12-06 19:18:16 -08:00
Erik Sipsma 43a74261b3 Remove symlink, not target, in FileOp.Rm.
Before this change, if the path provided to FileOp.Rm was a symlink then
the target of the symlink would be removed instead of the symlink
itself. Now, the symlink will be removed instead. However, any symlinks
present in the parent dirs of the specified path will still be resolved
before calling os.Remove; this change only results in the base of the
specified path not being followed.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2021-11-18 12:44:12 -08:00
Erik Sipsma d73e62f878 Add initial MergeOp implementation.
This consists of just the base MergeOp with support for merging LLB
results that include deletions using hardlinks as the efficient path
and copies as fallback.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2021-11-18 11:10:48 -08:00
Tõnis Tiigi b33357bcd2
Merge pull request #2430 from crazy-max/cgroup-parent
cgroup-parent support
2021-10-28 10:21:03 -07:00
Tõnis Tiigi 4b86211bed
Merge pull request #2405 from ktock/cachecompression
Propagate compression options to the inline cache export
2021-10-27 20:58:53 -07:00
CrazyMax c82ef274bf
cgroup-parent support
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-27 23:50:20 +02:00
Tonis Tiigi e3ca502c09 client: improve checks for user test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-10-27 11:06:45 -07:00
Tonis Tiigi 58ecc5ce14 executor: make sure supplementary groups are set for unset user
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-10-27 11:03:37 -07:00
Kohei Tokunaga f9e0346b34 Propagate compression options to the inline cache export
Co-authored-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-10-22 15:43:32 +09:00
CrazyMax 954c4721f7
use bytes as given size for tmpfs mount
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-19 19:47:17 +02:00
CrazyMax 87e1fa7ecb
add size to tmpfs mounts
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-18 10:54:52 +02:00
Andrey Smirnov a5d1cfc1e4
fix: provide only available capabilities to insecure environment
The problem this change is trying to fix are the environments where some
capabilities are already dropped, so they can't be granted to the
job with `--security=insecure`.

I know that probably fixed set of capabilities was implemented to
provide a stable build environment, but at the same time this breaks
environments with reduced capabilities.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-10-15 19:57:32 +03:00
CrazyMax 4e32ae5630
Add support for ulimit
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-08 11:50:09 +02:00
CrazyMax 6094339341
Add support for shm size
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-01 16:07:29 +02:00
Tonis Tiigi 8b5c4d74ef exporter: support creating blobs with zstd compression
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-09-05 22:43:15 -07:00
Kohei Tokunaga f8d30d567e Add `estargz` compression type
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-08-24 14:10:09 +09:00
Koichi Shiraishi 671ae38fb7
all: unify the specs-go package import alias to ocispecs
ocispecs means "O"pen "C"ontainer "I"nitiative image-spec/"specs"-go/v1
                      opencontainers          /image-spec/specs-go/v1

Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
2021-08-11 08:29:09 +09:00
CrazyMax f4a67d7e9c
Exporter config digest typo
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-07-15 20:42:36 +02:00
Tõnis Tiigi b055d2d55c
Merge pull request #2057 from ktock/export-compression
exporter: Enable to specify the compression type for all layers of the finally exported image
2021-07-06 21:52:36 -07:00
ktock 3152eab58f Enable to forcefully specify compression type
Signed-off-by: ktock <ktokunaga.mail@gmail.com>
2021-07-07 12:00:06 +09:00
Akihiro Suda 8d70a9e098
Merge pull request #2215 from tonistiigi/improve-errors
Improve build errors and remove useless grpc prefix
2021-07-01 14:33:40 +09:00
Tonis Tiigi a27d7c3d81 exec: improve error message on exec errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-30 21:10:37 -07:00
Akihiro Suda be8ab28a0a
Merge pull request #2081 from tonistiigi/local-differ-none
Allow none differ on local source to avoid false Dockerfile matches
2021-07-01 09:42:24 +09:00
Aaron Lehmann a018bf5cd9 Test with tonistiigi/test:nolayers as well
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-06-27 16:09:42 -07:00
Aaron Lehmann 8f2fd48a6d Check that scratch is mounted as empty dir
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-06-23 14:15:06 -07:00
Aaron Lehmann e70f8556e5 Add test for copying from scratch
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-06-23 13:36:36 -07:00
Tonis Tiigi c773a215c1 integration: add common context base to all integration tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-18 20:49:49 -07:00