forked from idan-codefresh/promotion-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpromotionFlow-demo.yml
42 lines (38 loc) · 1.67 KB
/
promotionFlow-demo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# PromotionFlow Configuration
# This Custom Resource Definition (CRD) orchestrates the promotion of applications across multiple environments in Codefresh.
# Triggering starts from a designated "trigger environment," indicated by a commit message formatted as "[promotion:{promotionFlow-name}]", e.g., "[promotion:demo]".
# The `postTrigger` defines an Argo Workflow that is executed post-update, used primarily for validation or testing.
# The `steps` list outlines the stages of promotion, with detailed configuration provided for the first environment as an example.
apiVersion: codefresh.io/v1beta1
kind: PromotionFlow
metadata:
name: demo
annotations:
version: 0.0.1
description: Flow to show parallel deployment
spec:
triggerEnvironment: dev # Initiates the promotion process based on updates in this environment.
postTrigger: post-action # Argo Workflow executed following updates in the trigger environment.
steps:
- environment: qa # First environment in the promotion sequence.
dependsOn:
- dev # Depends on successful update in 'dev' environment.
policy:
preAction: pre-action # Argo Workflow executed to prepare the environment before promotion.
postAction: smoketests # Argo Workflow for validation post-promotion.
action: commit # Automatically progresses to the next promotion stage.
- environment: staging
dependsOn:
- dev
policy:
preAction: pre-action
postAction: post-action
action: commit
- environment: production
dependsOn:
- staging
- qa
policy:
preAction: pre-action
postAction: post-action
action: commit