Skip to content

Commit

Permalink
Pull proper content cards during docker build (mozilla#6743)
Browse files Browse the repository at this point in the history
Also pull proper database during build for staging.
  • Loading branch information
pmac authored and jgmize committed Jan 23, 2019
1 parent 9949839 commit 17af0b5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
7 changes: 6 additions & 1 deletion bedrock/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1288,9 +1288,14 @@ def get_app_name(hostname):
}
}

if DEV:
content_cards_default_branch = 'master-processed'
else:
content_cards_default_branch = 'prod-processed'

CONTENT_CARDS_PATH = config('CONTENT_CARDS_PATH', default=path('content_cards'))
CONTENT_CARDS_REPO = config('CONTENT_CARDS_REPO', default='https://github.com/mozmeao/www-admin.git')
CONTENT_CARDS_BRANCH = config('CONTENT_CARDS_BRANCH', default='master-processed')
CONTENT_CARDS_BRANCH = config('CONTENT_CARDS_BRANCH', default=content_cards_default_branch)
CONTENT_CARDS_URL = config('CONTENT_CARDS_URL', default=STATIC_URL)

RELEASE_NOTES_PATH = config('RELEASE_NOTES_PATH', default=path('release_notes'))
Expand Down
3 changes: 2 additions & 1 deletion bin/run-sync-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ if [ ! -e ./manage.py ]; then
fi

case "$BRANCH_NAME" in
"stage" | "prod") ENV_FILE=prod ;;
"stage") ENV_FILE=stage ;;
"prod") ENV_FILE=prod ;;
*) ENV_FILE=master ;;
esac

Expand Down
3 changes: 2 additions & 1 deletion docker/envfiles/prod.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ DEBUG=False
DEV=False
ALLOWED_HOSTS=*
SECRET_KEY=59114b6a-2858-4caf-8878-482a24ee9542
AWS_DB_S3_BUCKET=bedrock-db-prod
PROD_DETAILS_STORAGE=product_details.storage.PDDatabaseStorage
AWS_DB_S3_BUCKET=bedrock-db-prod
CONTENT_CARDS_BRANCH=prod-processed
8 changes: 8 additions & 0 deletions docker/envfiles/stage.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# used for fetching data for staging images
DEBUG=False
DEV=False
ALLOWED_HOSTS=*
SECRET_KEY=59114b6a-2858-4caf-8878-482a24ee9542
PROD_DETAILS_STORAGE=product_details.storage.PDDatabaseStorage
AWS_DB_S3_BUCKET=bedrock-db-stage
CONTENT_CARDS_BRANCH=stage-processed

0 comments on commit 17af0b5

Please sign in to comment.