Skip to content

Commit

Permalink
Merge pull request #31937 from geoand/jib-deprecated-labels
Browse files Browse the repository at this point in the history
Remove long deprecated jib property
  • Loading branch information
geoand authored Mar 17, 2023
2 parents 263692b + e8f83dd commit ba81297
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 ba81297

Please sign in to comment.