diff --git a/iris/service/CHANGELOG.md b/iris/service/CHANGELOG.md new file mode 100644 index 0000000000..98aabfd7ba --- /dev/null +++ b/iris/service/CHANGELOG.md @@ -0,0 +1,10 @@ +# iris-service-v0.1.0 (2022-11-09) + +### Bug Fixes + + * iris: align type signature (#72 (https://github.com/input-output-hk/atala-prism-building-blocks/issues/72)) (a19a781 (https://github.com/input-output-hk/atala-prism-building-blocks/commit/a19a7814c3fc1e1cc89a861ae3942bf4a5fbad0a)) + +### Features + + * iris: ATL-1791 Implement blockchain syncer functionality (#49 (https://github.com/input-output-hk/atala-prism-building-blocks/issues/49)) (431b657 (https://github.com/input-output-hk/atala-prism-building-blocks/commit/431b6575b8df2f4744285b1c5e2dd56072fa874c)) + * shared: Add environmnet configuration for Iris DB and bump scala version in other components to enable build (#96 (https://github.com/input-output-hk/atala-prism-building-blocks/issues/96)) (a5b583f (https://github.com/input-output-hk/atala-prism-building-blocks/commit/a5b583f445b7efd31987cf9ca017bc544a877986)) diff --git a/iris/service/build.sbt b/iris/service/build.sbt index df9a62ae6a..2186ac1d36 100644 --- a/iris/service/build.sbt +++ b/iris/service/build.sbt @@ -1,27 +1,42 @@ import Dependencies._ import sbt.Keys.testFrameworks import sbtghpackages.GitHubPackagesPlugin.autoImport._ +import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._ // Custom keys val apiBaseDirectory = settingKey[File]("The base directory for Iris gRPC specifications") ThisBuild / apiBaseDirectory := baseDirectory.value / "../api" -def commonProject(project: Project): Project = - project.settings( - version := "0.1.0-SNAPSHOT", +inThisBuild( + Seq( organization := "io.iohk.atala", scalaVersion := "3.2.0", + fork := true, + run / connectInput := true, + versionScheme := Some("semver-spec"), + githubOwner := "input-output-hk", + githubRepository := "atala-prism-building-blocks", + githubTokenSource := TokenSource.Environment("ATALA_GITHUB_TOKEN") + ) +) + +def commonProject(project: Project): Project = + project.settings( githubTokenSource := TokenSource.Environment("ATALA_GITHUB_TOKEN"), + versionScheme := Some("semver-spec"), resolvers += Resolver - .githubPackages("input-output-hk", "atala-prism-sdk"), + .githubPackages("input-output-hk"), // Needed for Kotlin coroutines that support new memory management mode resolvers += "JetBrains Space Maven Repository" at "https://maven.pkg.jetbrains.space/public/p/kotlinx-coroutines/maven", ) // Project definitions -lazy val root = commonProject(project) +lazy val root = project .in(file(".")) + .settings( + name := "iris-service-root" + ) .aggregate(core, sql, server) lazy val core = commonProject(project) @@ -49,10 +64,22 @@ lazy val server = commonProject(project) name := "iris-server", libraryDependencies ++= serverDependencies, Docker / maintainer := "atala-coredid@iohk.io", - Docker / dockerRepository := Some("atala-prism.io"), - // Docker / packageName := s"atala-prism/${packageName.value}", + Docker / dockerUsername := Some("input-output-hk"), + Docker / githubOwner := "atala-prism-building-blocks", + Docker / dockerRepository := Some("ghcr.io"), + Docker / dockerUpdateLatest := true, dockerExposedPorts := Seq(8081), dockerBaseImage := "openjdk:11" ) .enablePlugins(JavaAppPackaging, DockerPlugin) .dependsOn(core, sql) + +releaseProcess := Seq[ReleaseStep]( + checkSnapshotDependencies, + inquireVersions, + //runClean, + //runTest, + setReleaseVersion, + ReleaseStep(releaseStepTask(server / Docker / publish)), + setNextVersion +) diff --git a/iris/service/package.json b/iris/service/package.json new file mode 100644 index 0000000000..439994f7b6 --- /dev/null +++ b/iris/service/package.json @@ -0,0 +1,55 @@ +{ + "name": "iris-service", + "devDependencies": { + "@commitlint/cli": "^17.0.3", + "@commitlint/config-conventional": "^17.0.3", + "@semantic-release/changelog": "^6.0.1", + "@semantic-release/exec": "^6.0.3", + "@semantic-release/git": "^10.0.1", + "conventional-changelog-conventionalcommits": "^5.0.0", + "gradle-semantic-release-plugin": "1.7.3", + "husky": "^8.0.1", + "pinst": "^3.0.0", + "prettier": "^2.7.1", + "semantic-release": "^19.0.3", + "semantic-release-monorepo": "^7.0.5" + }, + "extends": "semantic-release-monorepo", + "release": { + "branches": [ + { + "name": "main" + }, + { + "name": "prerelease/iris-service", + "prerelease": "snapshot" + } + ], + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + [ + "@semantic-release/exec", + { + "prepareCmd": "sbt \"release release-version ${nextRelease.version} next-version ${nextRelease.version}-SNAPSHOT with-defaults\"" + } + ], + [ + "@semantic-release/changelog", + { + "changelogFile": "CHANGELOG.md" + } + ], + [ + "@semantic-release/git", + { + "assets": [ + "version.sbt", + "CHANGELOG.md" + ], + "message": "chore(release): cut iris-service image ${nextRelease.version} release [skip ci]\n\n${nextRelease.notes}" + } + ] + ] + } +} diff --git a/iris/service/project/Dependencies.scala b/iris/service/project/Dependencies.scala index 72e2ffee9d..70a91ca486 100644 --- a/iris/service/project/Dependencies.scala +++ b/iris/service/project/Dependencies.scala @@ -9,7 +9,7 @@ object Dependencies { val akka = "2.6.19" val doobie = "1.0.0-RC2" val zioCatsInterop = "3.3.0" - val prismSdk = "v1.3.3-snapshot-1657194253-992dd96" + val prismSdk = "v1.4.1" val shared = "0.1.0" val enumeratum = "1.7.0" val zioTest = "2.0.2" diff --git a/iris/service/project/plugins.sbt b/iris/service/project/plugins.sbt index 5a1aa947af..dcfa52bfdb 100644 --- a/iris/service/project/plugins.sbt +++ b/iris/service/project/plugins.sbt @@ -1,3 +1,4 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3") addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.11") +addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") diff --git a/iris/service/version.sbt b/iris/service/version.sbt new file mode 100644 index 0000000000..e91862e625 --- /dev/null +++ b/iris/service/version.sbt @@ -0,0 +1 @@ +ThisBuild / version := "0.1.0-SNAPSHOT"