Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioPinheiro committed Feb 2, 2024
1 parent 556edbb commit 3789ed4
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,6 @@ inThisBuild(
)
)

import scala.sys.process.Process
lazy val ensureDockerBuildx = taskKey[Unit]("Ensure that docker buildx configuration exists")
lazy val dockerBuildWithBuildx = taskKey[Unit]("Build docker images using buildx")
lazy val dockerBuildxSettings = Seq(
ensureDockerBuildx := {
if (Process("docker buildx inspect multi-arch-builder").! == 1) {
Process("docker buildx create --use --name multi-arch-builder", baseDirectory.value).!
}
},
dockerBuildWithBuildx := {
streams.value.log("Building and pushing image with Buildx")
dockerAliases.value.foreach { alias =>
Process(
"docker buildx build --platform=linux/arm64,linux/amd64 --push -t " + alias + " .",
baseDirectory.value / "target" / "docker" / "stage"
).!
}
},
Docker / publish := Def
.sequential(
Docker / publishLocal,
ensureDockerBuildx,
dockerBuildWithBuildx
)
.value
)

/** Versions */
lazy val V = new {
val scalaDID = "0.1.0-M17"
Expand Down Expand Up @@ -245,14 +218,11 @@ lazy val mediator = project
Docker / maintainer := "[email protected]",
Docker / dockerUsername := Some("input-output-hk"),
Docker / dockerRepository := Some("ghcr.io"),
// Docker / dockerUsername := Some("fabio"),
// Docker / dockerRepository := Some("registry.fmgp.app"),
// Docker / packageName := "atala-prism-mediator",
Docker / packageName := "atala-prism-mediator",
dockerExposedPorts := Seq(8080),
dockerBaseImage := "openjdk:11",
dockerUpdateLatest := true,
)
.settings(dockerBuildxSettings)
.settings(Test / parallelExecution := false)
.settings(
// WebScalaJSBundlerPlugin
Expand Down

0 comments on commit 3789ed4

Please sign in to comment.