Skip to content

Commit

Permalink
TEST don't install SAM
Browse files Browse the repository at this point in the history
  • Loading branch information
symroe committed Jul 19, 2023
1 parent 34a0649 commit 6b0a2cc
Showing 1 changed file with 16 additions and 28 deletions.
44 changes: 16 additions & 28 deletions .circleci/config.yml
Expand Up @@ -114,18 +114,14 @@ jobs:
- run:
name: sam build
command: |
python -m venv .venv
. .venv/bin/activate
pip install --upgrade pip
pip install aws-sam-cli==1.89.0 awscli==1.28.0
make build clean
- persist_to_workspace:
root: ~/repo/
paths: [ .aws-sam/build/ ]

sam_deploy:
docker:
- image: cimg/python:3.10.4
- image: public.ecr.aws/sam/build-python3.10:latest
working_directory: ~/repo
parameters:
dc-environment:
Expand All @@ -145,23 +141,15 @@ jobs:
DC_ENVIRONMENT: <<parameters.dc-environment>>
steps:
- checkout
- restore_cache:
keys:
- v6-dependencies-{{ checksum "requirements/base.txt" }}-{{ checksum "requirements/testing.txt" }}
# - restore_cache:
# keys:
# - v6-dependencies-{{ checksum "requirements/base.txt" }}-{{ checksum "requirements/testing.txt" }}
- attach_workspace:
at: ~/repo/
- run: echo <<parameters.instance-type>>
- run:
name: install sam-cli
command: |
python -m venv .venv
. .venv/bin/activate
pip install --upgrade pip
pip install aws-sam-cli==1.89.0 awscli==1.28.0
- run:
name: deploy
command: |
. .venv/bin/activate
sam deploy \
--no-confirm-changeset \
--config-file ~/repo/samconfig.toml \
Expand All @@ -184,16 +172,16 @@ jobs:
InstanceType='<<parameters.instance-type>>' \
Domain='<<parameters.domain>>'
"
- run:
name: post deploy tests
command: |
. .venv/bin/activate
pytest ~/repo/.circleci/
- run:
name: migrate the database
command: |
. .venv/bin/activate
make lambda-migrate
# - run:
# name: post deploy tests
# command: |
# . .venv/bin/activate
# pytest ~/repo/.circleci/
# - run:
# name: migrate the database
# command: |
# . .venv/bin/activate
# make lambda-migrate
# In the event the deployment has failed, alert the dev team
- slack/notify:
event: fail
Expand Down Expand Up @@ -271,7 +259,7 @@ workflows:
- build_and_test
- sam_build
context: [ deployment-development-wcivf, slack-secrets ]
filters: { branches: { only: [ main, master, staging ] } }
filters: { branches: { only: [ main, master, staging, hotfix/make-token-more-unique ] } }

- code_deploy:
name: code_deploy_development
Expand All @@ -284,7 +272,7 @@ workflows:
- sam_build
- sam_deploy_development
context: [ deployment-development-wcivf, slack-secrets ]
filters: { branches: { only: [ main, master, staging ] } }
filters: { branches: { only: [ main, master, staging, hotfix/make-token-more-unique ] } }

- sam_deploy:
name: sam_deploy_staging
Expand Down

0 comments on commit 6b0a2cc

Please sign in to comment.