Commit Graph

746 Commits (master)

Author SHA1 Message Date
Tõnis Tiigi 1d66f6f174
Merge pull request #2690 from crazy-max/ci-buildinfo-attrs
ci: opt-in buildinfo attrs with output opt
2022-03-02 08:26:45 -08:00
Tonis Tiigi 520da6f241 dockerfile: check named context for default platform if none set
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-03-01 21:30:10 -08:00
CrazyMax 46422e3aba
ci: opt-in buildinfo attrs with output opt
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-03-01 14:23:48 +01:00
Tõnis Tiigi e6c96c80fd
Merge pull request #2651 from earthly/vlad/fix-layer-index-upstream
Eliminate auto-removal of empty layers
2022-02-25 11:35:40 -08:00
Erik Sipsma cc1499e6d9 Add support for weak ProgressGroup membership.
A ProgressGroup will now only be displayed if a vertex member marked as
non-weak has started.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-02-25 10:24:15 -08: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
Tonis Tiigi c99126012c dockerfile: fix COPY —link to keep previous llb state
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-23 10:52:23 -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
Tonis Tiigi 3396aab16b client: make sure local cache import is propagated via gateway API
Currently the local cache import only worked with client.Solve
function.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-18 16:41:57 -08:00
Vlad A. Ionescu d67243ed0b Fix invalid layer index error
Signed-off-by: Vlad A. Ionescu <vladaionescu@users.noreply.github.com>
2022-02-16 21:11:44 -08:00
Tõnis Tiigi 61027554b7
Merge pull request #2596 from tonistiigi/copy-link
dockerfile: add COPY --link for copy via merging layers
2022-02-14 14:23:23 -08: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 ed62fae04e
buildinfo: dockerfile tests
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 21:55:20 +01:00
CrazyMax 83a483a9fe
buildinfo: opt-in inline build attributes
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 21:55:19 +01:00
CrazyMax c29411b41a
buildinfo: add build attributes and frontend
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 21:55:19 +01:00
CrazyMax b4e37a867f
buildinfo: refactor
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 21:55:18 +01:00
Tonis Tiigi 8441d0a45d dockerfile: use progressgroup for copy link
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-10 22:09:44 -08:00
Tonis Tiigi 6f64543249 dockerfile: add support for COPY/ADD —link
Enables smarter file copy logic using the mergeop
implementation.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-10 22:09:37 -08:00
Justin Chadwell e1c334b74a Update syntax docs for stabilized heredocs
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-02-10 11:29:21 +00:00
Justin Chadwell e3fd4a6450 Stabilize dockerfile heredoc support
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-02-10 11:29:21 +00:00
Tõnis Tiigi e8f5f523aa
Merge pull request #2602 from tonistiigi/env-matches
shell: add function to detect what env were used
2022-02-08 10:10:42 -08:00
Tonis Tiigi 3bb514f923 shell: add function to detect what env were used
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-06 23:23:06 -08:00
coryb a640b47cb1
Merge pull request #2590 from coryb/gateway-exec-signal
Allow signals to be sent to gateway exec containers
2022-02-03 08:39:59 -08:00
Cory Bennett 559d079902 Allow signals to be sent to gateway exec containers
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2022-02-02 16:57:10 +00:00
Justin Chadwell 90ddf87a22 Fix combinations of quotes and heredocs
This adds a couple more integration tests to more fully define the
behavior of these interactions. Additionally, through this, a minor
difference to POSIX was discovered where quotes are supposed to be
properly preserved in a heredoc (since a heredoc is treated as a
double-quoted word).

To handle this, a new property, SkipProcessQuotes is added to the shell
lexer which simply treats quotes as ordinary characters. This is the
only behavioral change needed to actually get the new tests working.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-01-31 10:53:58 +00:00
Justin Chadwell 8005660443 Fix heredoc COPY/ADD expansion to preserve quotes
In the contents of COPY/ADD, we perform expansion on variables using a
lexer. However, this lexer, by default, removes quotes as well as
expanding variables - this isn't really the kind of behavior we're
after, as it feels quite unintuitive.

To fix this, we introduce a new ExpandRaw function, which commands can
implement that implement an alternative expansion that preserves quotes
(and possibly other characters/features in the future).

Additionally, we introduce new tests to more clearly define the desired
behavior. One major note is that backslashes are not passed directly,
and are processed, following normal escape rules (so that we can use `$`
symbols directly).

Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-01-31 10:53:58 +00:00
Justin Chadwell dcf62b1f3f Cleanup rawEscapes in lexer to be internally consistent
Previously, we'd only write raw escapes out as words, and not out to the
result. We weren't using or relying on this behaviour, but it could
easily have caused a bug if we were. This patch just cleans rawEscapes
to behave like rawQuotes.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-01-31 10:53:58 +00:00
CrazyMax 39f6b4e739
Bump github.com/containerd/containerd to v1.6.0-rc.1
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-01-28 10:18:59 +01:00
Tonis Tiigi 45d02301c2 dockerfile: show target platform on cross compiling
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-23 21:55:19 -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
Tonis Tiigi 01e935cff5 hack: update linter to v1.43
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-19 11:48:57 -08:00
Tonis Tiigi 507d18188c dockerfile: apply dockerignore on loading local contexts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-07 18:16:45 -08:00
Tonis Tiigi 4ae6df86f1 dockerfile: fix image name when loaded named context
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-06 19:49:18 -08:00
Akihiro Suda a8278dd166
Merge pull request #2521 from tonistiigi/dockerfile-named-contexts
dockerfile: add support for named contexts
2021-12-27 20:24:02 +09:00
CrazyMax cd8c2cb198
hack: use local platform if none defined
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-12-20 22:39:26 +01:00
Tonis Tiigi 23709ef316 dockerfile: set current platform on image based named context
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-12-15 20:56:46 -08:00
Tonis Tiigi 20285bb53e dockerfile: test named contexts with multi-platform
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-12-15 20:55:51 -08:00
Tonis Tiigi 4eadeaf0f2 dockerfile: add support for named contexts
Stages and implicit stages from image names can be
redefined with build options.

This enables using more that one source directory
and reusing results from other builds. This can also
be used to use a local image from other build without
including a registry.

Contexts need to be defined as `context:name=` frontend
options. The value can be image, git repository,
URL, local directory or a frontend input.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-12-15 20:51:01 -08:00
Tõnis Tiigi 76234fa1c7
Merge pull request #2498 from tonistiigi/warnings-updates
Updates to warnings handling
2021-12-14 17:01:46 -08:00
Tonis Tiigi 872518e334 update warning type definition
Detail is now an array and URL is a separate field.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-12-13 21:38:20 -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
Tonis Tiigi 71316c6f29 split warning message into short and detail
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-12-02 18:17:35 -08:00
Tonis Tiigi 50963e289e dockerfile: show redirect parser warnings
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-11-30 21:58:37 -08:00
Tonis Tiigi 7ee783e90c add source mapping support to warnings
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-11-30 21:58:37 -08:00
Tonis Tiigi 6cad384e93 support setting warnings from frontends
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-11-24 00:19:43 -08:00
Tonis Tiigi 0364e00aac gateway: allow access to current frontend definition
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-11-05 20:27:50 -07:00
Akihiro Suda d47b46cf2a
Merge pull request #2432 from crazy-max/gofmt
go fmt: add //go:build
2021-10-29 12:32:52 +09:00
CrazyMax 54b8ff2fc8
go fmt: add //go:build
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-28 13:26:43 +02:00
CrazyMax c82ef274bf
cgroup-parent support
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-27 23:50:20 +02:00