-
Notifications
You must be signed in to change notification settings - Fork 485
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
build: add --annotation shortcut flag #2020
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jedevc
force-pushed
the
build-annotation-flags
branch
2 times, most recently
from
August 24, 2023 13:38
1652e3b
to
e51a785
Compare
7 tasks
tonistiigi
approved these changes
Sep 11, 2023
|
||
func ParseAnnotations(inp []string) (map[exptypes.AnnotationKey]string, error) { | ||
// TODO: use buildkit's annotation parser once it supports setting custom prefix and ":" separator | ||
annotationRegexp := regexp.MustCompile(`^(?:([a-z-]+)(?:\[([A-Za-z0-9_/-]+)\])?:)?(\S+)$`) |
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.
follow up: is it really worth using this crazy regexp instead of simple splits?
Signed-off-by: Justin Chadwell <me@jedevc.com>
Signed-off-by: Justin Chadwell <me@jedevc.com>
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>
Signed-off-by: Justin Chadwell <me@jedevc.com>
jedevc
force-pushed
the
build-annotation-flags
branch
from
September 11, 2023 14:32
e51a785
to
0138f2a
Compare
Rebased. |
This was referenced Oct 24, 2023
nijel
added a commit
to nijel/docker
that referenced
this pull request
Nov 1, 2023
This needs --annotations support in buildx which was introduced in docker/buildx#2020 and will be released in 0.12.0.
nijel
added a commit
to nijel/docker
that referenced
this pull request
Nov 1, 2023
This needs --annotations support in buildx which was introduced in docker/buildx#2020 and will be released in 0.12.0.
5 tasks
nijel
added a commit
to nijel/docker
that referenced
this pull request
Nov 17, 2023
This needs --annotations support in buildx which was introduced in docker/buildx#2020 and will be released in 0.12.0.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1171.
This extracts the same logic for parsing annotations from the imagetools create command (see #1965), and allows the same flags to be attached to the build command. Additionally, we also allow these to be specified in bake's
target.annotations
field - happy to bikeshed exact syntax, I've just thrown something together (or to pull it out to a separate PR if we're not 100% sure).These annotations are then merged into all provided exporters.