Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ abstract class ComposeSettings {
r.waitForHealthyStateTimeout.set(waitForHealthyStateTimeout.get())
r.checkContainersRunning.set(checkContainersRunning.get())

r.captureContainersOutput.set(captureContainersOutput.get())
r.captureContainersOutput.set(this.captureContainersOutput.get())
r.captureContainersOutputToFile.set(this.captureContainersOutputToFile.getOrNull())
r.captureContainersOutputToFiles.set(this.captureContainersOutputToFiles.getOrNull())
r.composeLogToFile.set(this.composeLogToFile.getOrNull())
r.containerLogToDir.set(this.containerLogToDir.getOrNull())

r.projectNamePrefix = this.projectNamePrefix

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,22 @@ class DockerComposePluginTest extends Specification {
project.dockerCompose.nested.ignorePushFailure.get() == true
}

def "configuration of log capturing is propagated to nested settings"() {
def project = ProjectBuilder.builder().build()
when:
project.plugins.apply 'docker-compose'
project.dockerCompose {
captureContainersOutput = true
captureContainersOutputToFiles = project.file('/path/to/directory')
nested {
useComposeFiles = ['test.yml']
}
}
then:
project.dockerCompose.nested.captureContainersOutput.get() == true
project.dockerCompose.nested.captureContainersOutputToFiles.get().getAsFile() == project.file('/path/to/directory')
}

def "isRequiredBy() adds dependencies"() {
def project = ProjectBuilder.builder().build()
project.plugins.apply 'docker-compose'
Expand Down