Created
December 8, 2018 17:46
-
-
Save EtienneDepaulis/71e85b08b0111347daa58105638c4dbd to your computer and use it in GitHub Desktop.
CircleCi notifications article - CircleCI final configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .circleci/config.yml | |
version: 2 | |
jobs: | |
test: | |
docker: | |
- image: circleci/ruby:2.5.3-node-browsers | |
working_directory: ~/repo | |
steps: | |
- checkout | |
- restore_cache: | |
keys: | |
- gems-{{ checksum "Gemfile.lock" }} | |
- run: | |
name: Install dependencies | |
command: | | |
bundle install --path vendor/bundle | |
- save_cache: | |
key: gems-{{ checksum "Gemfile.lock" }} | |
paths: | |
- ~/repo/vendor/bundle | |
- run: | |
name: Run specs | |
command: bundle exec rspec spec | |
- store_test_results: | |
path: ~/rspec | |
deploy_prod: | |
docker: | |
- image: circleci/ruby:2.5.3-node-browsers | |
working_directory: ~/repo | |
steps: | |
- checkout | |
- restore_cache: | |
keys: | |
- gems-{{ checksum "Gemfile.lock" }} | |
- run: bundle --path vendor/bundle | |
- run: | |
name: Install Serverless CLI | |
command: | | |
sudo npm i -g serverless | |
- run: | |
name: Deploy | |
command: sls deploy -s prod | |
workflows: | |
version: 2 | |
main: | |
jobs: | |
- test | |
- deploy_prod: | |
requires: | |
- test | |
filters: | |
branches: | |
only: master | |
notify: | |
webhooks: | |
- url: https://execute-api.eu-west-1.amazonaws.com/prod/notify_author |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment