Skip to content

Commit 431941c

Browse files
Merge pull request #364 from code-dot-org/smoketest
Run smoke tests after prod deploy
2 parents c7277e5 + 9621235 commit 431941c

File tree

2 files changed

+35
-12
lines changed

2 files changed

+35
-12
lines changed

cicd/2-cicd/cicd.template.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,28 @@ Resources:
395395
Capabilities: CAPABILITY_AUTO_EXPAND
396396
RoleArn: !Sub arn:aws:iam::${AWS::AccountId}:role/admin/CloudFormationService
397397
- !Ref AWS::NoValue
398+
399+
- !If
400+
- DeployForProduction
401+
- Name: Smoke_Test
402+
Actions:
403+
- Name: smoke-test
404+
ActionTypeId:
405+
Category: Build
406+
Owner: AWS
407+
Provider: CodeBuild
408+
Version: 1
409+
InputArtifacts:
410+
- Name: sourceCode
411+
Configuration:
412+
ProjectName: !Ref IntegrationTestBuildProject
413+
EnvironmentVariables: !Sub
414+
- '[{"name":"APP_SUBDOMAIN","value":"${SUBDOMAIN}","type":"PLAINTEXT"},{"name":"APP_BASE_DOMAIN","value":"${BASE_DOMAIN}","type":"PLAINTEXT"}]'
415+
- BASE_DOMAIN: code.org
416+
SUBDOMAIN: !If [TargetsMainBranch, "javabuilder", !Sub "javabuilder-${GitHubBranch}"]
417+
OutputArtifacts:
418+
- Name: smokeTestResults
419+
- !Ref AWS::NoValue
398420

399421
# Send pipeline events to an SNS topic.
400422
# Note:

cicd/3-app/javabuilder/template.yml.erb

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -645,25 +645,26 @@ Resources:
645645
HighUsageCompositeAlarm:
646646
Type: AWS::CloudWatch::CompositeAlarm
647647
DependsOn:
648+
- ConsoleHighInvocationsAlarm
648649
- HighHttpRequestsAlarm
649-
- HighWebsocketConnectionsAlarm
650-
- NeighborhoodHighInvocationsAlarm
651-
- TheaterHighInvocationsAlarm
650+
- HighWebsocketConnectionsAlarm
651+
- NeighborhoodHighInvocationsAlarm
652+
- TheaterHighInvocationsAlarm
652653
Properties:
653654
ActionsEnabled: true
654655
AlarmActions:
655-
# TODO: after we have run at high usage for a while, consider re-enabling this alarm. Right now it is too noisy
656-
# - !If [SilenceAlertsCondition, !Ref AWS::NoValue, !Sub "arn:aws:sns:${AWS::Region}:${AWS::AccountId}:javabuilder-high-usage"]
657-
- !Ref AWS::NoValue
656+
# TODO: after we have run at high usage for a while, consider re-enabling this alarm. Right now it is too noisy
657+
# - !If [SilenceAlertsCondition, !Ref AWS::NoValue, !Sub "arn:aws:sns:${AWS::Region}:${AWS::AccountId}:javabuilder-high-usage"]
658+
- !Ref AWS::NoValue
658659
AlarmDescription: Send message if abnormally high Javabuilder usage detected.
659-
Monitors usage across the HTTP API, WebSocket API, and all Build and Run
660-
Lambdas.
660+
Monitors usage across the HTTP API, WebSocket API, and all Build and Run
661+
Lambdas.
661662
AlarmName: !Sub "${SubDomainName}_high_usage_composite"
662663
AlarmRule: !Sub "ALARM(${SubDomainName}_console_high_invocations) OR
663-
ALARM(${SubDomainName}_high_http_requests) OR
664-
ALARM(${SubDomainName}_high_websocket_connections) OR
665-
ALARM(${SubDomainName}_neighborhood_high_invocations) OR
666-
ALARM(${SubDomainName}_theater_high_invocations)"
664+
ALARM(${SubDomainName}_high_http_requests) OR
665+
ALARM(${SubDomainName}_high_websocket_connections) OR
666+
ALARM(${SubDomainName}_neighborhood_high_invocations) OR
667+
ALARM(${SubDomainName}_theater_high_invocations)"
667668
InsufficientDataActions: []
668669
OKActions: []
669670

0 commit comments

Comments
 (0)