Skip to content

Commit

Permalink
generating .env is now responsibility of the respective start command
Browse files Browse the repository at this point in the history
Signed-off-by: Atanas Atanasov <[email protected]>
  • Loading branch information
ata-nas committed Nov 13, 2024
1 parent c44caf1 commit 29f1f47
Showing 1 changed file with 18 additions and 40 deletions.
58 changes: 18 additions & 40 deletions server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -85,41 +85,7 @@ val createDockerImage: TaskProvider<Exec> =

dependsOn(copyDockerFolder, tasks.assemble)
workingDir(dockerBuildRootDirectory)
commandLine(
"sh",
"-c",
"./update-env.sh ${project.version} false false && ./docker-build.sh ${project.version}"
)
}

val createDockerImageDebug: TaskProvider<Exec> =
tasks.register<Exec>("createDockerImageDebug") {
description =
"Creates the debug docker image of the Block Node Server based on the current version"
group = "docker"

dependsOn(copyDockerFolder, tasks.assemble)
workingDir(dockerBuildRootDirectory)
commandLine(
"sh",
"-c",
"./update-env.sh ${project.version} true false && ./docker-build.sh ${project.version}"
)
}

val createDockerImageSmokeTest: TaskProvider<Exec> =
tasks.register<Exec>("createDockerImageSmokeTest") {
description =
"Creates the smoke tests docker image of the Block Node Server based on the current version"
group = "docker"

dependsOn(copyDockerFolder, tasks.assemble)
workingDir(dockerBuildRootDirectory)
commandLine(
"sh",
"-c",
"./update-env.sh ${project.version} false true && ./docker-build.sh ${project.version}"
)
commandLine("sh", "-c", "./docker-build.sh ${project.version}")
}

tasks.register<Exec>("startDockerContainer") {
Expand All @@ -129,27 +95,39 @@ tasks.register<Exec>("startDockerContainer") {

dependsOn(createDockerImage)
workingDir(dockerBuildRootDirectory)
commandLine("sh", "-c", "docker compose -p block-node up -d")
commandLine(
"sh",
"-c",
"./update-env.sh ${project.version} false false && docker compose -p block-node up -d"
)
}

tasks.register<Exec>("startDockerContainerDebug") {
description =
"Starts the docker debug container of the Block Node Server for the current version"
group = "docker"

dependsOn(createDockerImageDebug)
dependsOn(createDockerImage)
workingDir(dockerBuildRootDirectory)
commandLine("sh", "-c", "docker compose -p block-node up -d")
commandLine(
"sh",
"-c",
"./update-env.sh ${project.version} true false && docker compose -p block-node up -d"
)
}

tasks.register<Exec>("startDockerContainerSmokeTest") {
description =
"Starts the docker smoke test container of the Block Node Server for the current version"
group = "docker"

dependsOn(createDockerImageSmokeTest)
dependsOn(createDockerImage)
workingDir(dockerBuildRootDirectory)
commandLine("sh", "-c", "docker compose -p block-node up -d")
commandLine(
"sh",
"-c",
"./update-env.sh ${project.version} false true && docker compose -p block-node up -d"
)
}

tasks.register<Exec>("stopDockerContainer") {
Expand Down

0 comments on commit 29f1f47

Please sign in to comment.