Skip to content

Commit 0e6df01

Browse files
committed
Add Docker utilities in build
1 parent f46172a commit 0e6df01

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

build.gradle.kts

+13-4
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ tasks.register("buildImage", type = Exec::class) {
4949
)
5050
}
5151

52-
tasks.register("pushImage", type = Exec::class) {
53-
dependsOn("jpackage")
52+
tasks.register("push", type = Exec::class) {
53+
dependsOn("buildImage")
5454
commandLine("docker", "compose", "--profile", "local", "push")
5555

5656
environment(
@@ -60,6 +60,15 @@ tasks.register("pushImage", type = Exec::class) {
6060
}
6161

6262
tasks.register("up", type = Exec::class) {
63-
dependsOn("buildImage")
64-
commandLine("docker", "compose", "--profile", "local", "up")
63+
dependsOn("push")
64+
commandLine("docker", "compose", "--profile", "local", "up", "-d")
65+
66+
environment(
67+
"REGISTRY" to (environment["REGISTRY"] ?: "k3d.localhost:5000/"),
68+
"VERSION" to version
69+
)
70+
}
71+
72+
tasks.register("rm", type = Exec::class) {
73+
commandLine("docker", "compose", "--profile", "local", "rm", "-sfv")
6574
}

0 commit comments

Comments
 (0)