[TEST] Use Docker Compose v2 for TestFixturePlugin (#120214) (#120253)

Upgrading from using V1 to be able to run on CI machines which
`docker-compose` command use some detached version which doesn't work
nicely with gradle-docker-compose-plugin.
This commit is contained in:
Mariusz Józala 2025-01-16 08:31:11 +01:00 committed by GitHub
parent 0d6eec8688
commit dbbcc53fe0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -122,7 +122,7 @@ public class TestFixturesPlugin implements Plugin<Project> {
composeExtension.getRemoveContainers().set(true); composeExtension.getRemoveContainers().set(true);
composeExtension.getCaptureContainersOutput() composeExtension.getCaptureContainersOutput()
.set(EnumSet.of(LogLevel.INFO, LogLevel.DEBUG).contains(project.getGradle().getStartParameter().getLogLevel())); .set(EnumSet.of(LogLevel.INFO, LogLevel.DEBUG).contains(project.getGradle().getStartParameter().getLogLevel()));
composeExtension.getUseDockerComposeV2().set(false); composeExtension.getUseDockerComposeV2().set(true);
composeExtension.getExecutable().set(this.providerFactory.provider(() -> { composeExtension.getExecutable().set(this.providerFactory.provider(() -> {
String composePath = dockerSupport.get().getDockerAvailability().dockerComposePath(); String composePath = dockerSupport.get().getDockerAvailability().dockerComposePath();
LOGGER.debug("Docker Compose path: {}", composePath); LOGGER.debug("Docker Compose path: {}", composePath);