File tree Expand file tree Collapse file tree 3 files changed +60
-0
lines changed Expand file tree Collapse file tree 3 files changed +60
-0
lines changed Original file line number Diff line number Diff line change @@ -237,3 +237,15 @@ jobs:
237237 run : ./gradlew saveArtifactSizeMetrics -Prelease=${{ github.event.release.tag_name }}
238238 - name : Put Artifact Size Metrics in CloudWatch
239239 run : ./gradlew putArtifactSizeMetricsInCloudWatch -Prelease=${{ github.event.release.tag_name }}
240+ - name : Emit success metric
241+ if : ${{ success() }}
242+ run : |
243+ echo "::error ::Failed to collect and emit release artifact size metrics. Attempting to emit error metric to"
244+ echo "::error ::CloudWatch..."
245+ aws cloudwatch put-metric-data --namespace "Artifact Metrics" --metric-data file://./resources/artifact-metrics-collection-success.json
246+ - name : Emit failure metric
247+ if : ${{ failure() }}
248+ run : |
249+ echo "::error ::Failed to collect and emit release artifact size metrics. Attempting to emit error metric to"
250+ echo "::error ::CloudWatch..."
251+ aws cloudwatch put-metric-data --namespace "Artifact Metrics" --metric-data file://./resources/artifact-metrics-collection-failure.json
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "Dimensions" : [
4+ {
5+ "Name" : " Project" ,
6+ "Value" : " aws-sdk-kotlin"
7+ }
8+ ],
9+ "MetricName" : " CollectionsAttempted" ,
10+ "Unit" : " Count" ,
11+ "Value" : 1
12+ },
13+ {
14+ "Dimensions" : [
15+ {
16+ "Name" : " Project" ,
17+ "Value" : " aws-sdk-kotlin"
18+ }
19+ ],
20+ "MetricName" : " CollectionsFailed" ,
21+ "Unit" : " Count" ,
22+ "Value" : 1
23+ }
24+ ]
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "Dimensions" : [
4+ {
5+ "Name" : " Project" ,
6+ "Value" : " aws-sdk-kotlin"
7+ }
8+ ],
9+ "MetricName" : " CollectionsAttempted" ,
10+ "Unit" : " Count" ,
11+ "Value" : 1
12+ },
13+ {
14+ "Dimensions" : [
15+ {
16+ "Name" : " Project" ,
17+ "Value" : " aws-sdk-kotlin"
18+ }
19+ ],
20+ "MetricName" : " CollectionsSucceeded" ,
21+ "Unit" : " Count" ,
22+ "Value" : 1
23+ }
24+ ]
You can’t perform that action at this time.
0 commit comments