geirolz / sbt-service-info   0.0.2

Apache License 2.0 GitHub

A small companion of sbt-buildinfo to add more service-specific informations.

Scala versions: 2.12
sbt plugins: 1.x

SBT Service Info

CICD Scala Steward Mergify Status

This plugin adds custom keys to sbt-buildinfo to have more information about the microservice. Settings are typed to improve readability and consistency.

How to use

Add this to your project plugins.sbt file

addSbtPlugin("com.github.geirolz" % "sbt-service-info" % "0.0.1")

And then enable the plugin to your project in the build.sbt file with

lazy val myProject = (project in file("."))
  .enablePlugins(BuildInfoPlugin, ServiceInfoPlugin)

Keys

  • serviceBoundedContext = Specify service bounded context info, default unknown.
  • serviceProcessingPurpose = Specify service processing purpose, can be OLTP or OLAP default unknown.
  • serviceTags = Specify service useful tags, default Nil
  • serviceTagsIncludeDependencies = Boolean to specify if automatic add tags related to service dependencies or not, default true.
  • serviceTagsIncludeDependenciesVersions = When serviceTagsIncludeDependencies is true this flag specify if add dependencies version in the tags or not, default true

N.B.

In your build.sbt file where you declare yours buildInfoKeys mind to use ++= instead of :=. Otherwise, the keys set by this plugin will be overloaded by yours

Example

buildInfoKeys ++= List[BuildInfoKey](
  name,
  description,
  version,
  scalaVersion,
  sbtVersion,
  buildInfoBuildNumber
)