Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

Commit 4182fb9

Browse files
committed
removed aws creds from django
1 parent 23d3d93 commit 4182fb9

File tree

4 files changed

+16
-18
lines changed

4 files changed

+16
-18
lines changed

.gitlab-ci.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ variables:
1111
REPOSITORY_URL: ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/${AppUrl}/backend
1212
ECRBackendRepositoryName: ${AppUrl}/backend
1313
GitSHA: $CI_COMMIT_SHORT_SHA
14-
AWSAccessKeyId: $AWS_ACCESS_KEY_ID
15-
AWSSecretAccessKey: $AWS_SECRET_ACCESS_KEY
1614

17-
pages:
15+
.pages:
1816
image: node:latest
1917
stage: documentation
2018
script:
@@ -96,7 +94,7 @@ Build backend:
9694
- quasar/**/*
9795

9896
# gitlab-runner exec docker "e2e cypress tests without docker-compose"
99-
e2e: &cypress
97+
.e2e: &cypress
10098
stage: integration
10199
image: $CI_REGISTRY_IMAGE/backend:latest
102100
services:
@@ -142,8 +140,8 @@ e2e: &cypress
142140
Build Quasar PWA Assets:
143141
image: node:8
144142
stage: build
145-
only:
146-
- master
143+
# only:
144+
# - master
147145
variables:
148146
VUE_APP_CI_COMMIT_SHORT_SHA: "$CI_COMMIT_SHORT_SHA"
149147
VUE_APP_CI_JOB_URL: "$CI_JOB_URL"
@@ -167,8 +165,8 @@ Build Quasar PWA Assets:
167165
Release backend:
168166
stage: release
169167
image: docker:stable
170-
only:
171-
- master
168+
# only:
169+
# - master
172170
services:
173171
- docker:dind
174172
before_script:
@@ -191,13 +189,13 @@ Release backend:
191189
- $(aws ecr get-login --no-include-email --region us-east-1)
192190
- docker push $REPOSITORY_URL:${GitSHA}
193191
after_script:
194-
- echo "The production image has been released from the GitLab to ECR"
192+
- echo "The production image has been released from GitLab to ECR"
195193

196194
Sync Quasar PWA Assets:
197195
image: python:3.7
198196
stage: deploy
199-
only:
200-
- master
197+
# only:
198+
# - master
201199
dependencies:
202200
- "Build Quasar PWA Assets"
203201
before_script:
@@ -247,8 +245,8 @@ Sync Quasar PWA Assets:
247245
Update stack:
248246
image: python:3.7
249247
stage: cloudformation
250-
only:
251-
- master
248+
# only:
249+
# - master
252250
variables:
253251
EnvironmentName: staging
254252
before_script:

backend/backend/settings/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,7 @@
234234
# https://docs.djangoproject.com/en/2.1/howto/static-files/
235235

236236
AWS_DEFAULT_ACL = None
237-
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID', 'key_id')
238-
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY', 'key')
237+
239238
AWS_STORAGE_BUCKET_NAME = os.environ.get(
240239
'AWS_STORAGE_BUCKET_NAME', 'bucketname')
241240
AWS_S3_CUSTOM_DOMAIN = f"{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com"

backend/backend/settings/development.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ def show_toolbar(request):
6565
'--no-browser',
6666
]
6767

68+
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID', 'key_id')
69+
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY', 'key')
70+
6871
STATIC_URL = '/static/'
6972

7073
STATIC_ROOT = '/static/'

cloudformation/scripts/generate_secrets.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
'WildcardSSLCertificateArn',
1919
'FlowerUsername',
2020
'FlowerPassword',
21-
'DjangoSecretKey',
22-
'AWSAccessKeyId',
23-
'AWSSecretAccessKey',
21+
'DjangoSecretKey'
2422
]
2523

2624
for v in variables:

0 commit comments

Comments
 (0)