mirror of
https://github.com/DerDavidBohl/dirigent-spring.git
synced 2025-12-27 16:10:36 -06:00
minor fixes/improvements in update service
This commit is contained in:
@@ -8,6 +8,7 @@ import org.davidbohl.dirigent.deployments.config.DeploymentsConfigurationProvide
|
||||
import org.davidbohl.dirigent.deployments.events.ImageUpdateAvailableEvent;
|
||||
import org.davidbohl.dirigent.deployments.models.Deployment;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -43,6 +44,7 @@ public class DeploymentUpdateService {
|
||||
}
|
||||
}
|
||||
|
||||
@Async
|
||||
public void checkIfImageUpdatesExistForDeployment(Deployment deployment) {
|
||||
|
||||
DockerClientConfig config = DefaultDockerClientConfig.createDefaultConfigBuilder().build();
|
||||
@@ -96,7 +98,7 @@ public class DeploymentUpdateService {
|
||||
|
||||
String[] parts = imageString.split("/");
|
||||
|
||||
if (parts[0].contains(".") || parts[0].matches(".*:\\d+")) {
|
||||
if (parts.length > 1 && (parts[0].contains(".") || parts[0].matches(".*:\\d+"))) {
|
||||
host = parts[0];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user