Skip to content

Commit 0150972

Browse files
authored
docs: README updates (#162)
* docs: README updates Signed-off-by: Michael Crenshaw <[email protected]> * period Signed-off-by: Michael Crenshaw <[email protected]> * conventions matter Signed-off-by: Michael Crenshaw <[email protected]> * conventions matter Signed-off-by: Michael Crenshaw <[email protected]> --------- Signed-off-by: Michael Crenshaw <[email protected]>
1 parent 21e7f9a commit 0150972

File tree

4 files changed

+58
-33
lines changed

4 files changed

+58
-33
lines changed

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,32 @@ The main ideas behind the project are explained in ["Space Age GitOps: The Rise
1515

1616
A live demo is presented in ["Space Age GitOps: Lifting off with Argo Promotions"](https://www.youtube.com/watch?v=2JmLCqM1nTM).
1717

18+
## Example
19+
20+
```yaml
21+
apiVersion: promoter.argoproj.io/v1alpha1
22+
kind: PromotionStrategy
23+
metadata:
24+
name: example-promotion-strategy
25+
spec:
26+
gitRepositoryRef:
27+
name: example-git-repo
28+
activeCommitStatuses:
29+
- key: argocd-app-health
30+
proposedCommitStatuses:
31+
- key: security-scan
32+
environments:
33+
- branch: environment/dev
34+
- branch: environment/test
35+
- branch: environment/prod
36+
autoMerge: false
37+
activeCommitStatuses:
38+
- key: performance-test
39+
proposedCommitStatuses:
40+
- key: deployment-freeze
41+
```
42+
1843
## Getting Started
1944
20-
The project does not have an initial release yet. Peruse [Makefile](Makefile) to get started tinkering and testing. To
21-
understand more about how the project works, check out [the documentation](https://argo-gitops-promoter.readthedocs.io/en/latest/).
45+
The project is currently experimental, please use with caution. See the
46+
[docs site](https://argo-gitops-promoter.readthedocs.io/en/latest/getting-started/) for setup instructions.

docs/example-resources/ChangeTransferPolicy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ metadata:
55
spec:
66
gitRepositoryRef:
77
name: example-git-repository
8-
proposedBranch: env/dev-next
9-
activeBranch: env/dev
8+
proposedBranch: environment/dev-next
9+
activeBranch: environment/dev
1010
activeCommitStatuses:
1111
- key: argocd-app-health
1212
proposedCommitStatuses:

docs/example-resources/PromotionStrategy.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ spec:
1010
proposedCommitStatuses:
1111
- key: security-scan
1212
environments:
13-
- branch: env/dev
14-
- branch: env/test
15-
- branch: env/prod
13+
- branch: environment/dev
14+
- branch: environment/test
15+
- branch: environment/prod
1616
autoMerge: false
1717
activeCommitStatuses:
1818
- key: performance-test
1919
proposedCommitStatuses:
2020
- key: deployment-freeze
2121
status:
2222
environments:
23-
- branch: env/dev
23+
- branch: environment/dev
2424
active:
2525
dry:
2626
sha:
@@ -36,7 +36,7 @@ status:
3636
lastHealthyDryShas:
3737
- sha:
3838
time:
39-
- branch: env/test
39+
- branch: environment/test
4040
# same fields as dev
41-
- branch: env/prod
41+
- branch: environment/prod
4242
# same fields as dev

docs/gating-promotions.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,29 @@ spec:
2424
activeCommitStatuses:
2525
- key: healthy
2626
environments:
27-
- branch: env/dev
28-
- branch: env/stg
29-
- branch: env/prd
27+
- branch: environment/dev
28+
- branch: environment/test
29+
- branch: environment/prod
3030
proposedCommitStatuses:
3131
- key: deployment-freeze
3232
```
3333
34-
In this example, the PromotionStrategy has three environments: `env/dev`, `env/stg`, and `env/prd`. All environments
35-
have a `healthy` active commit status check. The `env/prd` environment has an additional `deployment-freeze` proposed
34+
In this example, the PromotionStrategy has three environments: `environment/dev`, `environment/test`, and `environment/prod`. All environments
35+
have a `healthy` active commit status check. The `environment/prod` environment has an additional `deployment-freeze` proposed
3636
commit status check.
3737

3838
Suppose the environment branches have been hydrated from the `main` branch and that the branches have the following
3939
commit SHAs:
4040

41-
| Branch | SHA |
42-
|----------------|----------|
43-
| `main` | `b5d8f7` |
44-
| `env/dev` | `a1b2c3` |
45-
| `env/dev-next` | `d4e5f6` |
46-
| `env/stg` | `a7b8c9` |
47-
| `env/stg-next` | `d0e1f2` |
48-
| `env/prd` | `a3b4c5` |
49-
| `env/prd-next` | `d6e7f8` |
41+
| Branch | SHA |
42+
|-------------------------|----------|
43+
| `main` | `b5d8f7` |
44+
| `environment/dev` | `a1b2c3` |
45+
| `environment/dev-next` | `d4e5f6` |
46+
| `environment/test` | `a7b8c9` |
47+
| `environment/test-next` | `d0e1f2` |
48+
| `environment/prod` | `a3b4c5` |
49+
| `environment/prod-next` | `d6e7f8` |
5050

5151
For a change to be promoted through all environments, the following CommitStatuses must exist:
5252

@@ -56,31 +56,31 @@ metadata:
5656
labels:
5757
promoter.argoproj.io/commit-status: healthy
5858
spec:
59-
sha: a1b2c3 # env/dev
59+
sha: a1b2c3 # environment/dev
6060
phase: success
6161
---
6262
kind: CommitStatus
6363
metadata:
6464
labels:
6565
promoter.argoproj.io/commit-status: healthy
6666
spec:
67-
sha: a7b8c9 # env/stg
67+
sha: a7b8c9 # environment/test
6868
phase: success
6969
---
7070
kind: CommitStatus
7171
metadata:
7272
labels:
7373
promoter.argoproj.io/commit-status: healthy
7474
spec:
75-
sha: a3b4c5 # env/prd
75+
sha: a3b4c5 # environment/prod
7676
phase: success
7777
---
7878
kind: CommitStatus
7979
metadata:
8080
labels:
8181
promoter.argoproj.io/commit-status: deployment-freeze
8282
spec:
83-
sha: d6e7f8 # env/prd-next
83+
sha: d6e7f8 # environment/prod-next
8484
phase: success
8585
```
8686

@@ -106,8 +106,8 @@ So for the above example, the stg environment's ChangeTransferPolicy CR will loo
106106
```yaml
107107
kind: ChangeTransferPolicy
108108
spec:
109-
sourceBranch: env/stg-next
110-
targetBranch: env/stg
109+
sourceBranch: environment/test-next
110+
targetBranch: environment/test
111111
activeCommitStatuses:
112112
# The controller will monitor this CommitStatus for the active commit SHA, but it will not enforce it. The status
113113
# will be stored on the
@@ -117,7 +117,7 @@ spec:
117117
- key: promoter-previous-environment
118118
```
119119

120-
Assuming the `env/dev` environment has a `healthy` active commit status check, the `promoter-previous-environment`
120+
Assuming the `environment/dev` environment has a `healthy` active commit status check, the `promoter-previous-environment`
121121
CommitStatus will look like this:
122122

123123
```yaml
@@ -126,10 +126,10 @@ metadata:
126126
labels:
127127
promoter.argoproj.io/commit-status: promoter-previous-environment
128128
spec:
129-
sha: d0e1f2 # env/stg-next
129+
sha: d0e1f2 # environment/test-next
130130
phase: success
131131
```
132132

133-
Even though the CommitStatus is "about" the `env/dev` branch, the SHA is the SHA of the `env/stg-next` branch. This is
133+
Even though the CommitStatus is "about" the `environment/dev` branch, the SHA is the SHA of the `environment/test-next` branch. This is
134134
how the PromotionStrategy controller expresses its opinion of the proposed commit on the stg environment, i.e. that it
135135
is acceptable because the previous environment is healthy.

0 commit comments

Comments
 (0)