Skip to content

Commit

Permalink
Merge branch 'develop' into 2116/image-repo
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-jameson authored Nov 17, 2023
2 parents 0b84bf2 + 872c5b0 commit 51400b1
Show file tree
Hide file tree
Showing 111 changed files with 4,604 additions and 1,071 deletions.
2 changes: 1 addition & 1 deletion .circleci/base_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
node: circleci/node@4.7.0
node: circleci/node@5.1.0
terraform: circleci/[email protected]
jq: circleci/[email protected]

Expand Down
6 changes: 3 additions & 3 deletions .circleci/build-and-test/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
- checkout
- docker-compose-check
- docker-compose-up-backend
- run:
name: Execute Python Linting Test
command: cd tdrs-backend; docker-compose run --rm web bash -c "flake8 ."
- run:
name: Run Unit Tests And Create Code Coverage Report
command: |
cd tdrs-backend;
docker-compose run --rm web bash -c "./wait_for_services.sh && pytest --cov-report=xml"
- run:
name: Execute Python Linting Test
command: cd tdrs-backend; docker-compose run --rm web bash -c "flake8 ."
- upload-codecov:
component: backend
coverage-report: ./tdrs-backend/coverage.xml
Expand Down
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ workflows:
- develop
- main
- master
- /^release.*/
- /^release.*/

52 changes: 29 additions & 23 deletions .circleci/deployment/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,40 @@
backend-appname: <<parameters.backend-appname>>
frontend-appname: <<parameters.frontend-appname>>
cf-space: <<parameters.cf-space>>
- deploy-clamav:
backend-appname: <<parameters.backend-appname>>
cf-org: <<parameters.cf-org>>
cf-space: <<parameters.cf-space>>
- deploy-frontend:
environment: <<parameters.environment>>
backend-appname: <<parameters.backend-appname>>
frontend-appname: <<parameters.frontend-appname>>
cf-space: <<parameters.cf-space>>

clamav-cloud-dot-gov:
parameters:
backend-appname:
default: tdp-backend
type: string
cf-password:
default: CF_PASSWORD_DEV
type: env_var_name
cf-org:
default: CF_ORG
type: env_var_name
cf-space:
default: tanf-dev
type: string
cf-username:
default: CF_USERNAME_DEV
type: env_var_name
steps:
- checkout
- sudo-check
- cf-check
- login-cloud-dot-gov:
cf-password: <<parameters.cf-password>>
cf-org: <<parameters.cf-org>>
cf-space: <<parameters.cf-space>>
cf-username: <<parameters.cf-username>>
- deploy-clamav

deploy-backend:
parameters:
backend-appname:
Expand All @@ -71,30 +95,12 @@
<<parameters.cf-space>>
deploy-clamav:
parameters:
backend-appname:
default: tdp-backend
type: string
cf-org:
default: CF_ORG
type: env_var_name
cf-space:
default: tanf-dev
type: string
steps:
- run:
name: Deploy ClamAV REST application
command: |
cf push clamav-rest -f tdrs-backend/manifest.clamav.yml \
--var cf-space=<<parameters.cf-space>> \
- run:
name: Enable internal route between backend and clamav-rest app
command: |
cf add-network-policy <<parameters.backend-appname>> clamav-rest \
-s <<parameters.cf-space>> \
-o ${<<parameters.cf-org>>} \
--protocol tcp \
--port 9000
--var cf-space=tanf-prod
deploy-frontend:
parameters:
Expand Down
9 changes: 9 additions & 0 deletions .circleci/deployment/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,12 @@
cf-password: CF_PASSWORD_PROD
cf-space: tanf-prod
cf-username: CF_USERNAME_PROD
prod-deploy-clamav:
executor: docker-executor
working_directory: ~/tdp-deploy
steps:
- clamav-cloud-dot-gov:
backend-appname: tdp-backend-prod
cf-password: CF_PASSWORD_PROD
cf-space: tanf-prod
cf-username: CF_USERNAME_PROD
7 changes: 7 additions & 0 deletions .circleci/deployment/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@
branches:
only:
- master
- prod-deploy-clamav:
requires:
- deploy-infrastructure-production
filters:
branches:
only:
- master
- make_erd: # from ../util folder
filters:
branches:
Expand Down
2 changes: 1 addition & 1 deletion commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ tdrs-run-deploy() {
--url https://circleci.com/api/v2/project/github/raft-tech/TANF-app/pipeline \
--header 'Circle-Token: '$CIRCLE_CI_TOKEN \
--header 'content-type: application/json' \
--data '{"parameters":{"run_dev_deployment": true, "target_env":"'$TARGET_ENV'"}, "branch":"'$BRANCH'"}'
--data '{"parameters":{"triggered": true, "run_dev_deployment": true, "target_env":"'$TARGET_ENV'"}, "branch":"'$BRANCH'"}'
}

# List all aliases and functions associated with tdrs
Expand Down
Loading

0 comments on commit 51400b1

Please sign in to comment.