Skip to content

Commit

Permalink
Merge pull request #496 from raft-tech/test-new-deploy
Browse files Browse the repository at this point in the history
Test new deploy
  • Loading branch information
ADPennington authored Dec 1, 2023
2 parents 5cb3563 + 5ddf41c commit cc86dc8
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 75 deletions.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ workflows:
- main
- master
- /^release.*/
- 'hhs-dev-devops' #DELETE BEFORE MERGE
circle-ci-setup:
jobs:
- setup:
filters:
branches:
only:
- 'hhs-dev-devops' #DELETE BEFORE MERGE
- develop
- main
- master
Expand Down
16 changes: 3 additions & 13 deletions .circleci/deployment/jobs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# jobs:
deploy-dev:
executor: docker-executor
parameters:
target_env:
type: string
executor: docker-executor
working_directory: ~/tdp-deploy
steps:
- deploy-cloud-dot-gov:
Expand Down Expand Up @@ -33,26 +33,16 @@
cf-username: CF_USERNAME_STAGING

deploy-infrastructure-dev:
executor: terraform/default
working_directory: ~/tdp-deploy
parameters:
target_env:
type: string
steps:
- deploy-infrastructure:
cf-app: << parameters.target_env >>

deploy-infrastructure-staging:
executor: terraform/default
working_directory: ~/tdp-deploy
steps:
- deploy-infrastructure:
cf-password: CF_PASSWORD_STAGING
cf-username: CF_USERNAME_STAGING
cf-space: tanf-staging
tf-path: ./terraform/staging
cf-app: << parameters.target_env >>

deploy-infrastructure-develop:
deploy-infrastructure-staging:
executor: terraform/default
working_directory: ~/tdp-deploy
steps:
Expand Down
127 changes: 65 additions & 62 deletions .circleci/deployment/workflows.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,55 @@
#workflows:
dev-deployment:
deployment:
when:
<< pipeline.parameters.run_dev_deployment >>
and:
- or:
- equal: [ master, << pipeline.git.branch >> ]
- equal: [ main, << pipeline.git.branch >> ]
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ 'hhs-dev-devops', << pipeline.git.branch >> ] #DELETE BEFORE MERGE
- << pipeline.parameters.run_dev_deployment >>
- not: << pipeline.parameters.run_nightly_owasp_scan >>

jobs:
- deploy-project-updates-site:
filters:
branches:
only:
- develop
- deploy-infrastructure-dev:
target_env: << pipeline.parameters.target_env >>
- enable-versioning:
requires:
- deploy-infrastructure-dev
filters:
branches:
ignore:
- 'hhs-dev-devops' #DELETE BEFORE MERGE
- develop
- main
- master
- deploy-dev:
target_env: << pipeline.parameters.target_env >>
requires:
- deploy-infrastructure-dev

staging-deployment:
unless:
or:
- << pipeline.parameters.run_dev_deployment >>
- << pipeline.parameters.run_nightly_owasp_scan >>
jobs:
- deploy-project-updates-site:
- deploy-infrastructure-staging:
filters:
branches:
only:
- 'hhs-dev-devops' #DELETE BEFORE MERGE
- develop
- deploy-infrastructure-develop:
- main
- deploy-infrastructure-production:
filters:
branches:
only:
- master
- enable-versioning:
requires:
- deploy-infrastructure-dev
filters:
branches:
ignore:
- 'hhs-dev-devops' #DELETE BEFORE MERGE
- develop
- main
- master
- enable-versioning:
requires:
- deploy-infrastructure-develop
- deploy-infrastructure-staging
target_env: develop
cf-password: CF_PASSWORD_STAGING
cf-username: CF_USERNAME_STAGING
Expand All @@ -46,88 +58,79 @@
branches:
only:
- develop
- deploy-develop:
- enable-versioning:
requires:
- deploy-infrastructure-develop
- deploy-infrastructure-staging
target_env: staging
cf-password: CF_PASSWORD_STAGING
cf-username: CF_USERNAME_STAGING
cf-space: tanf-staging
filters:
branches:
only:
- develop
- test-deployment-e2e:
- 'hhs-dev-devops' #DELETE BEFORE MERGE
- main
- enable-versioning:
requires:
- deploy-develop
- deploy-infrastructure-production
target_env: prod
cf-password: CF_PASSWORD_PROD
cf-username: CF_USERNAME_PROD
cf-space: tanf-prod
filters:
branches:
only:
- develop
- make_erd: # from ../util folder
- master
- prod-deploy-clamav:
requires:
- deploy-infrastructure-production
filters:
branches:
only:
- develop
- deploy-infrastructure-staging:
- master
- deploy-dev:
target_env: << pipeline.parameters.target_env >>
requires:
- deploy-infrastructure-dev
filters:
branches:
only:
ignore:
- 'hhs-dev-devops' #DELETE BEFORE MERGE
- develop
- main
- enable-versioning:
- master
- deploy-develop:
requires:
- deploy-infrastructure-staging
target_env: staging
cf-password: CF_PASSWORD_STAGING
cf-username: CF_USERNAME_STAGING
cf-space: tanf-staging
filters:
branches:
only:
- main
- develop
- deploy-staging:
requires:
- deploy-infrastructure-staging
filters:
branches:
only:
- 'hhs-dev-devops' #DELETE BEFORE MERGE
- main

production-deployment:
unless:
or:
- << pipeline.parameters.run_dev_deployment >>
- << pipeline.parameters.run_nightly_owasp_scan >>
jobs:
- deploy-infrastructure-production:
filters:
branches:
only:
- master
- enable-versioning:
requires:
- deploy-infrastructure-production
target_env: prod
cf-password: CF_PASSWORD_PROD
cf-username: CF_USERNAME_PROD
cf-space: tanf-prod
filters:
branches:
only:
- master
- deploy-production:
requires:
- deploy-infrastructure-production
filters:
branches:
only:
- master
- prod-deploy-clamav:
- test-deployment-e2e:
requires:
- deploy-infrastructure-production
- deploy-develop
filters:
branches:
only:
- master
- develop
- make_erd: # from ../util folder
filters:
branches:
only:
- develop
- master

0 comments on commit cc86dc8

Please sign in to comment.