229 Commits

Author SHA1 Message Date
Tonis Tiigi
6d6adc11a1
bake: use cacheonly exporter for implicit targets
Clearing the exporter may result in default export
behavior from the driver.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-07-08 17:53:52 -07:00
CrazyMax
7957b73a30
bake: use compose project name from env if set
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-04 16:37:07 +02:00
Tonis Tiigi
233b869c63
bake: add list-variables option
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-07-03 09:54:03 -07:00
Tonis Tiigi
7460f049f2
bake: add list-targets options to list available targets/groups
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-07-03 09:54:03 -07:00
Tonis Tiigi
8f4c8b094a
bake: allow text descriptions for targets
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-07-03 09:54:03 -07:00
Tonis Tiigi
8da28574b0
bake: add call methods support and printing
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-07-03 09:54:02 -07:00
Tonis Tiigi
f7a32361ea
use csvvalue package for parsing csv inputs
This package is better suited for parsing single-line
CSV strings.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-06-27 21:31:11 -07:00
CrazyMax
5599699d29
test: compose cgroup property
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-06-25 18:22:50 +02:00
Sumner Warren
224c6a59bf
Bake: support compose ssh config
Signed-off-by: Sumner Warren <sumner.warren@gmail.com>
2024-05-13 08:46:17 -04:00
David Karlsson
7e0ab1a003 docs: remove stub files and update links
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-04-23 13:39:56 +02:00
CrazyMax
df7a3db947
Merge pull request #2384 from Usual-Coder/feature-hcl-index
bake: add `indexof` hcl func
2024-04-11 17:27:21 +02:00
CrazyMax
0a7f5c4d94
bake: test indexof hcl func and make it private
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-04-11 17:11:44 +02:00
Usual Coder
5777d980b5
bake: add indexof hcl func
Signed-off-by: Usual Coder <34403413+Usual-Coder@users.noreply.github.com>
2024-04-11 17:01:53 +02:00
CrazyMax
dc4b4c36bd
bake: load override
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-04-05 13:03:15 +02:00
CrazyMax
4d39259f8e
bake: git auth support for remote definitions
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-04-04 14:12:48 +02:00
CrazyMax
47cf4a5dbe
bake: fix output handling for push
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-03-12 13:13:13 +01:00
CrazyMax
64e2b2532a
bake: ulimits support
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-02-20 11:23:42 +01:00
CrazyMax
c2befc0c12
bake: shm-size support
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-02-20 11:23:42 +01:00
CrazyMax
5130700981
test: revert non-deterministic compose context path
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-01-31 14:15:57 +01:00
CrazyMax
13beda8b11
vendor: update compose-go to v2.0.0-rc.3
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-01-31 14:15:57 +01:00
Tonis Tiigi
9516ce8e25
bake: use same auth provider for bake targets
The results from credential plugins are cached
and this reduces the lookup times.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-11-30 22:44:53 -08:00
Justin Chadwell
d83da63320 bake: fix global target access when using a matrix
Previously, we would fail while trying to use the global "target" field
when using a matrix. The contents of the matrix really don't matter for
this.

What was happening was that we would copy the "target" property into the
child evaluation context, so that when it was updated on the parent, it
wouldn't propagate to the child. The correct behavior here is to avoid
copying variables from the target evaluation context if it is the
root.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-11-02 17:49:58 +00:00
Tõnis Tiigi
deb9dbe9bb
Merge pull request #1062 from crazy-max/bake-fix-attrs
bake: set attribute even if diagnosed as duplicated
2023-10-25 09:31:59 -07:00
CrazyMax
23c2498dee
bake: display read definition files in build output
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-23 16:26:18 +02:00
CrazyMax
c043c9229e
compose: fix deprecated Load func
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-21 08:30:51 +02:00
CrazyMax
dfb557b34f
chore: fix lint issues
G601: Implicit memory aliasing in for loop. (gosec)

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-20 20:07:39 +02:00
CrazyMax
d0d8bfbca4
bake: set attribute even if diagnosed as duplicated
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-20 20:07:38 +02:00
CrazyMax
21e4eb89b2
bake: fork merged bodies interface logic from hcl repo and use it
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-20 20:07:38 +02:00
CrazyMax
7497e6481e
bake: deny access to local dockerfile for remote invocation with local context
we don't currently support reading a remote Dockerfile with a local
context when doing a remote invocation because we automatically derive
the dockerfile from the context atm. To avoid mistakenly reading a local
Dockerfile, we check if the Dockerfile exists locally and if so, we
error out.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-19 17:41:05 +02:00
CrazyMax
de9d253f45
bake: local dockerfile support for remote definition
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-19 17:41:05 +02:00
CrazyMax
503d483731
fix lint issues after update
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-19 12:31:24 +02:00
CrazyMax
561a4330cf
Merge pull request #2065 from dvdksn/update-compose-go
vendor: update compose-go to v1.19.0
2023-10-03 22:26:17 +02:00
CrazyMax
159eac42f3
compose: test with develop section
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-09-30 06:46:51 +02:00
CrazyMax
6c77b76b7b
Merge pull request #2038 from crazy-max/localstate-group
build: support local state group
2023-09-30 06:01:14 +02:00
CrazyMax
3dcb03452c
build: support local state group
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-09-30 01:08:06 +02:00
CrazyMax
9b7d30c9a0
build: opt to set build ref
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-09-30 01:03:00 +02:00
Justin Chadwell
e2ebab5f26 vendor: update buildkit to master@cbfd4023383d
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-09-27 11:06:18 +01:00
Justin Chadwell
0138f2a00f bake: add annotations field
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-09-11 15:31:07 +01:00
Justin Chadwell
de4dbb7d00 chore: reorder target fields
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-08-24 14:01:14 +01:00
CrazyMax
56d55a4137
test: fix non-deterministic compose context path
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-08-23 11:15:50 +02:00
CrazyMax
b01693f63e
bake: test compose include
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-08-04 17:24:30 +02:00
Guillaume Lours
4a059d5144
adapt compose unit tests, build context is now transformed to absolute paths by compose-go
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-08-04 17:23:12 +02:00
Guillaume Lours
f3775c0046
bump compose-go version to v1.17.0 to fix issue with depends_on
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-08-04 17:23:04 +02:00
CrazyMax
05ef20b434
build: set remote bake def and remote dockerfile as internal solve
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-07-19 04:18:28 +02:00
CrazyMax
120f3a8918
bake: ignore profiles in compose definitions
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-06-22 17:44:35 +02:00
Justin Chadwell
431732f5d1 bake: fix incorrect dockerfile resolution against cwd:// context
We need to resolve the strip the cwd:// prefix before attempting to
resolve the dockerfile. Otherwise, we'll get the cwd:// prefix in the
dockerfile name, which isn't stripped out later.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-06-14 12:18:53 +01:00
Justin Chadwell
f5f00e68ef bake(cli): allow passing in-stream using command.Cli
ReadLocalFiles should allow passing the stdin file as an argument, which
allows us to read from dockerCli.Stdin() to be consistent with other
commands in the same package.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-06-09 10:50:53 +01:00
Justin Chadwell
d34103b0d9 bake: fix potential context entitlements escape
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-06-06 17:17:03 +02:00
Justin Chadwell
ef997fd6d0 bake: fix BAKE_CMD_CONTEXT relative path resolution
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-06-06 17:15:19 +02:00
Justin Chadwell
69a9c6609a
Merge pull request #1699 from jedevc/bake-attestation-override 2023-05-25 09:54:34 +01:00