Skip to content

Commit

Permalink
get env vars from versionned encrypted repo
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed Dec 16, 2024
1 parent 4dbf608 commit b87e5f3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/review-app-creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
run: |
$CLEVER_CLI link $REVIEW_APP_NAME --org $REVIEW_APPS_ORGANIZATION_NAME
$CLEVER_CLI env set COMMU_FQDN "${{ env.DEPLOY_URL }}"
$CLEVER_CLI env set ENVIRONMENT "REVIEW-APP"
$CLEVER_CLI service link-addon $S3_ADDON
$CLEVER_CLI service link-addon $CONFIGURATION_ADDON
Expand Down
2 changes: 2 additions & 0 deletions clevercloud/pre_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
git clone "$ITOU_SECRETS_HTTPS_REPO_URL" secrets-vault
sops -d secrets-vault/c1/"$ENVIRONMENT".enc.env > .env
4 changes: 4 additions & 0 deletions clevercloud/pre_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cd secrets-vault || exit
git pull
cd - || exit
sops -d secrets-vault/c1/"$ENVIRONMENT".enc.env > .env
2 changes: 1 addition & 1 deletion config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
SECRET_KEY = os.getenv("DJANGO_SECRET_KEY")

DEBUG = os.getenv("DJANGO_DEBUG", "False") == "True"
ENVIRONMENT = Environment.PROD
ENVIRONMENT = os.getenv("ENVIRONMENT", Environment.PROD)

PARKING_PAGE = os.getenv("PARKING_PAGE", "False") == "True"

Expand Down

0 comments on commit b87e5f3

Please sign in to comment.