
ai.digital.integration.server.tasks.database.DatabaseStopTask.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of integratoin-server-gradle-plugin Show documentation
Show all versions of integratoin-server-gradle-plugin Show documentation
The easy way to get custom setup for Deploy up and running
The newest version!
package ai.digital.integration.server.tasks.database
import ai.digital.integration.server.util.DbUtil
import org.gradle.api.DefaultTask
import org.gradle.api.tasks.InputFiles
import org.gradle.api.tasks.TaskAction
import static ai.digital.integration.server.constant.PluginConstant.PLUGIN_GROUP
class DatabaseStopTask extends DefaultTask {
static NAME = 'databaseStop'
DatabaseStopTask() {
this.group = PLUGIN_GROUP
}
@InputFiles
File getDockerComposeFile() {
DbUtil.assertNotDerby(project, 'Docker compose tasks do not support Derby database.')
DbUtil.getResolveDbFilePath(project).toFile()
}
@TaskAction
void run() {
project.exec {
it.executable 'docker-compose'
it.args '-f', getDockerComposeFile(), 'down'
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy