Skip to content

Commit

Permalink
Add environments diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
stefaniuk committed Sep 12, 2023
1 parent 4759640 commit 8c7ca53
Showing 1 changed file with 53 additions and 21 deletions.
74 changes: 53 additions & 21 deletions docs/developer-guides/CICD_pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

- [Developer Guide: CI/CD pipeline](#developer-guide-cicd-pipeline)
- [The pipeline high-level workflow model](#the-pipeline-high-level-workflow-model)
- [Stage triggers](#stage-triggers)
- [Workflow stages](#workflow-stages)
- [End-to-end workflow stages](#end-to-end-workflow-stages)
- [Stage triggers](#stage-triggers)
- [Branch review workflow](#branch-review-workflow)
- [PR review workflow](#pr-review-workflow)
- [Publish workflow](#publish-workflow)
- [Deploy workflow](#deploy-workflow)
- [Rollback workflow](#rollback-workflow)
- [Environments and artefact promotion](#environments-and-artefact-promotion)
- [Resources](#resources)

## The pipeline high-level workflow model
Expand All @@ -21,26 +22,6 @@ flowchart LR
Deploy --> Rollback
```

## Stage triggers

| Workflow | Stage | `main` branch trigger | Task branch trigger |
|---------:|:------------------------|:---------------------------:|:----------------------:|
| Review | Commit (local githooks) | - | on commit |
| Review | Commit (remote) | on push | on push |
| Review | Test | on push | on push |
| Review | Build | on push | on push, if PR is open |
| Review | Acceptance | on push | on push, if PR is open |
| Publish | Publish | on tag | - |
| Deploy | Deploy | on tag | - |
| Rollback | Rollback | on demand or on healthcheck | - |

- Publish:
- When merged, create snapshot release
- When tagged, crate Release Candidate
- Deploy
- Only deploy RCs
- Deploy to specified environment

## Workflow stages

### End-to-end workflow stages
Expand All @@ -56,6 +37,26 @@ flowchart LR
Deploy --> Rollback
```

### Stage triggers

| Workflow | Stage | `main` branch trigger | Task branch trigger |
|---------:|:------------------------|:---------------------------:|:----------------------:|
| Review | Commit (local githooks) | - | on commit |
| Review | Commit (remote) | on merge | on push |
| Review | Test | on merge | on push |
| Review | Build | on merge | on push, if PR is open |
| Review | Acceptance | on merge | on push, if PR is open |
| Publish | Publish | on tag | - |
| Deploy | Deploy | on tag | - |
| Rollback | Rollback | on demand or on healthcheck | - |

- Publish:
- When merged, create snapshot release
- When tagged, crate Release Candidate
- Deploy
- Only deploy RCs
- Deploy to specified environment

### Branch review workflow

```mermaid
Expand Down Expand Up @@ -234,6 +235,37 @@ flowchart LR
deploy["Deploy"] --> rollback
```

## Environments and artefact promotion

```mermaid
flowchart LR
subgraph branch_review["Branch review"]
direction LR
bA("`**local**`")
end
subgraph pr_review["PR Review"]
direction LR
prA["`**ephemeral**
dev environments`"]
prB["`automated acceptance
**test** environments`"]
prA --> prB
end
subgraph deploy1["Deploy (high-instance)"]
direction LR
d1A["`**non-prod**
environments`"]
end
subgraph deploy2["Deploy (Live)"]
direction LR
d2A["`**prod**
environment`"]
end
branch_review --> pr_review
pr_review --> deploy1
deploy1 --> deploy2
```

## Resources

- Blog post [Going faster with continuous delivery](https://aws.amazon.com/builders-library/going-faster-with-continuous-delivery/)
Expand Down

0 comments on commit 8c7ca53

Please sign in to comment.