Skip to content

Commit

Permalink
chore: remove C4 diagrams from repo (#3894)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhavat authored Jan 20, 2025
1 parent 180afd7 commit 5855ab4
Show file tree
Hide file tree
Showing 12 changed files with 3 additions and 3,805 deletions.
16 changes: 1 addition & 15 deletions .github/workflows/ci-orchestrator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,6 @@ jobs:
uses: ./.github/workflows/watt-ci.yml
secrets: inherit

#
# C4 model
#
render_c4model_views:
needs: changes
if: ${{ needs.changes.outputs.render_c4model_views == 'true' }}
uses: Energinet-DataHub/.github/.github/workflows/structurizr-render-diagrams.yml@v14
with:
structurizr_workspace_filename: views
included_model_filename: model
secrets:
token: ${{ secrets.GITHUB_TOKEN }}

#
# Branch policy status check
#
Expand All @@ -90,8 +77,7 @@ jobs:
ci_base,
dh_ci_frontend,
dh_ci_dotnet,
watt_ci,
render_c4model_views
watt_ci
]
if: |
always()
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/detect-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ on:
value: ${{ jobs.changes.outputs.dh_frontend_e2e }}
watt_frontend:
value: ${{ jobs.changes.outputs.watt_frontend }}
render_c4model_views:
value: ${{ jobs.changes.outputs.render_c4model_views }}


jobs:
Expand All @@ -43,7 +41,6 @@ jobs:
dh_frontend: ${{ steps.dh_affected.outputs.is-affected }}
dh_frontend_e2e: ${{ steps.filter.outputs.dh_frontend_e2e }}
watt_frontend: ${{ steps.watt_affected.outputs.is-affected }}
render_c4model_views: ${{ steps.filter.outputs.render_c4model_views }}
env:
BASE_BRANCH: ${{ github.event.pull_request.base.ref }}
IS_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
Expand All @@ -68,10 +65,6 @@ jobs:
- '.github/workflows/dh-ci-frontend.yml'
- '.github/workflows/dh-cd.yml'
- 'apps/dh/e2e-dh/**'
render_c4model_views:
- 'docs/diagrams/c4-model/views.dsl'
- 'docs/diagrams/c4-model/views.json'
- 'docs/diagrams/c4-model/model.dsl'
# needed for nx affected command
- name: "PR: Fetch base branch Git history"
Expand Down
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"ms-vscode.powershell",
"redhat.vscode-yaml",
"github.vscode-github-actions",
"systemticks.c4-dsl-extension",
"ms-azuretools.vscode-docker"
]
}
28 changes: 0 additions & 28 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,34 +121,6 @@
"command": "echo ${input:terminate}",
"type": "shell",
"problemMatcher": []
},
{
"label": "Structurizr Lite: Load 'views'",
"type": "docker-run",
"dockerRun": {
"image": "structurizr/lite:latest",
"ports": [
{
"containerPort": 8080,
"hostPort": 8080
}
],
"volumes": [
{
"localPath": "${workspaceFolder}/docs/diagrams/c4-model",
"containerPath": "/usr/local/structurizr"
}
],
"env": {
"STRUCTURIZR_WORKSPACE_FILENAME": "views"
},
"remove": true
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
],
"inputs": [
Expand Down
15 changes: 2 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ The repository is using [GitHub Actions workflows](https://docs.github.com/en/ac
for automation including CI/CD pipelines for each application.
Workflows are located in `.github/workflows` which currently contains the following:

- `ci-orchestrator.yml` - Markdown check and YAML validation, renders C4 model diagrams, detects changes to start relevant workflows and branch policy status check.
- `ci-orchestrator.yml` - Markdown check and YAML validation, detects changes to start relevant workflows and branch policy status check.
- `clean-up-cache.yml` - Cleanup GitHub workflow caches for closed branches.
- `create-tokens.yml` - Generates design tokens based on a JSON file exported from Figma.
- `detect-changes.yml` - Figures out what part of the codebase is affected by a change.
Expand Down Expand Up @@ -337,18 +337,7 @@ later be found by executing the `Show recommended extensions` command.

In the DataHub 3 project we use the [C4 model](https://c4model.com/) to document the high-level software design.

The [DataHub base model](https://github.com/Energinet-DataHub/opengeh-arch-diagrams#datahub-base-model) describes elements like organizations, software systems and actors. In domain repositories we should `extend` on this model and add additional elements within the DataHub 3.0 Software System (`dh3`).

The domain C4 model and rendered diagrams are located in the folder hierarchy [docs/diagrams/c4-model](./docs/diagrams/c4-model/) and consists of:

- `model.dsl`: Structurizr DSL describing the domain C4 model.
- `views.dsl`: Structurizr DSL extending the `dh3` software system by referencing domain C4 models using `!include`, and describing the views.
- `views.json`: Structurizr layout information for views.
- `/views/*.png`: A PNG file per view described in the Structurizr DSL.

> This folder also contains `package.json` and `package-lock.json` to support the use of `npm` under this folder hierarchy. It is necessary for the rendering of diagrams handled by the workflow `structurizr-render-diagrams.yml`.
Maintenance of the C4 model should be performed using VS Code and a local version of Structurizr Lite running in Docker. See [DataHub base model](https://github.com/Energinet-DataHub/opengeh-arch-diagrams#datahub-base-model) for a description of how to do this.
The domain C4 model and views are located in [c4-arch-diagrams](https://github.com/Energinet-DataHub/c4-arch-diagrams/tree/main/src/dh3-frontend) repository.

## Thanks to all the people who already contributed

Expand Down
58 changes: 0 additions & 58 deletions docs/diagrams/c4-model/model.dsl

This file was deleted.

Loading

0 comments on commit 5855ab4

Please sign in to comment.