-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(iris): automate iris-service docker release process (#103)
- Loading branch information
abalias
authored
Nov 9, 2022
1 parent
a873090
commit 3327d1c
Showing
6 changed files
with
102 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 := "[email protected]", | ||
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 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}" | ||
} | ||
] | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ThisBuild / version := "0.1.0-SNAPSHOT" |