From 2eb6de0598d15d94275996eff2f083658a92e635 Mon Sep 17 00:00:00 2001 From: andrew-jameson Date: Thu, 19 Dec 2024 10:50:01 -0500 Subject: [PATCH] Moving workflows around into env blocks --- .circleci/deployment/workflows.yml | 108 +++++++++++++++-------------- 1 file changed, 57 insertions(+), 51 deletions(-) diff --git a/.circleci/deployment/workflows.yml b/.circleci/deployment/workflows.yml index a0de09f9e..6d90e0d00 100644 --- a/.circleci/deployment/workflows.yml +++ b/.circleci/deployment/workflows.yml @@ -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: @@ -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 @@ -43,13 +37,15 @@ - 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: @@ -57,59 +53,51 @@ - 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: @@ -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: