Skip to content

Commit

Permalink
Merge pull request #26624 from sombraglez/24308_apicurio_registry_mem…
Browse files Browse the repository at this point in the history
…_image

Improve container image repository checks for some dev services
  • Loading branch information
Ladicek committed Jul 12, 2022
2 parents fe8bca7 + d0e1915 commit 4204005
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
Expand Up @@ -29,6 +29,7 @@ public class ApicurioRegistryDevServicesBuildTimeConfig {
/**
* The Apicurio Registry image to use.
* Note that only Apicurio Registry 2.x images are supported.
* Specifically, the image repository must end with {@code apicurio/apicurio-registry-mem}.
*/
@ConfigItem(defaultValue = "quay.io/apicurio/apicurio-registry-mem:2.2.3.Final")
public String imageName;
Expand Down
Expand Up @@ -259,7 +259,7 @@ private ApicurioRegistryContainer(DockerImageName dockerImageName, int fixedExpo
withLabel(DEV_SERVICE_LABEL, serviceName);
}
withEnv("QUARKUS_PROFILE", "prod");
if (!dockerImageName.getRepository().equals("apicurio/apicurio-registry-mem")) {
if (!dockerImageName.getRepository().endsWith("apicurio/apicurio-registry-mem")) {
throw new IllegalArgumentException("Only apicurio/apicurio-registry-mem images are supported");
}
}
Expand Down
Expand Up @@ -27,7 +27,8 @@ public class AmqpDevServicesBuildTimeConfig {

/**
* The image to use.
* Note that only {@code quay.io/artemiscloud/activemq-artemis-broker} images are supported.
* Note that only ActiveMQ Artemis images are supported.
* Specifically, the image repository must end with {@code artemiscloud/activemq-artemis-broker}.
*
* Check https://quay.io/repository/artemiscloud/activemq-artemis-broker to find the available versions.
*/
Expand Down
Expand Up @@ -282,7 +282,7 @@ private ArtemisContainer(DockerImageName dockerImageName, String extra, int fixe
if (serviceName != null) { // Only adds the label in dev mode.
withLabel(DEV_SERVICE_LABEL, serviceName);
}
if (dockerImageName.getRepository().equals("artemiscloud/activemq-artemis-broker")) {
if (dockerImageName.getRepository().endsWith("artemiscloud/activemq-artemis-broker")) {
waitingFor(Wait.forLogMessage(".*AMQ241004.*", 1)); // Artemis console available.
} else {
throw new IllegalArgumentException("Only artemiscloud/activemq-artemis-broker images are supported");
Expand Down
Expand Up @@ -122,6 +122,8 @@ public static class Binding {

/**
* The image to use.
* Note that only official RabbitMQ images are supported.
* Specifically, the image repository must end with {@code rabbitmq}.
*/
@ConfigItem(defaultValue = "rabbitmq:3.9-management")
public String imageName;
Expand Down
Expand Up @@ -374,7 +374,7 @@ private ConfiguredRabbitMQContainer(DockerImageName dockerImageName, int fixedEx
if (serviceName != null) { // Only adds the label in dev mode.
withLabel(DEV_SERVICE_LABEL, serviceName);
}
if (!dockerImageName.getRepository().equals("rabbitmq")) {
if (!dockerImageName.getRepository().endsWith("rabbitmq")) {
throw new IllegalArgumentException("Only official rabbitmq images are supported");
}
}
Expand Down

0 comments on commit 4204005

Please sign in to comment.