Skip to content

Commit

Permalink
Don't ignore invalid config in quarkus.container-image.name
Browse files Browse the repository at this point in the history
Fixes: #33552
  • Loading branch information
geoand committed May 23, 2023
1 parent 60a73e1 commit 9129a4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class ContainerImageConfig {
*/
@ConfigItem(defaultValue = "${quarkus.application.name:unset}")
@ConvertWith(TrimmedStringConverter.class)
public Optional<String> name;
public String name;

/**
* The tag of the container image. If not set defaults to the application version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ public void publishImageInfo(ApplicationInfoBuildItem app,
}

String effectiveName = containerImageCustomName.map(ContainerImageCustomNameBuildItem::getName)
.or(() -> containerImageConfig.name)
.orElse(app.getName());
.orElse(containerImageConfig.name);
String repository = (containerImageConfig.getEffectiveGroup().map(s -> s + "/").orElse("")) + effectiveName;
if (!ImageReference.isValidRepository(repository)) {
throw new IllegalArgumentException("The supplied combination of container-image group '"
Expand Down

0 comments on commit 9129a4d

Please sign in to comment.