This ruby lambda notifies privately the author of a failed commit on CircleCi.
- Node.js (& npm) :
brew install node
- Serverless :
npm install serverless -g
- AWS CLI :
brew install awscli
- Ruby
git clone git@github.com:honestica/lambda-circleci-notifications-example.git
cd lambda-circleci-notifications-example
bundle install
sls config credentials --provider aws --key AWS_KEY --secret AWS_SECRET
aws --region eu-west-1 ssm put-parameter --name circleci-notifications-slack-token --value top-secret-value --type String
aws --region eu-west-1 ssm put-parameter --cli-input-json '{
"Name": "circleci-notifications-sentry-dsn",
"Value": "https://secret.url",
"Type": "String"
}'
bundle exec rspec spec
You will need to run bundle install --deployment
before deploying from your laptop.
- Initial deploy :
sls deploy -s dev
- Function only deploy :
sls deploy function -f circleciNotifications -s dev
- Initial deploy :
sls deploy -s prod
- Function only deploy :
sls deploy function -f circleciNotifications -s prod