Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/scala did 0.1.0 m18 #204

Merged
merged 11 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
ATALA_GITHUB_ACTOR: ${{ secrets.ATALA_GITHUB_ACTOR }}
ATALA_GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
REPORTS_DIR: "didcomm-v2-mediator-test-suite/target/site/serenity"
DIDCOMM_V2_TESTSUITE_VERSION: "13882b256bfdbe8ba738c2798dffc0ce25ca52e4"
MEDIATOR_DID: "did:peer:2.Ez6LSghwSE437wnDE1pt3X6hVDUQzSjsHzinpX3XFvMjRAm7y.Vz6Mkhh1e5CEYYq6JBUcTZ6Cp2ranCWRrv7Yax3Le4N59R6dd.SeyJ0IjoiZG0iLCJzIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwIiwiciI6W10sImEiOlsiZGlkY29tbS92MiJdfQ.SeyJ0IjoiZG0iLCJzIjoid3M6Ly9sb2NhbGhvc3Q6ODA4MC93cyIsInIiOltdLCJhIjpbImRpZGNvbW0vdjIiXX0"
DIDCOMM_V2_TESTSUITE_VERSION: "58efea198a807559fe635cb67e7e062ad1acfbca"
FabioPinheiro marked this conversation as resolved.
Show resolved Hide resolved
MEDIATOR_DID: "did:peer:2.Ez6LSghwSE437wnDE1pt3X6hVDUQzSjsHzinpX3XFvMjRAm7y.Vz6Mkhh1e5CEYYq6JBUcTZ6Cp2ranCWRrv7Yax3Le4N59R6dd.SeyJ0IjoiZG0iLCJzIjp7InVyaSI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODA4MCIsInIiOltdLCJhIjpbImRpZGNvbW0vdjIiXX19.SeyJ0IjoiZG0iLCJzIjp7InVyaSI6IndzOi8vbG9jYWxob3N0OjgwODAvd3MiLCJyIjpbXSwiYSI6WyJkaWRjb21tL3YyIl19fQ"
steps:
- name: Checkout mediator
uses: actions/checkout@v3
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,14 @@ By default mediator will start on port 8080
You can open the `http://localhost:8080/` URL in a web browser, and it will show a QR code that serves as an out-of-band invitation for the Mediator.

## How to run mediator as docker image

### Docker only

It is possible to run everything with a single command with Docker compose docker-compose.yml
The latest stable image version is available in the IOHK repositories.
To build a docker image locally, run NODE_OPTIONS=--openssl-legacy-provider sbt docker:publishLocal.
```
To build a docker image locally, run `NODE_OPTIONS=--openssl-legacy-provider sbt docker:publishLocal`.

```shell
shell> cd atala-prism-mediator
shell> NODE_OPTIONS=--openssl-legacy-provider sbt docker:publishLocal
shell> MEDIATOR_VERSION=$(sbt "print mediator/version" --error) docker-compose up
Expand Down
36 changes: 33 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,36 @@ 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-M16"
val scalaDID = "0.1.0-M17"

// FIXME another bug in the test framework https://github.com/scalameta/munit/issues/554
val munit = "1.0.0-M10" // "0.7.29"
Expand Down Expand Up @@ -216,13 +243,16 @@ lazy val mediator = project
.settings(
Compile / mainClass := Some("io.iohk.atala.mediator.MediatorStandalone"),
Docker / maintainer := "[email protected]",
Docker / dockerUsername := Some("input-output-hk"),
Docker / dockerRepository := Some("ghcr.io"),
// 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",
dockerExposedPorts := Seq(8080),
dockerBaseImage := "openjdk:11",
dockerUpdateLatest := true,
)
.settings(dockerBuildxSettings)
.settings(Test / parallelExecution := false)
.settings(
// WebScalaJSBundlerPlugin
Expand Down
Loading