Skip to content

Commit

Permalink
Merge pull request #28198 from gsmet/compatible-images
Browse files Browse the repository at this point in the history
Dev Services - Mark configured images as compatible with default ones
  • Loading branch information
yrodiere authored Sep 27, 2022
2 parents 6234358 + cf81292 commit 5cf63af
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ private DevServicesResultBuildItem.RunningDevService startElasticsearch(
throw new BuildException("Dev services for Elasticsearch didn't support Opensearch", Collections.emptyList());
}

// Hibernate search Elasticsearch have a version configuration property, we need to check that it is coherent
// Hibernate Search Elasticsearch have a version configuration property, we need to check that it is coherent
// with the image we are about to launch
if (buildItemConfig.version != null) {
String containerTag = config.imageName.substring(config.imageName.indexOf(':') + 1);
Expand All @@ -197,7 +197,7 @@ private DevServicesResultBuildItem.RunningDevService startElasticsearch(
// Starting the server
final Supplier<DevServicesResultBuildItem.RunningDevService> defaultElasticsearchSupplier = () -> {
ElasticsearchContainer container = new ElasticsearchContainer(
DockerImageName.parse(config.imageName));
DockerImageName.parse(config.imageName).asCompatibleSubstituteFor("elasticsearch/elasticsearch"));
ConfigureUtil.configureSharedNetwork(container, "elasticsearch");
if (config.serviceName != null) {
container.withLabel(DEV_SERVICE_LABEL, config.serviceName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private RunningDevService startKafka(DockerStatusBuildItem dockerStatusBuildItem
KAFKA_BOOTSTRAP_SERVERS, container.getBootstrapServers());
} else {
RedPandaKafkaContainer container = new RedPandaKafkaContainer(
DockerImageName.parse(config.imageName),
DockerImageName.parse(config.imageName).asCompatibleSubstituteFor("vectorized/redpanda"),
config.fixedExposedPort,
launchMode.getLaunchMode() == LaunchMode.DEVELOPMENT ? config.serviceName : null,
useSharedNetwork, config.redpanda);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ private RunningDevService startApicurioRegistry(DockerStatusBuildItem dockerStat
getRegistryUrlConfigs("http://" + address.getUrl())))
.orElseGet(() -> {
ApicurioRegistryContainer container = new ApicurioRegistryContainer(
DockerImageName.parse(config.imageName), config.fixedExposedPort,
DockerImageName.parse(config.imageName).asCompatibleSubstituteFor("apicurio/apicurio-registry-mem"),
config.fixedExposedPort,
launchMode.getLaunchMode() == LaunchMode.DEVELOPMENT ? config.serviceName : null,
useSharedNetwork);
timeout.ifPresent(container::withStartupTimeout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ private RunningDevService startAmqpBroker(DockerStatusBuildItem dockerStatusBuil
final Supplier<RunningDevService> defaultAmqpBrokerSupplier = () -> {
// Starting the broker
ArtemisContainer container = new ArtemisContainer(
DockerImageName.parse(config.imageName),
DockerImageName.parse(config.imageName).asCompatibleSubstituteFor("artemiscloud/activemq-artemis-broker"),
config.extra,
config.fixedExposedPort,
launchMode.getLaunchMode() == LaunchMode.DEVELOPMENT ? config.serviceName : null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ private RunningDevService startRabbitMQBroker(DockerStatusBuildItem dockerStatus
}

ConfiguredRabbitMQContainer container = new ConfiguredRabbitMQContainer(
DockerImageName.parse(config.imageName),
DockerImageName.parse(config.imageName).asCompatibleSubstituteFor("rabbitmq"),
config.fixedExposedPort,
config.fixedExposedHttpPort,
launchMode.getLaunchMode() == LaunchMode.DEVELOPMENT ? config.serviceName : null);
Expand Down

0 comments on commit 5cf63af

Please sign in to comment.