Skip to content

Commit

Permalink
Remove long deprecated jib property
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Mar 17, 2023
1 parent 7fe54ed commit e8f83dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,6 @@ public class JibConfig {
@ConfigItem
public Map<String, String> environmentVariables;

/**
* Custom labels to add to the generated image
*
* @deprecated Use 'quarkus.container-image.labels' instead
*/
@ConfigItem
@Deprecated
public Map<String, String> labels;

/**
* The username to use to authenticate with the registry used to pull the base JVM image
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -787,12 +787,11 @@ private void handleExtraFiles(OutputTargetBuildItem outputTarget, JibContainerBu

private Map<String, String> allLabels(JibConfig jibConfig, ContainerImageConfig containerImageConfig,
List<ContainerImageLabelBuildItem> containerImageLabels) {
if (jibConfig.labels.isEmpty() && containerImageLabels.isEmpty() && containerImageConfig.labels.isEmpty()) {
if (containerImageLabels.isEmpty() && containerImageConfig.labels.isEmpty()) {
return Collections.emptyMap();
}

final Map<String, String> allLabels = new HashMap<>(jibConfig.labels);
allLabels.putAll(containerImageConfig.labels);
final Map<String, String> allLabels = new HashMap<>(containerImageConfig.labels);
for (ContainerImageLabelBuildItem containerImageLabel : containerImageLabels) {
// we want the user supplied labels to take precedence so the user can override labels generated from other extensions if desired
allLabels.putIfAbsent(containerImageLabel.getName(), containerImageLabel.getValue());
Expand Down

0 comments on commit e8f83dd

Please sign in to comment.