ministryofjustice / modernisation-platform

A place for the core work of the Modernisation Platform • This repository is defined and managed in Terraform
https://user-guide.modernisation-platform.service.justice.gov.uk
MIT License
683 stars 291 forks source link

Remove MP engineers from Environment repo deployments #3476

Closed davidkelliott closed 1 year ago

davidkelliott commented 1 year ago

User Story

As an MP engineer I should not be making deployments to user infrastructure So that I don't accidentally interfere with users work

User Type(s)

MP engineers

Value

Prevent accidental deployments to user infrastructure

Assumptions / Hypothesis / Questions / Unknowns

Hypothesis

If we remove MP team deployment rights Then we will not be able to make deployments

Proposal

  1. Modify the github environments script to not add MP team as a reviewer - https://github.com/ministryofjustice/modernisation-platform/blob/main/scripts/git-create-environments.sh

  2. On the environments repository, manually remove the MP team from all environments (you may want to script this, but it's probably quicker as a one off to do manually).

Unknowns

The GitHub script changes will need to be tested locally and carefully on one of our environments first as to not impact everyone. The script will loop through all envs so this will need to be modified to run against only one. -->

Definition of done

Reference

How to write good user stories

dms1981 commented 1 year ago

The following PR solves the automation step - https://github.com/ministryofjustice/modernisation-platform/pull/3523 I've made all the manual changes I can, but have noted that some environments don't appear to allow me to attach the relevant teams to their environmental approvers:

dms1981 commented 1 year ago

Added missing teams to repo with write access and matched them with the relevant environments