Label image during build #681#684
Label image during build #681#684KostyaSha merged 4 commits intodocker-java:masterfrom cberes:master
Conversation
| */ | ||
| @Override | ||
| public BuildImageCmd withLabel(String key, String value) { | ||
| if (this.labels == null) { |
|
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.
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