Skip to content

Commit

Permalink
Update deploy to large resource class in config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vanderhoop committed May 18, 2022
1 parent 8fe9b42 commit 16f54b4
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
version: 2 # use CircleCI 2.0 instead of CircleCI Classic
jobs: # basic units of work in a run
build: # runs not using Workflows must have a `build` job as entry point
parallelism: 1 # run only one instance of this job in parallel
docker: # run the steps with Docker
version: 2 # use CircleCI 2.0 instead of CircleCI Classic
jobs: # basic units of work in a run
build: # runs not using Workflows must have a `build` job as entry point
parallelism: 1 # run only one instance of this job in parallel
docker: # run the steps with Docker
- image: circleci/elixir:1.10.2-node-browsers
environment: # environment variables for primary container
environment: # environment variables for primary container
MIX_ENV: test
- image: cimg/postgres:13.6-postgis # database image

working_directory: ~/app # directory where steps will run
working_directory: ~/app # directory where steps will run

steps: # commands that comprise the `build` job
- checkout # check out source code to working directory
steps: # commands that comprise the `build` job
- checkout # check out source code to working directory

- run: mix local.hex --force # install Hex locally (without prompt)
- run: mix local.rebar --force # fetch a copy of rebar (without prompt)
- run: mix local.hex --force # install Hex locally (without prompt)
- run: mix local.rebar --force # fetch a copy of rebar (without prompt)

- restore_cache: # restores saved mix cache
keys: # list of cache keys, in decreasing specificity
- restore_cache: # restores saved mix cache
keys: # list of cache keys, in decreasing specificity
- v4-mix-cache-{{ .Branch }}-{{ checksum "mix.lock" }}
- v4-mix-cache-{{ .Branch }}
- v4-mix-cache
- restore_cache: # restores saved build cache
- restore_cache: # restores saved build cache
keys:
- v4-build-cache-{{ .Branch }}
- v4-build-cache
- run: mix do deps.get, compile # get updated dependencies & compile them
- run: mix do deps.get, compile # get updated dependencies & compile them
- restore_cache:
name: Restore Yarn Package Cache
keys:
Expand All @@ -41,13 +41,13 @@ jobs: # basic units of work in a run
key: v1-yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- node_modules/
- save_cache: # generate and store cache so `restore_cache` works
- save_cache: # generate and store cache so `restore_cache` works
key: v4-mix-cache-{{ .Branch }}-{{ checksum "mix.lock" }}
paths: "deps"
- save_cache: # make another less specific cache
- save_cache: # make another less specific cache
key: v4-mix-cache-{{ .Branch }}
paths: "deps"
- save_cache: # you should really save one more cache just in case
- save_cache: # you should really save one more cache just in case
key: v4-mix-cache
paths: "deps"
- save_cache: # don't forget to save a *build* cache, too
Expand All @@ -57,7 +57,7 @@ jobs: # basic units of work in a run
key: v4-build-cache
paths: "_build"

- run: # special utility that stalls main process until DB is ready
- run: # special utility that stalls main process until DB is ready
name: Wait for DB
command: dockerize -wait tcp://localhost:5432 -timeout 1m

Expand All @@ -72,8 +72,7 @@ jobs: # basic units of work in a run
mix test --only feature_test;
fi
- store_test_results: # upload test results for display in Test Summary
- store_test_results: # upload test results for display in Test Summary
path: _build/test/junit
- store_artifacts:
path: screenshots
Expand Down Expand Up @@ -104,6 +103,8 @@ jobs: # basic units of work in a run
name: Notify HoneyBadger of Deploy
command: |
curl --data "deploy[environment]=production&deploy[revision]=$CIRCLE_SHA1&deploy[repository]=https://github.com/stride-nyc/remote_retro&api_key=$HONEYBADGER_API_KEY" "https://api.honeybadger.io/v1/deploys"
# The resource_class feature allows configuring CPU and RAM resources for each job. Different resource classes are available for different executors. https://circleci.com/docs/2.0/configuration-reference/#resourceclass
resource_class: large

workflows:
version: 2
Expand Down

0 comments on commit 16f54b4

Please sign in to comment.