Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: georgi-l95 <[email protected]>
  • Loading branch information
georgi-l95 committed Dec 19, 2024
1 parent 6754763 commit cbbf00a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
6 changes: 3 additions & 3 deletions server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ val copyDockerFolder: TaskProvider<Copy> =
into(dockerBuildRootDirectory)
}

// @todo(#343) - createDotEnv is temporary and used by the suites,
// @todo(#343) - createProductionDotEnv is temporary and used by the suites,
// once the suites no longer rely on the .env file from the build root we
// should remove this task
val createDotEnv: TaskProvider<Exec> =
tasks.register<Exec>("createDotEnv") {
val createProductionDotEnv: TaskProvider<Exec> =
tasks.register<Exec>("createProductionDotEnv") {
description = "Creates the default dotenv file for the Block Node Server"
group = "docker"

Expand Down
14 changes: 2 additions & 12 deletions simulator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -132,25 +132,15 @@ val createDockerImage: TaskProvider<Exec> =
commandLine("sh", "-c", "docker buildx build -t hedera-block-simulator:latest .")
}

val createDotEnv: TaskProvider<Exec> =
tasks.register<Exec>("createDotEnv") {
description = "Creates .env file with needed environment variables for the simulator"
group = "docker"

dependsOn(createDockerImage, tasks.assemble)
workingDir(dockerBuildRootDirectory)
commandLine("sh", "-c", "./update-env.sh")
}

val startDockerContainer: TaskProvider<Exec> =
tasks.register<Exec>("startDockerContainer") {
description = "Creates and starts the docker image of the Block Stream Simulator"
group = "docker"

dependsOn(createDotEnv, tasks.assemble)
dependsOn(createDockerImage, tasks.assemble)
workingDir(dockerBuildRootDirectory)

commandLine("sh", "-c", "docker compose -p simulator up -d")
commandLine("sh", "-c", "./update-env.sh && docker compose -p simulator up -d")
}

tasks.register<Exec>("stopDockerContainer") {
Expand Down
2 changes: 1 addition & 1 deletion suites/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ tasks.register<Test>("runSuites") {
modularity.inferModulePath = false

// @todo(#343) - :server:createDotEnv should disappear
dependsOn(":server:createDockerImage", ":server:createDotEnv")
dependsOn(":server:createDockerImage", ":server:createProductionDotEnv")

useJUnitPlatform()
testLogging { events("passed", "skipped", "failed") }
Expand Down

0 comments on commit cbbf00a

Please sign in to comment.