File tree Expand file tree Collapse file tree 2 files changed +34
-4
lines changed
Expand file tree Collapse file tree 2 files changed +34
-4
lines changed Original file line number Diff line number Diff line change 9696 NEW_PASSWORD : ${{ secrets.NEW_PASSWORD }}
9797 VALID_PASSWORD : ${{ secrets.VALID_PASSWORD }}
9898
99- trigger -failure-alarm :
100- # Triggers an alarm if any of builds failed.
99+ log -failure-metric :
100+ # Send data point 1 to metric RunTimeTestsFailure, if failure
101101 runs-on : ubuntu-latest
102102 environment : ci
103103 needs : build
@@ -111,8 +111,8 @@ jobs:
111111 aws-region : us-east-1
112112 - run : aws cloudwatch put-metric-data --metric-name RunTimeTestsFailure --namespace GithubCanaryApps --value 1
113113
114- trigger-sucess-alarm :
115- # Triggers an alarm if all the builds succeed
114+ log-success-metric :
115+ # Send data point 0 to metric RunTimeTestsFailure, if success
116116 runs-on : ubuntu-latest
117117 environment : ci
118118 needs : build
Original file line number Diff line number Diff line change @@ -167,3 +167,33 @@ jobs:
167167 - name : Run yarn build on each sample app
168168 run : yarn build
169169 working-directory : ./canary
170+
171+ log-failure-metric :
172+ # Send data point 1 to metric RunTimeTestsFailure, if success
173+ runs-on : ubuntu-latest
174+ environment : ci
175+ needs : build
176+ if : ${{ failure() }}
177+ steps :
178+ - name : Configure AWS credentials
179+ uses : aws-actions/configure-aws-credentials@v1
180+ with :
181+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
182+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
183+ aws-region : us-east-1
184+ - run : aws cloudwatch put-metric-data --metric-name publishFailure --namespace GithubCanaryApps --value 1
185+
186+ log-success-metric :
187+ # Send data point 0 to metric RunTimeTestsFailure, if success
188+ runs-on : ubuntu-latest
189+ environment : ci
190+ needs : build
191+ if : ${{ success() }}
192+ steps :
193+ - name : Configure AWS credentials
194+ uses : aws-actions/configure-aws-credentials@v1
195+ with :
196+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
197+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
198+ aws-region : us-east-1
199+ - run : aws cloudwatch put-metric-data --metric-name publishFailure --namespace GithubCanaryApps --value 0
You can’t perform that action at this time.
0 commit comments