Skip to content

Commit 5e9c067

Browse files
committed
add codepipeline test commands and configuration parameters
1 parent 673fa1d commit 5e9c067

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

Makefile

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,21 @@ deps:
1515
.PHONY: test
1616
test:
1717
@test -s $(CONFIG_FILE) || { echo "No lambda config file. Update deploy.env.example and copy it to deploy.env"; exit 1; }
18-
AWS_REGION=$(AWS_REGION) $(LAMBDA_TEST) --configFile=$(CONFIG_FILE) run -x test/context.json -j test/sns-cloudwatch-event.json
18+
AWS_REGION=$(AWS_REGION) $(LAMBDA_TEST) --configFile=$(CONFIG_FILE) run -x test/context.json -j test/sns-codedeploy-event.json
19+
20+
.PHONY: test-codepipeline
21+
test-codepipeline:
22+
@test -s $(CONFIG_FILE) || { echo "No lambda config file. Update deploy.env.example and copy it to deploy.env"; exit 1; }
23+
AWS_REGION=$(AWS_REGION) $(LAMBDA_TEST) --configFile=$(CONFIG_FILE) run -x test/context.json -j test/sns-codepipeline-event-pipeline-started.json
24+
AWS_REGION=$(AWS_REGION) $(LAMBDA_TEST) --configFile=$(CONFIG_FILE) run -x test/context.json -j test/sns-codepipeline-event-stage-started.json
25+
AWS_REGION=$(AWS_REGION) $(LAMBDA_TEST) --configFile=$(CONFIG_FILE) run -x test/context.json -j test/sns-codepipeline-event-stage-succeeded.json
26+
AWS_REGION=$(AWS_REGION) $(LAMBDA_TEST) --configFile=$(CONFIG_FILE) run -x test/context.json -j test/sns-codepipeline-event-stage-failed.json
27+
1928

2029
.PHONY: test-all
21-
test-all: test
30+
test-all: test test-codepipeline
31+
AWS_REGION=$(AWS_REGION) $(LAMBDA_TEST) --configFile=$(CONFIG_FILE) run -x test/context.json -j test/sns-cloudwatch-event.json
32+
AWS_REGION=$(AWS_REGION) $(LAMBDA_TEST) --configFile=$(CONFIG_FILE) run -x test/context.json -j test/sns-codepipeline-event.json
2233
AWS_REGION=$(AWS_REGION) $(LAMBDA_TEST) --configFile=$(CONFIG_FILE) run -x test/context.json -j test/sns-event.json
2334
AWS_REGION=$(AWS_REGION) $(LAMBDA_TEST) --configFile=$(CONFIG_FILE) run -x test/context.json -j test/sns-elastic-beanstalk-event.json
2435
AWS_REGION=$(AWS_REGION) $(LAMBDA_TEST) --configFile=$(CONFIG_FILE) run -x test/context.json -j test/sns-codedeploy-event.json
@@ -39,4 +50,4 @@ deploy:
3950
--secretKey $(AWS_ACCESS_KEY_SECRET) \
4051
--region $(AWS_REGION) \
4152
--configFile $(CONFIG_FILE) \
42-
--profile $(AWS_PROFILE)
53+
--profile $(AWS_PROFILE)

config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ module.exports = {
1717
// text in the sns message or topicname to match on to process this service type
1818
match_text: "CloudWatchNotifications"
1919
},
20+
codepipeline: {
21+
// text in the sns message or topicname to match on to process this service type
22+
match_text: "CodePipelineNotifications"
23+
},
2024
codedeploy: {
2125
// text in the sns message or topicname to match on to process this service type
2226
match_text: "CodeDeploy"
@@ -31,4 +35,4 @@ module.exports = {
3135
}
3236
}
3337

34-
}
38+
}

0 commit comments

Comments
 (0)