Skip to content

Commit

Permalink
Merge branch 'master' of github.com:hexagontk/todo_backend
Browse files Browse the repository at this point in the history
  • Loading branch information
jaguililla committed Jun 28, 2024
2 parents 7ea688f + 580ba8c commit e5195b0
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,28 @@ tasks.wrapper {
tasks.register("buildImage", type = Exec::class) {
dependsOn("jpackage")
commandLine("docker", "compose", "--profile", "local", "build")

environment(
"REGISTRY" to (environment["REGISTRY"] ?: "k3d.localhost:5000/"),
"VERSION" to version
)
dockerEnvironment()
}

tasks.register("push", type = Exec::class) {
dependsOn("buildImage")
commandLine("docker", "compose", "--profile", "local", "push")

environment(
"REGISTRY" to (environment["REGISTRY"] ?: "k3d.localhost:5000/"),
"VERSION" to version
)
dockerEnvironment()
}

tasks.register("up", type = Exec::class) {
dependsOn("push")
commandLine("docker", "compose", "--profile", "local", "up", "-d")
dockerEnvironment()
}

tasks.register("rm", type = Exec::class) {
commandLine("docker", "compose", "--profile", "local", "rm", "-sfv")
}

fun Exec.dockerEnvironment() {
environment(
"REGISTRY" to (environment["REGISTRY"] ?: "k3d.localhost:5000/"),
"VERSION" to version
)
}

tasks.register("rm", type = Exec::class) {
commandLine("docker", "compose", "--profile", "local", "rm", "-sfv")
}

0 comments on commit e5195b0

Please sign in to comment.