This simple javascript library is used to pull data from the capability model and generate confluence pages directly. It does so by pulling data from an ArchiMate model and assumes therefore the model exists on your local machine. For reference on how to setup the ArchiMate model, refer to these guidelines
This program is designed to run as a GitHub action from the ArchiMate model to generate the two outputs below
- One view is from a Capability perspective and will update the pages under here
- The other view is from a Product perspective and populates the contents under here
- The C4 diagrams now referenced in the product pages are referencing those images published by the dtos-solution-architecture project
However it can be run locally if the ArchiMate file is present.
This is a simple javascript file and therefore should run with the latest version of node.
You will need to generate a personal access token for Confluence when running this program and it will need to be supplied at runtime. Instructions on creating a personal access token can be found here - https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html
By default it will run in test mode, pushing the output to this location on confluence - https://nhsd-confluence.digital.nhs.uk/display/DTS/Page-Generation-Playground
Assuming you are running this in a terminal console.
git clone git@github.com:NHSDigital/dtos-capability-generator.git
Change into the locally cloned directory.
cd dtos-capability-generator
Install node modules.
npm install
Update Confluence SANDPIT pages (using content from Archi and C4 model diagram images)
node main.js <<YOUR_PASTOKEN>> <<LOCATION_TO_ARCHI>>
Update Confluence PRODUCTION pages (using content from Archi and C4 model diagram images)
node main.js <<YOUR_PASTOKEN>> <<LOCATION_TO_ARCHI>> --prod
It became clear that continually updating the pages resulted in issues around cleanup and specifically around unpublished changes. The program now deletes all of the sub pages under both capabilities and products.
But it will prompt you if you want to delete and it outputs the pages due to be deleted.
As someone that didn't do this.....PLEASE CHECK THE FILES TO BE DELETED
The following software packages, or their equivalents, are expected to be installed and configured:
The LICENCE.md file will need to be updated with the correct year and owner
Any HTML or Markdown documentation is © Crown Copyright and available under the terms of the Open Government Licence v3.0.