1604 Commits

Author SHA1 Message Date
Tõnis Tiigi
4fa7cd1fc2
Merge pull request #1772 from tonistiigi/container-hang-fix
container-driver: avoid hanging on container panic
2023-05-09 10:27:11 -07:00
Justin Chadwell
12b6a3ad9a bake: copy remote context contents to root
When resolving remote contexts locally in bake, then we need to ensure
that we properly unpack the contents of that context to the root
directory, instead of leaving it in the subdirectory.

Otherwise, any files will be found in the wrong location. Along with
this change, we also need a change to the dockerfile location lookup to
ensure that it is found at the root instead of in the subdirectory.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-05-09 17:19:26 +01:00
Justin Chadwell
22e1901581 bake: reorganize input creation together
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-05-09 17:15:44 +01:00
Justin Chadwell
e23c37fa96
Merge pull request #1771 from jedevc/unset-other-build-client-opt
debug: secondary client build should not reuse solve opts
2023-05-09 14:57:23 +01:00
Justin Chadwell
e5a0ed1149 debug: secondary client build should not reuse solve opt ref
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-05-09 14:23:41 +01:00
Justin Chadwell
c9c1303e31
Merge pull request #1777 from ktock/fixerrormsg
monitor: improve error messages
2023-05-09 13:49:07 +01:00
Justin Chadwell
ae3299d9d4
Merge pull request #1628 from cpuguy83/policy_file
Support for passing through raw buildkit policies
2023-05-09 11:50:10 +01:00
CrazyMax
a948cc14c5
Merge pull request #1769 from docker/dependabot/github_actions/peter-evans/create-pull-request-5.0.1
build(deps): Bump peter-evans/create-pull-request from 5.0.0 to 5.0.1
2023-05-09 11:41:08 +02:00
CrazyMax
621b07c799
Merge pull request #1727 from crazy-max/cmd-completion
cli: add shell completion
2023-05-09 10:59:32 +02:00
Justin Chadwell
7ad970f93a
Merge pull request #1776 from tonistiigi/fix-conn-leak
docker: fix connection leak on features check
2023-05-09 09:52:18 +01:00
Kohei Tokunaga
437fe55104
monitor: improve error messages
Print more understandable messages on error:

- When ps fails because the monitor doesn't attach to any session, print "no
  attaching session" instead of "unknown ref".
- Avoid disconnect silently fails when the monitor doesn't attach to any
  session. Print "no attaching session" error instead.
- Fix error message of "attach"'s arguments. ("server name must be passed" ->
  "ID of session or process must be passed")

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-05-08 15:42:37 +09:00
Tonis Tiigi
bebd244e33
docker: fix connection leak on features check
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-05-07 21:58:19 -07:00
Tonis Tiigi
9f2143e3df
container-driver: avoid hanging on container panic
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-05-03 17:11:08 -07:00
Brian Goff
98efe7af10 Support for passing through raw buildkit policies
This adds an env var which can be used to pass in a path to a file to
read a buildkit source poliy from.

This is applied to any build is executed with the env set.
It is also applied to bakes (which are calling build behind the scenes).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2023-05-03 23:07:44 +00:00
Justin Chadwell
c7c37c3591
Merge pull request #1760 from ktock/monitor-commands
monitor: Move commands to a separated package
2023-05-03 14:33:08 +01:00
Justin Chadwell
a43837d26c
monitor: extend monitor interface from controller
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-05-03 22:08:30 +09:00
dependabot[bot]
f115abb509
build(deps): Bump peter-evans/create-pull-request from 5.0.0 to 5.0.1
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](5b4a9f6a9e...284f54f989)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-02 18:59:56 +00:00
Justin Chadwell
43a07f3997
Merge pull request #1597 from robertlestak/k8s-sa
kubernetes driver: add serviceaccount opt
2023-05-02 12:56:07 +01:00
CrazyMax
41e1693be0
Merge pull request #1756 from crazy-max/fix-bin-image
ci: fix bin-image job
2023-04-27 12:20:16 +02:00
Justin Chadwell
9d5af461b2
Merge pull request #1755 from jedevc/move-across-controller-boundary
Move metadata and subrequest output outside of controller
2023-04-27 11:15:54 +01:00
CrazyMax
b38c9c7db4
Merge pull request #1759 from crazy-max/bump-gomod
bump go.mod to 1.20
2023-04-27 09:00:31 +02:00
Kohei Tokunaga
9f884edbbf
monitor: use shlex
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-04-27 11:36:38 +09:00
Kohei Tokunaga
0a7a2b1882
monitor: Move commands to a separated package
This commit moves monitor commands to `monior/commands` package.
Commands still need access to the `monitor` object and buildx controller so this
commit enables this via `Monitor` interface stored in `monitor/types`.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-04-27 11:36:35 +09:00
Justin Chadwell
6bec8f6e00 docs: add serviceaccount driver-opt for k8s driver
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-04-26 16:44:03 +01:00
robertlestak
65037e4611 kubernetes driver: add serviceaccount opt
Signed-off-by: robertlestak <robert.lestak@umusic.com>
2023-04-26 16:40:07 +01:00
Justin Chadwell
ba92989a94 controller: print result outside of controller
This will allow result printing to work with the remote controller
(though this currently causes a panic, to be fixed in a follow-up).

Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-04-26 16:34:36 +01:00
Justin Chadwell
2bf996d9ad controller: don't write metadata file in controller
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-04-26 16:34:36 +01:00
Justin Chadwell
75ed3e296b
Merge pull request #1737 from jedevc/improved-controller-progress
controller: refactor progress api
2023-04-26 10:17:00 +01:00
CrazyMax
e14e0521cf
Merge pull request #1732 from milas/builder-init-panic
builder: extra init error handling
2023-04-26 09:23:01 +02:00
Tõnis Tiigi
28e6995f7c
Merge pull request #1735 from tonistiigi/localstate
build: support for saving local state by build ref
2023-04-25 15:17:08 -07:00
CrazyMax
8f72fb353c
bump go.mod to 1.20
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-04-25 21:45:40 +02:00
Milas Bowman
14f5d490ef builder: extra init error handling
* Return errors from creating the `NodeGroup`
* Ensure that `b.NodeGroup != nil` before reading from
  it during validation

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-04-25 11:32:54 -04:00
CrazyMax
c9095e8eab
ci: fix bin-image job
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-04-24 13:39:00 +02:00
CrazyMax
0589f69206
build: null values support with bake
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-04-24 12:05:04 +02:00
David Karlsson
b724a173a9
build: fix JSON formatting for --print
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-04-24 12:05:04 +02:00
David Karlsson
e5ccb64617
fix: changed attest type from Map to List
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-04-24 12:05:04 +02:00
David Karlsson
08d114195f
chore: format with prettier
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-04-24 12:05:04 +02:00
David Karlsson
caf7d2ec9b
build: added attest field
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-04-24 12:05:03 +02:00
David Karlsson
2dffed3f3a
build: sort bake fields alphabetically
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-04-24 12:05:03 +02:00
Justin Chadwell
784dc2223d
lint: add empty line between console and json code blocks
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-04-24 12:05:03 +02:00
CrazyMax
c3fd1e8b79
build: fix links and formatting
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-04-24 12:05:03 +02:00
CrazyMax
6f0c550ee9
build: move bake under the build section
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-04-24 12:05:03 +02:00
CrazyMax
5d551dbbc1
build: customizing builds section
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-04-24 12:05:03 +02:00
CrazyMax
043cb3a0db
build: add bake section
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-04-24 12:05:02 +02:00
Justin Chadwell
16d5b38f2b debug: display build warnings after each build
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-04-24 09:58:02 +01:00
Nick Sieger
956a1be656
vendor: update to compose-go 1.13.4
Signed-off-by: Nick Sieger <nick@nicksieger.com>
2023-04-21 11:29:20 -05:00
Justin Chadwell
afcaa8df5f
Merge pull request #1752 from nicksieger/compose-go-default-filenames
bake: use default filenames from compose-go
2023-04-21 17:28:32 +01:00
Nick Sieger
12885c01ad
bake: use default filenames from compose-go
Signed-off-by: Nick Sieger <nick@nicksieger.com>
2023-04-21 11:11:37 -05:00
Justin Chadwell
2ab8749052 controller: replace logrus status messages with progress messages
logrus info messages aren't particularly in-theme with the rest of the
progress output (and are also frustratingly racy). The progress output
is a lot neater, so we refactor it into that.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-04-21 12:33:04 +01:00
Justin Chadwell
e826141af4 controller: refactor progress api
Refactor the progress printer creation to the caller-side of the
controller api. Then, instead of passing around status channels (and
progressMode strings), we can simply pass around the higher level
interface progress.Writer.

This has a couple of benefits:
- A simplified interface to the controller
- Allows us to correctly extract warnings out of the controller, so that
  they can be displayed correctly from the client side.

Some extra work is required to make sure that we can pass a
progress.Printer into the debug monitor. If we want to keep it
persistent, then we need a way to temporarily suspend output from it,
otherwise it will continue printing as the monitor is prompting for
input from the user, and forwarding output from debug containers.

To handle this, we add two methods to the printer, `Pause` and
`Unpause`. `Pause` acts similarly to `Wait`, closing the printer, and
cleanly shutting down the display - however, the printer does not
terminate, and can later be resumed by a call to `Unpause`. This
provides a neater interface to the caller, instead of needing to
continually reconstruct printers for every single time we want to
produce progress output.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-04-21 11:17:43 +01:00