alert-config-builder
is a Scala utility which, given an alert specification for a number of services, generates and emits JSON alert configuration documents for those services, suitable for indexing in Elasticsearch.
The artifact produced by this project is used in the alert-config
project. The 2 repositories are kept separate due to the fact that the alert-config
project is user editable yet we don't want to make the functionality exposed here editable.
Java : 11
Scala : 2.13.*
SBT : 1.9.7
app-config : Depends on the app-config Git repository for the environment for which the alert config is being generated e.g. app-config-qa.
For local testing, you will need an empty app-config folder outside the alert-config-builder i.e. mkdir -p ../app-config
app-config-path
- A Java system property which identifies the location of the app-config repository to use in the generation of the alert-config. This can be either a relative or absolute path. If not provided this will default to ../app-config
.
Make sure all dependencies are satisfied
Run sbt clean test
to confirm main branch is functional
Amend the code
Make sure old and your new tests are passing: sbt clean test
To see the outcome:
- Create a new version by building your branch using alert-config-builder jenkins job
- Update the alert-config dependencies to use your new version
- Update alert-config code to make sure it is going to use your new code in alert-config-builder
- Run
sbt clean test run
in alert-config folder to generate configuration and investigate the result in the target folder
This repository uses Scalafmt, a code formatter for Scala. The formatting rules configured for this repository are defined within .scalafmt.conf.
Formatting is not integrated with build pipelines. We encourage contributors to make sure their work is well formatted using the following before committing changes:
# check
sbt scalafmtCheckAll
# Apply
sbt scalafmtAll
Visit the official Scalafmt documentation to view a complete list of tasks which can be run.
This code is open source software licensed under the Apache 2.0 License.