Skip to content

johnrballard/hmpps-architecture-as-code

 
 

Repository files navigation

Publish Build and validate

hmpps-architecture-as-code

Modelling architecture in HM Prisons and Probations Service (HMPPS) with the C4 model and Structurizr.

Key outputs

Workspaces

This repository defines a Structurizr workspace for the HM Prison and Probation Service.

For the model and diagrams, please visit https://structurizr.com/share/56937.

Overview

Overview key

Linking from other repositories

To link to a live version of a diagram, insert the following code into your repository's readme:

(Replace nomiscontainer with the diagram key in the code)

[Container diagram source](https://github.com/ministryofjustice/hmpps-architecture-as-code/search?q=nomiscontainer)

![Container diagram](https://static.structurizr.com/workspace/56937/diagrams/nomiscontainer.png)

![Container diagram legend](https://static.structurizr.com/workspace/56937/diagrams/nomiscontainer-key.png)

Running

The project is built with gradle.

Action Command
Build the project ./gradlew build
Create a local Structurizr workspace JSON file ./gradlew run
Push to the remote Structurizr workspace ./gradlew run --args='--push'
(please see "Secrets" section below)

🚨 Remote-only changes will be lost

The remote workspace's content is replaced with the content in this repository. Remote-only changes will be lost.

Secrets

The --push command can be configured with these environment variables:

Environment variable Meaning
STRUCTURIZR_API_KEY Required The API key for the Structurizr API.
STRUCTURIZR_API_SECRET Required The API secret for the Structurizr API.
STRUCTURIZR_WORKSPACE_ID Overrides the default workspace ID.

Example:

STRUCTURIZR_WORKSPACE_ID=12345 \
  STRUCTURIZR_API_KEY=key \
  STRUCTURIZR_API_SECRET=secret \
  ./gradlew run --args='--push'

You can view these secrets on the dashboard, after clicking Show more... next to the desired workspace.

Generating images locally

Requires plantuml and wget to be installed (e.g. with brew install plantuml wget)

script/generate_images.sh

This command will locally generate all defined workspace diagrams without using the Structurizr web API.

About

Modelling the software architecture of HMPPS Digital

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 98.6%
  • Shell 1.4%