1961 Commits

Author SHA1 Message Date
CrazyMax
08a70ecdcc
Merge pull request #2106 from jedevc/fix-bake-matrix-with-target-access
bake: fix global target access when using a matrix
2023-11-06 03:16:09 -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
CrazyMax
639e0bc5ed
Merge pull request #1838 from c-ameron/feat/local-remote-files
command(bake): Specify local and remote bake files
2023-11-02 05:19:40 -07:00
CrazyMax
de1a560f07
Merge pull request #2099 from crazy-max/ci-codeql
ci: enable SAST scanning with CodeQL
2023-10-30 02:23:39 -07:00
CrazyMax
e168fd826c
ci: enable SAST scanning with CodeQL
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-28 08:01:20 +02:00
Tõnis Tiigi
2f1b7a0131
Merge pull request #2098 from crazy-max/annotations-push
build: make annotations work with push flag
v0.12.0-rc1
2023-10-26 09:14:23 -07:00
CrazyMax
f3871b158f
build: make annotations work with push flag
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-26 12:01:10 +02: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
Tõnis Tiigi
6f71ea8904
Merge pull request #2086 from ktock/debug-errormessage
debug: Following-up patches for error messages
2023-10-25 09:27:44 -07:00
CrazyMax
e437f7ba04
Merge pull request #1869 from crazy-max/fix-boot
builder: return error if all nodes fail to boot
2023-10-25 08:12:05 -07:00
Cameron Adams
abfc04f621
command(bake): Specify local and remote bake files
This adds the ability to source additional local build definition files when
sourcing Bake files via a remote url.
Prefixing a file with 'cwd://' will source a bake file on the local
machine, instead of the remote location.
Local files will be read/have precedence before remote files.

Usage:
```
docker buildx bake https://github.com/example/upstream.git --file cwd://docker-bake.override.hcl --print
```
This will source a default file from the example/upstream repository,
and also source a build definition from the local machine.

Also moves remote and local files reading logic to a func

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: Cameron Adams <pnzreba@gmail.com>
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-24 19:37:04 +02:00
CrazyMax
612dfdd813
builder: return error if all nodes fail to boot
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-24 10:59:04 +02:00
CrazyMax
ee19ce5ef2
Merge pull request #2076 from crazy-max/bake-display-files
bake: display read definition files in build output
2023-10-24 01:56:05 -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
390eedc50b
Merge pull request #2096 from jedevc/vendor-buildkit
vendor: update buildkit to master@d5c1d785b042
2023-10-23 07:14:42 -07:00
Justin Chadwell
adc839aa40 vendor: update buildkit to master@d5c1d785b042
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-10-23 14:48:50 +01:00
CrazyMax
7838ade9f3
Merge pull request #2094 from crazy-max/update-compose
vendor: update compose-go to v1.20.0
2023-10-23 01:40:04 -07: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
05a0fdf744
vendor: update compose-go to v1.20.0
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-21 08:29:01 +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
Kohei Tokunaga
14834e6085
debug: print error message on monitor instead of processes pkg
This can catch and print more errors on monitor side not only process-related
errors.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-10-20 14:09:32 +09:00
Kohei Tokunaga
267e30a19c
debug: monitor: return last build result
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-10-20 14:09:28 +09:00
Tõnis Tiigi
be4fd7110d
Merge pull request #2089 from dvdksn/docs-bakefile-lookup-order
docs: clarify bake file lookup order and merge
2023-10-19 09:22:29 -07:00
Tõnis Tiigi
24668122d9
Merge pull request #2088 from crazy-max/update-hcl
vendor: update hcl dependencies
2023-10-19 09:19:07 -07:00
Tõnis Tiigi
31d021a9ca
Merge pull request #2015 from crazy-max/fix-bake-cwd-dockerfile
bake: local dockerfile support for remote definition
2023-10-19 09:18:20 -07: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
David Karlsson
f4f511201b docs: clarify bake file lookup order and merge
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-10-19 16:05:30 +02:00
CrazyMax
beca8b6adf
vendor: update github.com/zclconf/go-cty to v1.14.1
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-19 14:52:01 +02:00
CrazyMax
457dc402d3
vendor: update github.com/hashicorp/go-cty-funcs to a090f58aa992
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-19 14:50:44 +02:00
CrazyMax
34b9a629a0
vendor: update github.com/hashicorp/hcl/v2 to v2.19.1
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-19 14:49:10 +02:00
CrazyMax
ad674e2666
Merge pull request #2084 from crazy-max/go-1.21
update to go 1.21.3
2023-10-19 03:55:10 -07: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
6e5aefbb98
update golangci-lint to 1.54.2
also update config to show all issues at once and
set same exlucde rules as buildkit ones.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-19 12:24:16 +02:00
Tõnis Tiigi
7d2c9d5ef5
Merge pull request #2078 from crazy-max/fix-rm-state-group
build: fix racy localstate group removal
2023-10-18 16:54:21 -07:00
CrazyMax
1734abbb76
build: fix racy localstate group removal
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-18 19:12:46 +02:00
Kohei Tokunaga
b06a55cf53
debug: do not print error when error is nil
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-10-18 12:20:17 +09:00
Kohei Tokunaga
38137b29dd
debug: reload: print error message
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-10-18 11:25:24 +09:00
CrazyMax
fc7144f61d
update to go 1.21.3
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-18 03:21:44 +02:00
Tõnis Tiigi
ac93a7fbfb
Merge pull request #2006 from ktock/debug-command
debug: Add `buildx debug` command
2023-10-17 18:20:33 -07:00
CrazyMax
48f9b86b9a
Merge pull request #2083 from crazy-max/test-host-gateway
test: docker host-gateway
2023-10-17 04:59:55 -07:00
CrazyMax
6c32a8c4c1
test: docker host-gateway
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-17 12:57:46 +02:00
CrazyMax
7a08248c4e
Merge pull request #2082 from dvdksn/fix-docs-upstream-ci
ci: update docs upstream validation workflow
2023-10-16 16:39:05 -07:00
CrazyMax
05af608774
Merge pull request #2018 from crazy-max/driver-client-meta
driver(docker): opt to set additional dial meta to the client
2023-10-16 16:14:34 -07:00
CrazyMax
511e41386f
driver(docker): opt to set additional dial meta to the client
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-17 01:01:17 +02:00
CrazyMax
fd251d2a7b
builder: use variadic options in LoadNodes func
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-17 00:45:50 +02:00
CrazyMax
5836c24e7d
driver: move Features and HostGatewayIP to specific driver
Adds a new HostGatewayIP entry in the Driver interface so we can
move Features and HostGatewayIP handling with cache to the very
specific driver (docker).

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-17 00:45:50 +02:00
David Karlsson
c8f8a106ed ci: update docs upstream validation workflow
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-10-16 20:42:47 +02:00