mirror of
https://github.com/offen/website.git
synced 2024-12-25 14:20:22 +01:00
choose correct docker image for running db migrations
This commit is contained in:
parent
ce1b045fc3
commit
36f555c086
@ -86,12 +86,14 @@ jobs:
|
||||
command: |
|
||||
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
||||
echo 'export TARGET_ENVIRONMENT="production"' >> $BASH_ENV
|
||||
echo 'export DOCKER_IMAGE_TAG="stable"' >> $BASH_ENV
|
||||
else
|
||||
echo 'export TARGET_ENVIRONMENT="staging"' >> $BASH_ENV
|
||||
echo 'export DOCKER_IMAGE_TAG="latest"' >> $BASH_ENV
|
||||
fi
|
||||
- run:
|
||||
name: Run database migrations
|
||||
command: docker run -it offen/offen:latest migrate -conn $(aws secretsmanager get-secret-value --secret-id $TARGET_ENVIRONMENT/postgresConnectionString | jq -r '.SecretString')
|
||||
command: docker run -it offen/offen:$DOCKER_IMAGE_TAG migrate -conn $(aws secretsmanager get-secret-value --secret-id $TARGET_ENVIRONMENT/postgresConnectionString | jq -r '.SecretString')
|
||||
- run:
|
||||
name: Deploy
|
||||
command: |
|
||||
|
Loading…
Reference in New Issue
Block a user