com.avast.gradle.dockercompose.tasks.ComposeDown.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-docker-compose-plugin Show documentation
Show all versions of gradle-docker-compose-plugin Show documentation
Simplifies usage of Docker Compose for integration testing in Gradle environment.
The newest version!
package com.avast.gradle.dockercompose.tasks
import groovy.transform.CompileStatic
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.TaskAction
@CompileStatic
abstract class ComposeDown extends ComposeDownForced {
@Internal
abstract Property getStopContainers()
ComposeDown() {
group = 'docker'
description = 'Stops and removes containers of docker-compose project (only if stopContainers is set to true)'
}
@TaskAction
void down() {
if (stopContainers.get()) {
super.down()
} else {
logger.lifecycle('You\'re trying to stop the containers, but stopContainers is set to false. Please use composeDownForced task instead.')
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy