Open richgreen-moj opened 9 months ago
Do we want to do this?
Having a think about this, I don't think it's impossible but we would want have to think about our new account issue template. At the moment it's free text, which is great for humans but bad for automation. The challenge would be to keep something that's user-friendly but includes json which is great for machines to read.
Once we've got json we can have a GitHub action that triggers when a new account issue is raised, that takes that json and turns it into a file for a PR. In theory. It's probably a fair bit more complicated than I'm making out.
new-environment.yml
so that it has a field with structure text (eg. json
).onboarding
issue is created.environments/*.json
file and raise a PR from it.expected.rego
and include that in the PR.This issue is stale because it has been open 90 days with no activity.
User Story
As a MP Engineer I want to automate the creation of the application.json file for account creation So that I can further reduce the manual steps required to onboard members
Value / Purpose
https://user-guide.modernisation-platform.service.justice.gov.uk/runbooks/creating-accounts-for-end-users.html#creating-aws-accounts-for-teams defines the runbook for onboarding new accounts.
This story would aim to automate creation of the first PR required which includes steps:
NB - We could make this a manually triggered job so that PRs are not created for requests which turn out to be rejected as they are not suitable to be hosted in MP etc.
The purpose of the story would be to parse the information from the issue template that members raise to request an environment and automatically compile the application.json file using details supplied in the form. Currently engineers create a new file using this template and raise a PR.
It would need to account for the possibility of existing applications adding new environments (hence no new application.json file required just and update to the existing). It may also require a change to the issue form we use to gather the data (to make it easier to parse).
Overall this would reduce the time/steps required to onboard member accounts.
Useful Contacts
@richgreen-moj
Additional Information
There are some non-verified actions that parse github issues and transform to json here that could provide some inspiration. Perhaps there other ways this could be achieved though? Unfortunately I don't think GitHub has native ability to export the various fields in a template issue form into a queryable json format.
Proposal / Unknowns
For the demand of new accounts the effort here might outweigh the benefit but it could be a fun project!
Definition of Done