Attempt to fix :test:fixtures:s3-fixture:composeUp fails due to HTTP connection issue (#1866)
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
This commit is contained in:
parent
4dbf1d268c
commit
c192ecdfec
|
@ -113,7 +113,7 @@ dependencies {
|
|||
api "net.java.dev.jna:jna:5.5.0"
|
||||
api 'com.github.jengelman.gradle.plugins:shadow:6.0.0'
|
||||
api 'de.thetaphi:forbiddenapis:3.0'
|
||||
api 'com.avast.gradle:gradle-docker-compose-plugin:0.12.1'
|
||||
api 'com.avast.gradle:gradle-docker-compose-plugin:0.14.12'
|
||||
api 'org.apache.maven:maven-model:3.6.2'
|
||||
api 'com.networknt:json-schema-validator:1.0.36'
|
||||
api 'com.fasterxml.jackson.core:jackson-databind:2.12.5'
|
||||
|
|
|
@ -155,15 +155,19 @@ public class TestFixturesPlugin implements Plugin<Project> {
|
|||
maybeSkipTask(dockerSupport, buildFixture);
|
||||
|
||||
ComposeExtension composeExtension = project.getExtensions().getByType(ComposeExtension.class);
|
||||
composeExtension.setUseComposeFiles(Collections.singletonList(DOCKER_COMPOSE_YML));
|
||||
composeExtension.setRemoveContainers(true);
|
||||
composeExtension.getUseComposeFiles().set(Collections.singletonList(DOCKER_COMPOSE_YML));
|
||||
composeExtension.getRemoveContainers().set(true);
|
||||
|
||||
// Increase the Docker Compose HTTP timeout to 120 sec (the default is 60)
|
||||
final Integer timeout = ext.has("dockerComposeHttpTimeout") ? (Integer) ext.get("dockerComposeHttpTimeout") : 120;
|
||||
composeExtension.getEnvironment().put("COMPOSE_HTTP_TIMEOUT", timeout);
|
||||
|
||||
Optional<String> dockerCompose = List.of(DOCKER_COMPOSE_BINARIES)
|
||||
.stream()
|
||||
.filter(path -> project.file(path).exists())
|
||||
.findFirst();
|
||||
|
||||
composeExtension.setExecutable(dockerCompose.isPresent() ? dockerCompose.get() : "/usr/bin/docker");
|
||||
composeExtension.getExecutable().set(dockerCompose.isPresent() ? dockerCompose.get() : "/usr/bin/docker");
|
||||
|
||||
tasks.named("composeUp").configure(t -> {
|
||||
// Avoid running docker-compose tasks in parallel in CI due to some issues on certain Linux distributions
|
||||
|
@ -207,7 +211,6 @@ public class TestFixturesPlugin implements Plugin<Project> {
|
|||
(name, host) -> task.getExtensions().getByType(SystemPropertyCommandLineArgumentProvider.class).systemProperty(name, host)
|
||||
);
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
private void maybeSkipTasks(TaskContainer tasks, Provider<DockerSupportService> dockerSupport, Class<? extends DefaultTask> taskClass) {
|
||||
|
|
Loading…
Reference in New Issue