Skip to content

Commit

Permalink
Moving workflows around into env blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-jameson committed Dec 19, 2024
1 parent ccd2ca8 commit 2eb6de0
Showing 1 changed file with 57 additions and 51 deletions.
108 changes: 57 additions & 51 deletions .circleci/deployment/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
- not: << pipeline.parameters.run_nightly_owasp_scan >>

jobs:
- deploy-project-updates-site:
filters:
branches:
only:
- develop
# Dev environments
- deploy-infrastructure-dev:
target_env: << pipeline.parameters.target_env >>
filters:
Expand All @@ -23,17 +19,15 @@
- develop
- main
- master
- deploy-infrastructure-staging:
- deploy-dev:
target_env: << pipeline.parameters.target_env >>
filters:
branches:
only:
ignore:
- develop
- main
- deploy-infrastructure-production:
filters:
branches:
only:
- master

- enable-versioning:
requires:
- deploy-infrastructure-dev
Expand All @@ -43,73 +37,67 @@
- develop
- main
- master
- enable-versioning:
requires:
- deploy-infrastructure-staging
target_env: develop
cf-password: CF_PASSWORD_STAGING
cf-username: CF_USERNAME_STAGING
cf-space: tanf-staging

# Develop
- deploy-infrastructure-staging:
filters:
branches:
only:
- develop
- main
- deploy-project-updates-site:
filters:
branches:
only:
- develop
- enable-versioning:
requires:
- deploy-infrastructure-staging
target_env: staging
target_env: develop
cf-password: CF_PASSWORD_STAGING
cf-username: CF_USERNAME_STAGING
cf-space: tanf-staging
filters:
branches:
only:
- main
- enable-versioning:
- develop
- build-and-tag-develop:
requires:
- deploy-infrastructure-production
target_env: prod
cf-password: CF_PASSWORD_PROD
cf-username: CF_USERNAME_PROD
cf-space: tanf-prod
- deploy-infrastructure-staging
filters:
branches:
only:
- master
- prod-deploy-clamav:
- develop
- deploy-develop:
requires:
- deploy-infrastructure-production
- build-and-tag-develop
filters:
branches:
only:
- master
- deploy-dev:
target_env: << pipeline.parameters.target_env >>
requires:
- deploy-infrastructure-dev
filters:
branches:
ignore:
- develop
- main
- master
- build-and-tag-develop:
- test-deployment-e2e:
requires:
- deploy-infrastructure-staging
- deploy-develop
filters:
branches:
only:
- develop
- deploy-develop:

# Staging
- build-and-tag-staging:
requires:
- build-and-tag-develop
- deploy-infrastructure-staging
filters:
branches:
only:
- develop
- build-and-tag-staging:
- main
- enable-versioning:
requires:
- deploy-infrastructure-staging
target_env: staging
cf-password: CF_PASSWORD_STAGING
cf-username: CF_USERNAME_STAGING
cf-space: tanf-staging
filters:
branches:
only:
Expand All @@ -121,27 +109,45 @@
branches:
only:
- main
- build-and-tag-production:

# Production
- 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:
- prod-deploy-clamav:
requires:
- build-and-tag-production
- deploy-infrastructure-production
filters:
branches:
only:
- master
- test-deployment-e2e:
- build-and-tag-production:
requires:
- deploy-develop
- deploy-infrastructure-production
filters:
branches:
only:
- develop
- master
- deploy-production:
requires:
- build-and-tag-production
filters:
branches:
only:
- master
- make_erd: # from ../util folder
filters:
branches:
Expand Down

0 comments on commit 2eb6de0

Please sign in to comment.