CrazyMax
1383aa30c1
lint: modernize fix
...
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-13 20:44:57 +02:00
CrazyMax
03f9877429
Merge pull request #3181 from crazy-max/golangci-lint-v2
...
update golangci-lint to v2.1.5
2025-05-13 17:17:17 +02:00
CrazyMax
b606e2f6bb
update golangci-lint to v2.1.5
...
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-13 16:54:43 +02:00
CrazyMax
72fde4c53a
history: copy update
...
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-13 12:20:00 +02:00
Tonis Tiigi
d5d3d3d502
lint: apply x/tools/modernize fixes
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-03-07 16:37:24 -08:00
Tonis Tiigi
e7a53fb829
lint: enable forbidigo context rules
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-11-19 18:27:25 -08:00
Tonis Tiigi
c0fd64f4f8
lint: enable linters from buildkit
...
Skipping errname and testifylint
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-11-19 17:51:24 -08:00
CrazyMax
cc286e2ef5
cli: error out on unknown command
...
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-10-18 14:04:16 +02:00
Eli Treuherz
3971361ed2
Pass in index annotations from builds on multiple nodes
...
Fixes #2540
Signed-off-by: Eli Treuherz <et@arenko.group>
2024-06-27 13:26:07 +01:00
David Karlsson
1e3aec1ae2
docs: mention rawjson progress output mode
...
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-06-06 16:51:42 +02:00
Tim Smith
abf6c77d91
Add a --prefer-index flag that allows you to specify the preferred behavior when deciding on how to create an image/manifest from a single source.
...
Signed-off-by: Tim Smith <tismith@rvohealth.com>
2024-05-29 14:07:28 -04:00
Tonis Tiigi
147c7135b0
simplify signal handling for cobra context
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-01-19 17:18:42 -08:00
Laura Brehm
650a7af0ae
cobra/commands: cancel command context on signal
...
See https://github.com/docker/cli/pull/4599 and
https://github.com/docker/cli/pull/4769 .
Since we switched to using the cobra command context instead of
`appcontext`, we need to set up the signal handling that was being
provided by `appcontext`, as well as configuring the context with
the OTEL tracing utilities also used by `appcontext`.
This commit introduces `cobrautil.ConfigureContext` which implements
the pre-existing signal handling logic from `appcontext` and cancels
the command's context when a signal is received, as well as doing
the relevant OTEL config.
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-01-19 16:30:52 -08:00
Laura Brehm
4f738020fd
deps: remove `appcontext`, use `cmd.Context`
...
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-01-19 16:29:12 -08: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
a59058e8a5
build: add --annotation shortcut flag
...
This extracts the same logic for parsing annotations from the imagetools
create command, and allows the same flags to be attached to the build
command.
These annotations are then merged into all provided exporters.
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-09-11 15:31:04 +01:00
Sebastiaan van Stijn
bafdc63b8c
migrate to github.com/distribution/reference v0.5.0
...
The "reference" package was moved to a separate module, which was extracted
from b9b19409cf
Also update compose-go, which also switched to distribution/reference;
full diff: https://github.com/compose-spec/compose-go/compare/v1.18.3...v1.18.4
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-06 17:41:35 +02:00
Qasim Sarfraz
18894a8e3a
allow annotations for OCI image index
...
Signed-off-by: Qasim Sarfraz <qasimsarfraz@microsoft.com>
2023-08-03 12:08:04 +02:00
CrazyMax
8a02cf8717
cli: set default completion
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-04-11 11:32:48 +02:00
CrazyMax
e7b5ee7518
mutualize builder logic
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-06 12:13:41 +01:00
CrazyMax
4788eb24ab
imagetools: set default repo ref on creation if nil
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-11-30 23:18:43 +01:00
Justin Chadwell
a50e89c38e
progress: explicitly fail if tty requested but not available
...
The NewPrinter function is mostly borrowed from buildkit. However, at
some point, it seems that the implementations drifted.
This patch updates buildx to be more similar in behavior to it's
buildkit counterpart, specifically, it will explicitly fail if a TTY
output is requested using "--progress=tty", but the output is not
available.
To gracefully fallback to plain progress in this scenario,
"--progress=plain" is required.
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-10-25 10:55:36 +01:00
Justin Chadwell
4ecca34a42
imagetools: give imagetools create a progress bar
...
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-07-29 14:29:27 +01:00
Justin Chadwell
37ca8631f9
imagetools: copy manifests between repositories
...
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-07-29 14:29:05 +01:00
Justin Chadwell
d3412f1039
imagetools: refactor combining repository logic
...
This patch modifies the existing combining code in imagetools create to
provide better support for multiple repositories down the road.
Specifically, the code should no longer rely on a single repository
being used for all sources and tags, and should resolve descriptors in
their relevant repositories.
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-07-29 14:21:27 +01:00
Justin Chadwell
04b44b3a89
imagetools: respect --builder flag
...
The --builder flag was being ignored by imagetools because of pointer
problems. Essentially, because the root cmds aren't parsed immediately,
we need to pass a pointer to the builder string so that it can be
updated before the RunE function gets called.
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-04-13 14:36:48 +01:00
Sebastiaan van Stijn
fc7ba75fd7
Remove uses of deprecated io/ioutil
...
The package has been deprecated since Go 1.16: https://go.dev/doc/go1.16#ioutil
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-10 01:46:06 +01:00
CrazyMax
20a55e9184
imagetools inspect: multi-platform support
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-25 20:30:08 +01:00
CrazyMax
6c56109083
imagetools inspect: add --format flag
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-25 17:55:34 +01:00
CrazyMax
eab0e6a8fe
cli: fix builder persistent flag
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-11-04 18:52:17 +01:00
Tonis Tiigi
88d0775692
refactor accessing registry configs via drivers
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-11-04 10:01:23 -07:00
Tonis Tiigi
328441cdc6
imagetools: fix merging JSON descriptor with old one
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-04-09 11:02:16 -07:00
Sebastiaan van Stijn
e1bbb9d8de
imagetools inspect: don't discard errors from PrintManifestList
...
Looks like this function may return an error, which we currently discard.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-24 15:54:32 +01:00
Tonis Tiigi
dba79ba223
update lint to go1.16/golangci
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-02-16 23:43:06 -08:00
Tonis Tiigi
eb1aabe9e3
imagetools: avoid printing newline on raw mode
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-10-28 16:14:35 -07:00
Tonis Tiigi
94a0422a1b
rename to docker/buildx
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-24 20:02:20 -07:00
Tonis Tiigi
96b1892b63
imagetools: push support for create
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-23 21:18:40 -07:00
Tonis Tiigi
80ad78e372
imagetools: add create support
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-23 21:18:40 -07:00
Tonis Tiigi
0a28ec6f38
imagetools: implement inspect for manifest list
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-16 15:41:40 -07:00
Tonis Tiigi
a0719aee88
commands: imagetools stubs
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-16 15:41:35 -07:00