Skip to content

Commit 2b04ca6

Browse files
authored
Avoid using autogenerated project name with docker compose plugin (elastic#93015)
The docker-compose plugin uses randomized auto-generated project names for test fixtures. This can cause issues on some platforms where it will generate an invalid identifier. This commit simply configures the plugin to use the gradle project name for docker compose.
1 parent 3fa7842 commit 2b04ca6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/testfixtures/TestFixturesPlugin.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ public void execute(Task task) {
117117
maybeSkipTask(dockerSupport, buildFixture);
118118

119119
ComposeExtension composeExtension = project.getExtensions().getByType(ComposeExtension.class);
120+
composeExtension.setProjectName(project.getName());
120121
composeExtension.getUseComposeFiles().addAll(Collections.singletonList(DOCKER_COMPOSE_YML));
121122
composeExtension.getRemoveContainers().set(true);
122123
composeExtension.getCaptureContainersOutput()

0 commit comments

Comments
 (0)