7
7
8
8
android :
circleci/[email protected]
9
9
flutter-orb :
circleci/[email protected]
10
+ aws-cli :
circleci/[email protected]
10
11
11
12
executors :
12
13
mac-executor :
20
21
resource_class : large
21
22
22
23
commands :
24
+ send-metric-on-fail :
25
+ description : Send failure datapoint to cloudwatch
26
+ steps :
27
+ - run :
28
+ name : Send failure datapoint to cloudwatch
29
+ command : |
30
+ payload="{\"jobName\": \"${CIRCLE_JOB}\", \"projectRepoName\": \"${CIRCLE_PROJECT_REPONAME}\"}"
31
+ echo $payload
32
+ aws lambda invoke --function-name CircleCIWorkflowFailureHandler --payload "$payload" --cli-binary-format raw-in-base64-out response.json
33
+ when : on_fail
23
34
run-with-retry :
24
35
description : Run command with retry
25
36
parameters :
@@ -115,6 +126,10 @@ orbs:
115
126
steps :
116
127
- checkout :
117
128
path : ~/flutter-canaries
129
+ - aws-cli/setup :
130
+ role-session-name : ${CIRCLE_WORKFLOW_JOB_ID}
131
+ role-arn : ${AWS_ROLE_ARN}
132
+ session-duration : ' 2000'
118
133
- install-flutter :
119
134
flutter_branch : << parameters.flutter-version >>
120
135
- run :
@@ -143,6 +158,7 @@ orbs:
143
158
command : flutter test integration_test
144
159
no_output_timeout : 1h
145
160
retry-count : 5
161
+ - send-metric-on-fail
146
162
147
163
flutter-ios :
148
164
parameters :
@@ -153,6 +169,10 @@ orbs:
153
169
steps :
154
170
- checkout :
155
171
path : ~/flutter-canaries
172
+ - aws-cli/setup :
173
+ role-session-name : ${CIRCLE_WORKFLOW_JOB_ID}
174
+ role-arn : ${AWS_ROLE_ARN}
175
+ session-duration : ' 2000'
156
176
- run :
157
177
name : Install gnu-sed
158
178
command : brew install gnu-sed
@@ -179,6 +199,7 @@ orbs:
179
199
label : Run Flutter Tests
180
200
command : flutter test integration_test
181
201
no_output_timeout : 20m
202
+ - send-metric-on-fail
182
203
183
204
184
205
executors :
@@ -451,10 +472,14 @@ workflows:
451
472
- equal : [ "Canaries", << pipeline.schedule.name >> ]
452
473
jobs :
453
474
- getting-started-smoke-test/flutter-android :
475
+ context :
476
+ - cloudwatch-monitoring
454
477
matrix :
455
478
parameters :
456
479
flutter-version : [ "stable", "beta" ]
457
480
- getting-started-smoke-test/flutter-ios :
481
+ context :
482
+ - cloudwatch-monitoring
458
483
matrix :
459
484
parameters :
460
485
flutter-version : [ "stable", "beta" ]
0 commit comments