ministryofjustice / cloud-platform

Documentation on the MoJ cloud platform
MIT License
87 stars 45 forks source link

Pipelines for testing Terraform modules #1883

Closed vijay-veeranki closed 3 years ago

vijay-veeranki commented 4 years ago

This Epic came out of firebreak spike. "https://github.com/ministryofjustice/cloud-platform/issues/1838"

Document from the spike: "https://docs.google.com/document/d/1UgXM0uFyB9tJvZv-G5XQ0u1xiNVD2zZXfS9gmPKjwh8/edit"

Tasks to achieve this:

1) A new dedicated cluster with single node to be created to run this tests.

2) Daily pipeline to run tests for all the modules, which apply destroy them when tests are completed.

Same as our apply pipeline, a pipeline runs every day at midnight(some schedule agreed by team), applies all the latest version modules on some cluster and destroys them.

3) Create a separate pipeline for every module, which should trigger when ever the changes merged to the master in the module repo. (these pipelines should be grouped together.

module changes pipelines:

Same as our namespace changes pipeline, a pipeline runs whenever there is a change in any of the modules master branch (before creating a release with new module version).

Where do we keep these tests/data/code?

Infrastructure repo Environments repo Individual module repo .

Ideal to keep them in the individual module repo.

Spike references:

https://github.com/ministryofjustice/cloud-platform-environments/tree/module-test/namespaces/mogaal.cloud-platform.service.justice.gov.uk

https://github.com/ministryofjustice/cloud-platform-concourse/blob/module-test-pipelines/pipelines/mogaal/main/moduletest.yaml

AntonyBishop commented 3 years ago

Replacing out of date story.