@@ -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
3636commit status check.
3737
3838Suppose the environment branches have been hydrated from the `main` branch and that the branches have the following
3939commit 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
5151For 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
5858spec:
59- sha: a1b2c3 # env /dev
59+ sha: a1b2c3 # environment /dev
6060 phase: success
6161---
6262kind: CommitStatus
6363metadata:
6464 labels:
6565 promoter.argoproj.io/commit-status: healthy
6666spec:
67- sha: a7b8c9 # env/stg
67+ sha: a7b8c9 # environment/test
6868 phase: success
6969---
7070kind: CommitStatus
7171metadata:
7272 labels:
7373 promoter.argoproj.io/commit-status: healthy
7474spec:
75- sha: a3b4c5 # env/prd
75+ sha: a3b4c5 # environment/prod
7676 phase: success
7777---
7878kind: CommitStatus
7979metadata:
8080 labels:
8181 promoter.argoproj.io/commit-status: deployment-freeze
8282spec:
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
107107kind: ChangeTransferPolicy
108108spec:
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`
121121CommitStatus will look like this :
122122
123123` ` ` yaml
@@ -126,10 +126,10 @@ metadata:
126126 labels:
127127 promoter.argoproj.io/commit-status: promoter-previous-environment
128128spec:
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
134134how the PromotionStrategy controller expresses its opinion of the proposed commit on the stg environment, i.e. that it
135135is acceptable because the previous environment is healthy.
0 commit comments