Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2722/circleci #2739

Merged
merged 29 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
456a390
reduced workflows from 3 deploys to 1
Oct 31, 2023
7e0a5ab
fix spacing of nested 'steps:'
Oct 31, 2023
d8999ed
repaired logic for workflow
Oct 31, 2023
dca805c
trying to get right format for conditional logic in job steps
Oct 31, 2023
e881fd7
fixed incorrect variable
Oct 31, 2023
2de4055
adding default target_env instead of emptry string
Oct 31, 2023
585acc8
reverting
Oct 31, 2023
33b647c
fixed spacing
Oct 31, 2023
24e49d5
removed old requirement and updated for current jobs.
Oct 31, 2023
a0b0eca
use this branch to check develop deploys
Nov 13, 2023
12487d2
use this branch to check develop deploys
Nov 13, 2023
c30f270
use this branch to check develop deploys
Nov 13, 2023
74a6557
use this branch to check develop deploys
Nov 13, 2023
e8a5633
use this branch to check develop deploys
Nov 13, 2023
2a9805f
use this branch to check develop deploys
Nov 13, 2023
3dc3379
revert
Nov 14, 2023
5569cf7
revert
Nov 14, 2023
eddc82f
revert
Nov 15, 2023
ec00828
Merge branch 'develop' into 2722/circleci
Nov 15, 2023
2de5500
removed check in jobs
Nov 16, 2023
de37baf
updates site only for develop branch
Nov 17, 2023
dbfc366
removed deploy develop from github actions
Nov 28, 2023
e36d297
Merge branch 'develop' into 2722/circleci
Nov 30, 2023
b61e832
fixed spacing
Dec 1, 2023
b124de1
remove this branch from CI tracking
Dec 4, 2023
880ccf4
removed 2722/circleci branch references now that testing is done
Dec 19, 2023
3b9d6c3
Merge branch 'develop' into 2722/circleci
Jan 9, 2024
e9ac533
Merge branch 'develop' into 2722/circleci
ADPennington Jan 9, 2024
96ad239
Merge branch 'develop' into 2722/circleci
andrew-jameson Jan 10, 2024
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
30 changes: 13 additions & 17 deletions .circleci/deployment/jobs.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# jobs:
deploy-dev:
executor: docker-executor
parameters:
target_env:
type: string
executor: docker-executor
working_directory: ~/tdp-deploy
steps:
- deploy-cloud-dot-gov:
backend-appname: tdp-backend-<< parameters.target_env >>
frontend-appname: tdp-frontend-<< parameters.target_env >>
- when:
condition: << pipeline.parameters.run_dev_deployment >>
steps:
- deploy-cloud-dot-gov:
backend-appname: tdp-backend-<< parameters.target_env >>
frontend-appname: tdp-frontend-<< parameters.target_env >>

deploy-staging:
executor: docker-executor
Expand All @@ -33,26 +36,19 @@
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
- when:
condition: << pipeline.parameters.run_dev_deployment >>
steps:
- deploy-infrastructure:
cf-app: << parameters.target_env >>

deploy-infrastructure-develop:
deploy-infrastructure-staging:
executor: terraform/default
working_directory: ~/tdp-deploy
steps:
Expand Down
121 changes: 59 additions & 62 deletions .circleci/deployment/workflows.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,52 @@
#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 >> ]
- << pipeline.parameters.run_dev_deployment >>
- not: << pipeline.parameters.run_nightly_owasp_scan >>

jobs:
- deploy-project-updates-site:
filters:
branches:
only:
- develop
- master
- deploy-infrastructure-dev:
target_env: << pipeline.parameters.target_env >>
- enable-versioning:
requires:
- deploy-infrastructure-dev
filters:
branches:
ignore:
- 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:
- develop
- deploy-infrastructure-develop:
- main
- deploy-infrastructure-production:
filters:
branches:
only:
- master
- enable-versioning:
requires:
- deploy-infrastructure-dev
filters:
branches:
ignore:
- 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 +55,76 @@
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:
- 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:
- 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:
- 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

Loading