mirror of
https://github.com/offen/website.git
synced 2024-11-24 09:50:27 +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: |
|
command: |
|
||||||
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
||||||
echo 'export TARGET_ENVIRONMENT="production"' >> $BASH_ENV
|
echo 'export TARGET_ENVIRONMENT="production"' >> $BASH_ENV
|
||||||
|
echo 'export DOCKER_IMAGE_TAG="stable"' >> $BASH_ENV
|
||||||
else
|
else
|
||||||
echo 'export TARGET_ENVIRONMENT="staging"' >> $BASH_ENV
|
echo 'export TARGET_ENVIRONMENT="staging"' >> $BASH_ENV
|
||||||
|
echo 'export DOCKER_IMAGE_TAG="latest"' >> $BASH_ENV
|
||||||
fi
|
fi
|
||||||
- run:
|
- run:
|
||||||
name: Run database migrations
|
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:
|
- run:
|
||||||
name: Deploy
|
name: Deploy
|
||||||
command: |
|
command: |
|
||||||
|
Loading…
Reference in New Issue
Block a user