-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Label image during build #681 #684
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
Conversation
| */ | ||
| @Override | ||
| public BuildImageCmd withLabel(String key, String value) { | ||
| if (this.labels == null) { |
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.
this unneeded
|
Review status: 0 of 7 files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. src/main/java/com/github/dockerjava/core/command/BuildImageCmdImpl.java, line 318 [r1] (raw file):
|
|
src/main/java/com/github/dockerjava/core/command/BuildImageCmdImpl.java, line 318 [r1] (raw file):
|
| /** | ||
| *@since {@link RemoteApiVersion#VERSION_1_23} | ||
| */ | ||
| BuildImageCmd withLabel(String key, String value); |
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.
Why only one label? withLabels(Map<String, String>)
|
I followed the same pattern as withBuildArg(String, String). So withLabel(String, String) can be called multiple times to add multiple labels. But I will change the method to accept a map if you prefer that. Or have both withLabels(Map) and withLabel(String, String)? |
|
I prefer raw data type as docker-java atm is simple layer to API. Your method should be |
|
ok, I changed |
|
rebuilding PR as too much matrix configuration builds failed... |
|
Looks fine. |
* Ability to set labels on image build (docker-java#681) * Check API version in new tests (docker-java#681) * remove unnecessary this (docker-java#681) * change withLabel to withLabels (docker-java#681)
Fixes #681
This change is