Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,28 +244,9 @@ jobs:
workflows:
primary: # This is the name of the workflow, feel free to change it to better match your workflow.
jobs:
- test
# This job is triggered whenever a commit is made to the dev/stage/test/prod branches.
# It kicks off the e2e-test pipeline in the fecfile-web-app project.
- trigger-e2e-test-pipeline:
filters:
branches:
only: /develop|release\/sprint-[\.\d]+|release\/test|main/
- deploy-job:
requires:
- test
filters:
branches:
only: /develop|release\/sprint-[\.\d]+|release\/test|main/
- docs-build:
requires:
- test
filters:
branches:
only: develop
- docs-deploy:
requires:
- docs-build
filters:
branches:
only: develop
only: /feature\/2864-deploy-to-mirror/
2 changes: 1 addition & 1 deletion django-backend/fecfiler/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def receiver_setup_logging(loglevel, logfile, format, colorize, **kwargs):
logger.info("Starting Celery: logging set up")


if env.get_service(name="fecfile-api-redis"):
if env.get_service(name="load-fecfile-api-redis"):
app.conf["broker_use_ssl"] = {"ssl_cert_reqs": ssl.CERT_NONE}
app.conf["redis_backend_use_ssl"] = {"ssl_cert_reqs": ssl.CERT_NONE}

Expand Down
4 changes: 2 additions & 2 deletions django-backend/fecfiler/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class CeleryStorageType(Enum):
)

CSRF_COOKIE_DOMAIN = env.get_credential("FFAPI_COOKIE_DOMAIN")
CSRF_TRUSTED_ORIGINS = ["https://*.fecfile.fec.gov"]
CSRF_TRUSTED_ORIGINS = ["https://*.app.cloud.gov"]

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = env.get_credential("DJANGO_SECRET_KEY")
Expand Down Expand Up @@ -162,7 +162,7 @@ def custom_silk_filter(request):
},
]

CORS_ALLOWED_ORIGIN_REGEXES = [r"https://(.*?)fecfile\.fec\.gov$"]
CORS_ALLOWED_ORIGIN_REGEXES = [r"https://(.*?)\.app\.cloud\.gov$"]

CORS_ALLOW_HEADERS = (
*default_headers,
Expand Down
4 changes: 2 additions & 2 deletions django-backend/fecfiler/settings/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

env = cfenv.AppEnv()

redis = env.get_service(name="fecfile-api-redis")
s3 = env.get_service(name="fecfile-api-s3")
redis = env.get_service(name="load-fecfile-api-redis")
s3 = env.get_service(name="load-fecfile-api-s3")

if redis:
password = redis.credentials.get("password")
Expand Down
2 changes: 1 addition & 1 deletion django-backend/fecfiler/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
SESSION_COOKIE_HTTPONLY = True
CSRF_COOKIE_SECURE = True

ALLOWED_HOSTS = [".fecfile.fec.gov"]
ALLOWED_HOSTS = [".app.cloud.gov"]
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ services:
- "8089:8089"
volumes:
- ./:/mnt/locust
# command: -f /mnt/locust/performance-testing/locust_run.py --master -H https://dev-api.fecfile.fec.gov
command: -f /mnt/locust/performance-testing/locust_run.py --master -H http://fecfile-api-proxy:8080 -r .5
profiles: [ locust ]
command: -f /mnt/locust/performance-testing/locust_run.py --master -H https://load-dev-api.app.cloud.gov -r .5
# command: -f /mnt/locust/performance-testing/locust_run.py --master -H http://fecfile-api-proxy:8080 -r .5
profiles: [locust]

locust-follower:
image: locustio/locust
Expand Down
30 changes: 15 additions & 15 deletions manifests/manifest-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@ defaults: &defaults
- python_buildpack
memory: 1G
services:
- fecfile-api-rds
- fecfile-api-s3
- fecfile-api-redis
- fecfile-api-creds-dev
- load-fecfile-api-rds
- load-fecfile-api-s3
- load-fecfile-api-redis
- fecfile-api-creds-dev # Can use dev's creds
env: &default-env
SPACE: dev
DISABLE_COLLECTSTATIC: 1
DJANGO_SETTINGS_MODULE: fecfiler.settings.production
FFAPI_COOKIE_DOMAIN: fecfile.fec.gov
LOGIN_REDIRECT_CLIENT_URL: https://dev.fecfile.fec.gov
LOGIN_REDIRECT_SERVER_URL: https://dev-api.fecfile.fec.gov/api/v1/oidc/login-redirect
LOGOUT_REDIRECT_URL: https://dev-api.fecfile.fec.gov/api/v1/oidc/logout-redirect
MOCK_OIDC_PROVIDER: False
OIDC_OP_AUTODISCOVER_ENDPOINT: https://idp.int.identitysandbox.gov/.well-known/openid-configuration
FFAPI_COOKIE_DOMAIN: app.cloud.gov
LOGIN_REDIRECT_CLIENT_URL: https://load-dev.app.cloud.gov
LOGIN_REDIRECT_SERVER_URL: https://load-dev-api.app.cloud.gov/api/v1/oidc/login-redirect
LOGOUT_REDIRECT_URL: https://load-dev-api.app.cloud.gov/api/v1/oidc/logout-redirect
MOCK_OIDC_PROVIDER: True
PRODUCTION_OPEN_FEC_API: https://api.open.fec.gov/v1/
STAGE_OPEN_FEC_API: https://api-stage.open.fec.gov/v1/
FEC_AGENCY_ID: FEC
Expand All @@ -39,16 +38,17 @@ defaults: &defaults
FLAG__COMMITTEE_DATA_SOURCE: TEST # Values are PRODUCTION, TEST, MOCKED
ENABLE_RESTRICTED_COMMANDS: True
FEC_FORMAT_VERSION: 8.5
OIDC_OP_AUTODISCOVER_ENDPOINT: https://load-dev-api.app.cloud.gov/api/v1/mock_oidc_provider/.well-known/openid-configuration

applications:
- name: fecfile-web-api
- name: load-fecfile-web-api
<<: *defaults
instances: 2
routes:
- route: fecfile-web-api-dev.apps.internal
- route: load-fecfile-web-api-dev.apps.internal
command: bin/run-api.sh
memory: 2G
- name: fecfile-web-services
- name: load-fecfile-web-services
<<: *defaults
env:
<<: *default-env
Expand All @@ -59,12 +59,12 @@ applications:
no-route: true
health-check-type: process
command: bin/run-celery-worker.sh
- name: fecfile-api-migrator
- name: load-fecfile-api-migrator
<<: *defaults
command: bin/run-api.sh
memory: 2G
no-route: true
- name: fecfile-scheduler
- name: load-fecfile-scheduler
<<: *defaults
no-route: true
health-check-type: process
Expand Down
12 changes: 6 additions & 6 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

env = cfenv.AppEnv()

APP_NAME = "fecfile-web-api"
MIGRATOR_APP_NAME = "fecfile-api-migrator" # THE APP WITH THIS NAME WILL GET DELETED!
WEB_SERVICES_NAME = "fecfile-web-services"
SCHEDULER_NAME = "fecfile-scheduler"
PROXY_NAME = "fecfile-api-proxy"
APP_NAME = "load-fecfile-web-api"
MIGRATOR_APP_NAME = "load-fecfile-api-migrator" # THE APP WITH THIS NAME WILL GET DELETED!
WEB_SERVICES_NAME = "load-fecfile-web-services"
SCHEDULER_NAME = "load-fecfile-scheduler"
PROXY_NAME = "load-fecfile-api-proxy"
ORG_NAME = "fec-fecfile"


Expand Down Expand Up @@ -51,7 +51,7 @@ def _detect_space(repo, branch=None):
("prod", lambda _, branch: branch == "main"),
("test", lambda _, branch: branch == "release/test"),
("stage", lambda _, branch: branch.startswith("release/sprint")),
("dev", lambda _, branch: branch == "develop"),
("dev", lambda _, branch: branch == "feature/2864-deploy-to-mirror"),
)


Expand Down