-
Notifications
You must be signed in to change notification settings - Fork 499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bake: replace --list-targets and --list-variables flags with --list flag #2900
base: master
Are you sure you want to change the base?
Conversation
type targetList struct { | ||
Name string `json:"name"` | ||
Description string `json:"description,omitempty"` | ||
Group bool `json:"group,omitempty"` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was wondering if instead it would have been better to use groups
and targets
field:
$ docker buildx bake --list=type=targets,format=json
#1 [internal] load local bake definitions
#1 reading docker-bake.hcl 4.97kB / 4.97kB done
#1 DONE 0.0s
{
"groups": [
{
"name": "default",
"targets": ["binaries"]
},
{
"name": "validate",
"targets": ["lint", "lint-gopls", "validate-docs", "validate-golangci", "validate-vendor"]
}
],
"targets": [
{
"name": "binaries"
},
{
"name": "binaries-cross"
},
{
"name": "govulncheck"
},
{
"name": "image"
},
{
"name": "image-cross"
},
{
"name": "image-local"
},
{
"name": "integration-test"
},
{
"name": "integration-test-base"
},
{
"name": "lint"
},
{
"name": "lint-gopls"
},
{
"name": "meta-helper"
},
{
"name": "mod-outdated"
},
{
"name": "release"
},
{
"name": "test"
},
{
"name": "update-authors"
},
{
"name": "update-docs"
},
{
"name": "update-generated-files"
},
{
"name": "update-vendor"
},
{
"name": "validate-authors"
},
{
"name": "validate-docs"
},
{
"name": "validate-generated-files"
},
{
"name": "validate-golangci",
"description": "Validate .golangci.yml schema (does not run Go linter)"
},
{
"name": "validate-vendor"
}
]
}
It's a bit inconsistent with table
format but more readable imo.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about completely separating this, but in JSON view I think separate fields for description and subtargets would make sense.
c75832d
to
0bf2746
Compare
also put this flag out of experimental Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
0bf2746
to
11c85b2
Compare
follow-up #2556 (review)
--list-targets
and--list-variables
flags with--list
flag and put it out of experimental.--print
and--list
are now mutually exclusive.json
format support for--list
flag.