-
Notifications
You must be signed in to change notification settings - Fork 541
/
canary-pipeline.yml
64 lines (64 loc) · 2.12 KB
/
canary-pipeline.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
pipeline:
name: Canary
identifier: Canary
projectIdentifier: default_project
orgIdentifier: default
tags: {}
stages:
- stage:
name: hello_http
identifier: hello_http
description: ""
type: Deployment
spec:
deploymentType: GoogleCloudFunctions
deploymentMetadata:
environmentType: GenTwo
service:
serviceRef: hello_http
serviceInputs:
serviceDefinition:
type: GoogleCloudFunctions
spec:
artifacts:
primary:
primaryArtifactRef: <+input>
sources: <+input>
environment:
environmentRef: harnessdevenv
deployToAll: false
infrastructureDefinitions:
- identifier: gcpk8s
execution:
steps:
- stepGroup:
name: Canary Deployment
identifier: canaryDepoyment
steps:
- step:
name: Deploy Cloud Function With No Traffic
identifier: deployCloudFunctionWithNoTraffic
type: DeployCloudFunctionWithNoTraffic
timeout: 10m
spec: {}
- step:
name: Cloud Function Traffic Shift
identifier: cloudFunctionTrafficShiftFirst
type: CloudFunctionTrafficShift
timeout: 10m
spec:
trafficPercent: 10
- step:
name: Cloud Function Traffic Shift
identifier: cloudFunctionTrafficShiftSecond
type: CloudFunctionTrafficShift
timeout: 10m
spec:
trafficPercent: 100
tags: {}
failureStrategies:
- onFailure:
errors:
- AllErrors
action:
type: StageRollback