From 456a3906cc3554a922a9c1495a0c02d4501e7133 Mon Sep 17 00:00:00 2001 From: George Hudson Date: Tue, 31 Oct 2023 08:03:48 -0600 Subject: [PATCH 01/24] reduced workflows from 3 deploys to 1 --- .circleci/deployment/jobs.yml | 29 +++---- .circleci/deployment/workflows.yml | 124 ++++++++++++++--------------- 2 files changed, 71 insertions(+), 82 deletions(-) diff --git a/.circleci/deployment/jobs.yml b/.circleci/deployment/jobs.yml index 9aa40dfa7..f3cf6ba06 100644 --- a/.circleci/deployment/jobs.yml +++ b/.circleci/deployment/jobs.yml @@ -6,9 +6,12 @@ type: string 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 @@ -35,12 +38,12 @@ deploy-infrastructure-dev: executor: terraform/default working_directory: ~/tdp-deploy - parameters: - target_env: - type: string steps: - - deploy-infrastructure: - cf-app: << parameters.target_env >> + when: + condition: << pipeline.parameters.run_dev_deployment >> + steps: + - deploy-infrastructure: + cf-app: << parameters.target_env >> deploy-infrastructure-staging: executor: terraform/default @@ -52,16 +55,6 @@ cf-space: tanf-staging tf-path: ./terraform/staging - deploy-infrastructure-develop: - 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 - deploy-infrastructure-production: executor: terraform/default working_directory: ~/tdp-deploy diff --git a/.circleci/deployment/workflows.yml b/.circleci/deployment/workflows.yml index 5689b83bc..982a7a01a 100644 --- a/.circleci/deployment/workflows.yml +++ b/.circleci/deployment/workflows.yml @@ -1,43 +1,50 @@ #workflows: - dev-deployment: + deployment: when: - << pipeline.parameters.run_dev_deployment >> + or: + - equal: [ master, << pipeline.git.branch >> ] + - equal: [ main, << pipeline.git.branch >> ] + - equal: [ develop, << pipeline.git.branch >> ] + - << pipeline.parameters.run_dev_deployment >> + unless: << 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 @@ -46,41 +53,52 @@ 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 + - deploy-infrastructure-develop filters: branches: only: - - main + - develop - deploy-staging: requires: - deploy-infrastructure-staging @@ -88,29 +106,6 @@ 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 @@ -118,16 +113,17 @@ 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 - + \ No newline at end of file From 7e0a5ab0138c67684aa5b410fcc9d609e8523d97 Mon Sep 17 00:00:00 2001 From: George Hudson Date: Tue, 31 Oct 2023 09:00:36 -0600 Subject: [PATCH 02/24] fix spacing of nested 'steps:' --- .circleci/deployment/jobs.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/deployment/jobs.yml b/.circleci/deployment/jobs.yml index f3cf6ba06..d7de9ff14 100644 --- a/.circleci/deployment/jobs.yml +++ b/.circleci/deployment/jobs.yml @@ -8,10 +8,10 @@ steps: 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 >> + steps: + - deploy-cloud-dot-gov: + backend-appname: tdp-backend-<< parameters.target_env >> + frontend-appname: tdp-frontend-<< parameters.target_env >> deploy-staging: executor: docker-executor @@ -41,7 +41,7 @@ steps: when: condition: << pipeline.parameters.run_dev_deployment >> - steps: + steps: - deploy-infrastructure: cf-app: << parameters.target_env >> From d8999ed4f6a8ad1ba3f2149e0859bc3fc1916b3e Mon Sep 17 00:00:00 2001 From: George Hudson Date: Tue, 31 Oct 2023 09:37:25 -0600 Subject: [PATCH 03/24] repaired logic for workflow --- .circleci/deployment/workflows.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/deployment/workflows.yml b/.circleci/deployment/workflows.yml index 982a7a01a..533ccbaad 100644 --- a/.circleci/deployment/workflows.yml +++ b/.circleci/deployment/workflows.yml @@ -1,12 +1,13 @@ #workflows: deployment: when: - or: - - equal: [ master, << pipeline.git.branch >> ] - - equal: [ main, << pipeline.git.branch >> ] - - equal: [ develop, << pipeline.git.branch >> ] - - << pipeline.parameters.run_dev_deployment >> - unless: << pipeline.parameters.run_nightly_owasp_scan >> + 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: @@ -126,4 +127,3 @@ only: - develop - master - \ No newline at end of file From dca805c9c33d47a7629f66b871ecb1674c70a625 Mon Sep 17 00:00:00 2001 From: George Hudson Date: Tue, 31 Oct 2023 09:54:13 -0600 Subject: [PATCH 04/24] trying to get right format for conditional logic in job steps --- .circleci/deployment/jobs.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.circleci/deployment/jobs.yml b/.circleci/deployment/jobs.yml index d7de9ff14..f37bbe76b 100644 --- a/.circleci/deployment/jobs.yml +++ b/.circleci/deployment/jobs.yml @@ -6,12 +6,12 @@ type: string working_directory: ~/tdp-deploy steps: - 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 >> + - 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 @@ -39,11 +39,11 @@ executor: terraform/default working_directory: ~/tdp-deploy steps: - when: - condition: << pipeline.parameters.run_dev_deployment >> - steps: - - deploy-infrastructure: - cf-app: << parameters.target_env >> + - when: + condition: << pipeline.parameters.run_dev_deployment >> + steps: + - deploy-infrastructure: + cf-app: << parameters.target_env >> deploy-infrastructure-staging: executor: terraform/default From e881fd788949c09edc1b624adb8f15d7bde3f028 Mon Sep 17 00:00:00 2001 From: George Hudson Date: Tue, 31 Oct 2023 11:29:13 -0600 Subject: [PATCH 05/24] fixed incorrect variable --- .circleci/deployment/jobs.yml | 12 ++++++------ .circleci/deployment/workflows.yml | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.circleci/deployment/jobs.yml b/.circleci/deployment/jobs.yml index f37bbe76b..00bd3b278 100644 --- a/.circleci/deployment/jobs.yml +++ b/.circleci/deployment/jobs.yml @@ -1,17 +1,14 @@ # jobs: deploy-dev: executor: docker-executor - parameters: - target_env: - type: string working_directory: ~/tdp-deploy steps: - 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 >> + backend-appname: tdp-backend-<< pipeline.parameters.target_env >> + frontend-appname: tdp-frontend-<< pipeline.parameters.target_env >> deploy-staging: executor: docker-executor @@ -36,6 +33,9 @@ cf-username: CF_USERNAME_STAGING deploy-infrastructure-dev: + parameters: + target_env: + type: string executor: terraform/default working_directory: ~/tdp-deploy steps: @@ -43,7 +43,7 @@ condition: << pipeline.parameters.run_dev_deployment >> steps: - deploy-infrastructure: - cf-app: << parameters.target_env >> + cf-app: << pipeline.parameters.target_env >> deploy-infrastructure-staging: executor: terraform/default diff --git a/.circleci/deployment/workflows.yml b/.circleci/deployment/workflows.yml index 533ccbaad..b4fc812a4 100644 --- a/.circleci/deployment/workflows.yml +++ b/.circleci/deployment/workflows.yml @@ -84,7 +84,6 @@ only: - master - deploy-dev: - target_env: << pipeline.parameters.target_env >> requires: - deploy-infrastructure-dev filters: From 2de405597a318f8e0fe293a30091073e81f2184a Mon Sep 17 00:00:00 2001 From: George Hudson Date: Tue, 31 Oct 2023 11:36:00 -0600 Subject: [PATCH 06/24] adding default target_env instead of emptry string --- .circleci/base_config.yml | 2 +- .circleci/config.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/base_config.yml b/.circleci/base_config.yml index 46ff8279f..b84f08a6b 100644 --- a/.circleci/base_config.yml +++ b/.circleci/base_config.yml @@ -47,7 +47,7 @@ parameters: default: false target_env: type: string - default: '' + default: 'nil' triggered: type: boolean default: false diff --git a/.circleci/config.yml b/.circleci/config.yml index 65715debc..4141e1a87 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,7 +39,7 @@ parameters: default: false target_env: type: string - default: '' + default: 'nil' triggered: type: boolean default: false From 585acc8c963b0df927f63f9078f61bfb9aa0a083 Mon Sep 17 00:00:00 2001 From: George Hudson Date: Tue, 31 Oct 2023 12:01:22 -0600 Subject: [PATCH 07/24] reverting --- .circleci/base_config.yml | 2 +- .circleci/config.yml | 2 +- .circleci/deployment/jobs.yml | 11 +++++++---- .circleci/deployment/workflows.yml | 2 ++ 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.circleci/base_config.yml b/.circleci/base_config.yml index b84f08a6b..46ff8279f 100644 --- a/.circleci/base_config.yml +++ b/.circleci/base_config.yml @@ -47,7 +47,7 @@ parameters: default: false target_env: type: string - default: 'nil' + default: '' triggered: type: boolean default: false diff --git a/.circleci/config.yml b/.circleci/config.yml index 4141e1a87..65715debc 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,7 +39,7 @@ parameters: default: false target_env: type: string - default: 'nil' + default: '' triggered: type: boolean default: false diff --git a/.circleci/deployment/jobs.yml b/.circleci/deployment/jobs.yml index 00bd3b278..c24c067f1 100644 --- a/.circleci/deployment/jobs.yml +++ b/.circleci/deployment/jobs.yml @@ -1,14 +1,17 @@ # jobs: deploy-dev: executor: docker-executor + parameters: + target_env: + type: string working_directory: ~/tdp-deploy steps: - when: condition: << pipeline.parameters.run_dev_deployment >> steps: - deploy-cloud-dot-gov: - backend-appname: tdp-backend-<< pipeline.parameters.target_env >> - frontend-appname: tdp-frontend-<< pipeline.parameters.target_env >> + backend-appname: tdp-backend-<< parameters.target_env >> + frontend-appname: tdp-frontend-<< parameters.target_env >> deploy-staging: executor: docker-executor @@ -33,7 +36,7 @@ cf-username: CF_USERNAME_STAGING deploy-infrastructure-dev: - parameters: + parameters: target_env: type: string executor: terraform/default @@ -43,7 +46,7 @@ condition: << pipeline.parameters.run_dev_deployment >> steps: - deploy-infrastructure: - cf-app: << pipeline.parameters.target_env >> + cf-app: << parameters.target_env >> deploy-infrastructure-staging: executor: terraform/default diff --git a/.circleci/deployment/workflows.yml b/.circleci/deployment/workflows.yml index b4fc812a4..21cef2b11 100644 --- a/.circleci/deployment/workflows.yml +++ b/.circleci/deployment/workflows.yml @@ -17,6 +17,7 @@ - develop - master - deploy-infrastructure-dev: + target_env: << pipeline.parameters.target_env >> filters: branches: ignore: @@ -84,6 +85,7 @@ only: - master - deploy-dev: + target_env: << pipeline.parameters.target_env >> requires: - deploy-infrastructure-dev filters: From 33b647c733325fd1c32b273428d56c041e51992b Mon Sep 17 00:00:00 2001 From: George Hudson Date: Tue, 31 Oct 2023 12:33:20 -0600 Subject: [PATCH 08/24] fixed spacing --- .circleci/deployment/jobs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/deployment/jobs.yml b/.circleci/deployment/jobs.yml index c24c067f1..9e5557629 100644 --- a/.circleci/deployment/jobs.yml +++ b/.circleci/deployment/jobs.yml @@ -1,9 +1,9 @@ # jobs: deploy-dev: - executor: docker-executor parameters: target_env: type: string + executor: docker-executor working_directory: ~/tdp-deploy steps: - when: @@ -36,7 +36,7 @@ cf-username: CF_USERNAME_STAGING deploy-infrastructure-dev: - parameters: + parameters: target_env: type: string executor: terraform/default From 24e49d50edbb85d5ace7bef52b9af14428314c62 Mon Sep 17 00:00:00 2001 From: George Hudson Date: Tue, 31 Oct 2023 17:06:46 -0600 Subject: [PATCH 09/24] removed old requirement and updated for current jobs. --- .circleci/deployment/workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/deployment/workflows.yml b/.circleci/deployment/workflows.yml index 21cef2b11..45ca1c2bc 100644 --- a/.circleci/deployment/workflows.yml +++ b/.circleci/deployment/workflows.yml @@ -96,7 +96,7 @@ - master - deploy-develop: requires: - - deploy-infrastructure-develop + - deploy-infrastructure-staging filters: branches: only: From a0b0eca849a52c4d4ed87a172b46607dd807a60d Mon Sep 17 00:00:00 2001 From: George Hudson Date: Sun, 12 Nov 2023 20:22:28 -0700 Subject: [PATCH 10/24] use this branch to check develop deploys --- .circleci/config.yml | 1 + .circleci/deployment/workflows.yml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 65715debc..eb3be8d73 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -83,4 +83,5 @@ workflows: - main - master - /^release.*/ + - /^2722*/ #DELETE BEFORE MERGE diff --git a/.circleci/deployment/workflows.yml b/.circleci/deployment/workflows.yml index 45ca1c2bc..eb2cfb0a9 100644 --- a/.circleci/deployment/workflows.yml +++ b/.circleci/deployment/workflows.yml @@ -6,6 +6,7 @@ - equal: [ master, << pipeline.git.branch >> ] - equal: [ main, << pipeline.git.branch >> ] - equal: [ develop, << pipeline.git.branch >> ] + - equal: [ '2722/circleci', << pipeline.git.branch >> ] #DELETE BEFORE MERGE - << pipeline.parameters.run_dev_deployment >> - not: << pipeline.parameters.run_nightly_owasp_scan >> @@ -28,6 +29,7 @@ filters: branches: only: + - '2722/circleci' #DELETE BEFORE MERGE - develop - main - deploy-infrastructure-production: @@ -54,6 +56,7 @@ filters: branches: only: + - '2722/circleci' #DELETE BEFORE MERGE - develop - enable-versioning: requires: @@ -100,6 +103,7 @@ filters: branches: only: + - '2722/circleci' #DELETE BEFORE MERGE - develop - deploy-staging: requires: @@ -121,6 +125,7 @@ filters: branches: only: + - '2722/circleci' #DELETE BEFORE MERGE - develop - make_erd: # from ../util folder filters: From 12487d2c6964e50a0351347fdc8c173a4f6a2e7d Mon Sep 17 00:00:00 2001 From: George Hudson Date: Sun, 12 Nov 2023 20:43:37 -0700 Subject: [PATCH 11/24] use this branch to check develop deploys --- .circleci/deployment/workflows.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/deployment/workflows.yml b/.circleci/deployment/workflows.yml index eb2cfb0a9..0cf80e2c7 100644 --- a/.circleci/deployment/workflows.yml +++ b/.circleci/deployment/workflows.yml @@ -22,6 +22,7 @@ filters: branches: ignore: + - '2722/circleci' #DELETE BEFORE MERGE - develop - main - master @@ -94,6 +95,7 @@ filters: branches: ignore: + - '2722/circleci' #DELETE BEFORE MERGE - develop - main - master From c30f270d9f132b6809a70e6db72bfd63ccb29ae5 Mon Sep 17 00:00:00 2001 From: George Hudson Date: Sun, 12 Nov 2023 20:45:13 -0700 Subject: [PATCH 12/24] use this branch to check develop deploys --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index eb3be8d73..f0805d469 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -83,5 +83,5 @@ workflows: - main - master - /^release.*/ - - /^2722*/ #DELETE BEFORE MERGE + - '2722/circleci' #DELETE BEFORE MERGE From 74a65578b6f27b457a854bbe0a9d31a978c8cb4c Mon Sep 17 00:00:00 2001 From: George Hudson Date: Sun, 12 Nov 2023 20:56:48 -0700 Subject: [PATCH 13/24] use this branch to check develop deploys --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index f0805d469..845b19fbe 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -73,6 +73,7 @@ workflows: - main - master - /^release.*/ + - '2722/circleci' #DELETE BEFORE MERGE circle-ci-setup: jobs: - setup: From e8a56333a00f638192250b090458d784cbef4d31 Mon Sep 17 00:00:00 2001 From: George Hudson Date: Sun, 12 Nov 2023 21:52:31 -0700 Subject: [PATCH 14/24] use this branch to check develop deploys --- .circleci/deployment/jobs.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.circleci/deployment/jobs.yml b/.circleci/deployment/jobs.yml index 9e5557629..3aa796b45 100644 --- a/.circleci/deployment/jobs.yml +++ b/.circleci/deployment/jobs.yml @@ -6,12 +6,21 @@ executor: docker-executor working_directory: ~/tdp-deploy steps: + - run: + name: Set Initial CHECK RUN ENV + command: CHECK_RUN="false" - 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 >> + - run: + name: Update CHECK RUN + command: CHECK_RUN="true" + - run: + name: Echo Check Run + command: echo "dev-deploy run = $CHECK_RUN" deploy-staging: executor: docker-executor @@ -42,11 +51,20 @@ executor: terraform/default working_directory: ~/tdp-deploy steps: + - run: + name: Set Initial CHECK RUN ENV + command: CHECK_RUN="false" - when: condition: << pipeline.parameters.run_dev_deployment >> steps: - deploy-infrastructure: cf-app: << parameters.target_env >> + - run: + name: Update CHECK RUN + command: CHECK_RUN="true" + - run: + name: Echo Check Run + command: echo "dev-deploy run = $CHECK_RUN" deploy-infrastructure-staging: executor: terraform/default From 2a9805f732d059968258aee22453de91e9d223c3 Mon Sep 17 00:00:00 2001 From: George Hudson Date: Sun, 12 Nov 2023 22:01:16 -0700 Subject: [PATCH 15/24] use this branch to check develop deploys --- .circleci/deployment/jobs.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/deployment/jobs.yml b/.circleci/deployment/jobs.yml index 3aa796b45..3ea1ad6bb 100644 --- a/.circleci/deployment/jobs.yml +++ b/.circleci/deployment/jobs.yml @@ -57,11 +57,11 @@ - when: condition: << pipeline.parameters.run_dev_deployment >> steps: - - deploy-infrastructure: - cf-app: << parameters.target_env >> - - run: - name: Update CHECK RUN - command: CHECK_RUN="true" + - deploy-infrastructure: + cf-app: << parameters.target_env >> + - run: + name: Update CHECK RUN + command: CHECK_RUN="true" - run: name: Echo Check Run command: echo "dev-deploy run = $CHECK_RUN" From 3dc3379180f3d1b2b737ba681e878cd15e24d2cd Mon Sep 17 00:00:00 2001 From: George Hudson Date: Tue, 14 Nov 2023 10:05:07 -0700 Subject: [PATCH 16/24] revert --- .circleci/deployment/jobs.yml | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/.circleci/deployment/jobs.yml b/.circleci/deployment/jobs.yml index 3ea1ad6bb..9e5557629 100644 --- a/.circleci/deployment/jobs.yml +++ b/.circleci/deployment/jobs.yml @@ -6,21 +6,12 @@ executor: docker-executor working_directory: ~/tdp-deploy steps: - - run: - name: Set Initial CHECK RUN ENV - command: CHECK_RUN="false" - 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 >> - - run: - name: Update CHECK RUN - command: CHECK_RUN="true" - - run: - name: Echo Check Run - command: echo "dev-deploy run = $CHECK_RUN" deploy-staging: executor: docker-executor @@ -51,20 +42,11 @@ executor: terraform/default working_directory: ~/tdp-deploy steps: - - run: - name: Set Initial CHECK RUN ENV - command: CHECK_RUN="false" - when: condition: << pipeline.parameters.run_dev_deployment >> steps: - - deploy-infrastructure: - cf-app: << parameters.target_env >> - - run: - name: Update CHECK RUN - command: CHECK_RUN="true" - - run: - name: Echo Check Run - command: echo "dev-deploy run = $CHECK_RUN" + - deploy-infrastructure: + cf-app: << parameters.target_env >> deploy-infrastructure-staging: executor: terraform/default From 5569cf75e94bba41f19672867f86b418a7798414 Mon Sep 17 00:00:00 2001 From: George Hudson Date: Tue, 14 Nov 2023 10:16:52 -0700 Subject: [PATCH 17/24] revert --- .circleci/deployment/jobs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/deployment/jobs.yml b/.circleci/deployment/jobs.yml index 9e5557629..f146e251d 100644 --- a/.circleci/deployment/jobs.yml +++ b/.circleci/deployment/jobs.yml @@ -12,6 +12,7 @@ - deploy-cloud-dot-gov: backend-appname: tdp-backend-<< parameters.target_env >> frontend-appname: tdp-frontend-<< parameters.target_env >> + deploy-staging: executor: docker-executor From eddc82f0b6cfcfe270486cb14dfcd6d7b2ae34dd Mon Sep 17 00:00:00 2001 From: George Hudson Date: Wed, 15 Nov 2023 09:41:10 -0700 Subject: [PATCH 18/24] revert --- .circleci/config.yml | 4 ++-- .circleci/deployment/jobs.yml | 1 - .circleci/deployment/workflows.yml | 12 ++++++------ 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 845b19fbe..fca5b843c 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -73,7 +73,7 @@ workflows: - main - master - /^release.*/ - - '2722/circleci' #DELETE BEFORE MERGE + # - '2722/circleci' #DELETE BEFORE MERGE circle-ci-setup: jobs: - setup: @@ -84,5 +84,5 @@ workflows: - main - master - /^release.*/ - - '2722/circleci' #DELETE BEFORE MERGE + # - '2722/circleci' #DELETE BEFORE MERGE diff --git a/.circleci/deployment/jobs.yml b/.circleci/deployment/jobs.yml index f146e251d..9e5557629 100644 --- a/.circleci/deployment/jobs.yml +++ b/.circleci/deployment/jobs.yml @@ -12,7 +12,6 @@ - deploy-cloud-dot-gov: backend-appname: tdp-backend-<< parameters.target_env >> frontend-appname: tdp-frontend-<< parameters.target_env >> - deploy-staging: executor: docker-executor diff --git a/.circleci/deployment/workflows.yml b/.circleci/deployment/workflows.yml index 0cf80e2c7..66d68b882 100644 --- a/.circleci/deployment/workflows.yml +++ b/.circleci/deployment/workflows.yml @@ -6,7 +6,7 @@ - equal: [ master, << pipeline.git.branch >> ] - equal: [ main, << pipeline.git.branch >> ] - equal: [ develop, << pipeline.git.branch >> ] - - equal: [ '2722/circleci', << pipeline.git.branch >> ] #DELETE BEFORE MERGE + # - equal: [ '2722/circleci', << pipeline.git.branch >> ] #DELETE BEFORE MERGE - << pipeline.parameters.run_dev_deployment >> - not: << pipeline.parameters.run_nightly_owasp_scan >> @@ -22,7 +22,7 @@ filters: branches: ignore: - - '2722/circleci' #DELETE BEFORE MERGE + # - '2722/circleci' #DELETE BEFORE MERGE - develop - main - master @@ -30,7 +30,7 @@ filters: branches: only: - - '2722/circleci' #DELETE BEFORE MERGE + # - '2722/circleci' #DELETE BEFORE MERGE - develop - main - deploy-infrastructure-production: @@ -57,7 +57,7 @@ filters: branches: only: - - '2722/circleci' #DELETE BEFORE MERGE + # - '2722/circleci' #DELETE BEFORE MERGE - develop - enable-versioning: requires: @@ -95,7 +95,7 @@ filters: branches: ignore: - - '2722/circleci' #DELETE BEFORE MERGE + # - '2722/circleci' #DELETE BEFORE MERGE - develop - main - master @@ -105,7 +105,7 @@ filters: branches: only: - - '2722/circleci' #DELETE BEFORE MERGE + # - '2722/circleci' #DELETE BEFORE MERGE - develop - deploy-staging: requires: From 2de5500068482c1e124430234db68ff818700ed8 Mon Sep 17 00:00:00 2001 From: George Hudson Date: Thu, 16 Nov 2023 12:45:52 -0700 Subject: [PATCH 19/24] removed check in jobs --- .circleci/deployment/jobs.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.circleci/deployment/jobs.yml b/.circleci/deployment/jobs.yml index 9e5557629..e47f5ae3b 100644 --- a/.circleci/deployment/jobs.yml +++ b/.circleci/deployment/jobs.yml @@ -6,10 +6,7 @@ executor: docker-executor working_directory: ~/tdp-deploy steps: - - when: - condition: << pipeline.parameters.run_dev_deployment >> - steps: - - deploy-cloud-dot-gov: + - deploy-cloud-dot-gov: backend-appname: tdp-backend-<< parameters.target_env >> frontend-appname: tdp-frontend-<< parameters.target_env >> @@ -42,10 +39,7 @@ executor: terraform/default working_directory: ~/tdp-deploy steps: - - when: - condition: << pipeline.parameters.run_dev_deployment >> - steps: - - deploy-infrastructure: + - deploy-infrastructure: cf-app: << parameters.target_env >> deploy-infrastructure-staging: From de37baf921e31b8c1ba033358564377e01304e3f Mon Sep 17 00:00:00 2001 From: George Hudson Date: Fri, 17 Nov 2023 09:01:27 -0700 Subject: [PATCH 20/24] updates site only for develop branch --- .circleci/deployment/workflows.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/deployment/workflows.yml b/.circleci/deployment/workflows.yml index 66d68b882..bfb7fe7a2 100644 --- a/.circleci/deployment/workflows.yml +++ b/.circleci/deployment/workflows.yml @@ -16,7 +16,6 @@ branches: only: - develop - - master - deploy-infrastructure-dev: target_env: << pipeline.parameters.target_env >> filters: From dbfc3662336ab1404e5658d0ab98d018080d2dd2 Mon Sep 17 00:00:00 2001 From: George Hudson Date: Tue, 28 Nov 2023 13:40:00 -0700 Subject: [PATCH 21/24] removed deploy develop from github actions --- .github/workflows/deploy-develop-on-merge.yml | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 .github/workflows/deploy-develop-on-merge.yml diff --git a/.github/workflows/deploy-develop-on-merge.yml b/.github/workflows/deploy-develop-on-merge.yml deleted file mode 100644 index ee4eee057..000000000 --- a/.github/workflows/deploy-develop-on-merge.yml +++ /dev/null @@ -1,52 +0,0 @@ -########################################################################### -# GitHub Action Workflow -# On push to the develop branch (which should only be done through PR) -# in GitHub this action will trigger a deploy job within CircleCI for the -# deployment and e2e testing of the develop environment. -# -# Step 0: Checkout latest commit on develop -# -# Step 1: Makes a request to the V2 CircleCI API to initiate the project, -# which will filter based upon the branch to initiate the -# workflow/jobs listed here: -# staging-deployment:[ -# deploy-project-updates-site, -# deploy-infrastructure-develop, -# deploy-develop, -# test-deployment-e2e -# ] -# -# Leverages the open source GitHub Action: -# https://github.com/promiseofcake/circleci-trigger-action -########################################################################### -name: Deploy Develop on PR Merge -on: - push: - branches: - - develop - paths-ignore: - - 'docs/**' - - '**.md' - - '**.txt' - - '.gitattributes' - - '.gitignore' - - 'LICENSE' -jobs: - merge_deployment: - if: github.ref == 'refs/heads/develop' - runs-on: ubuntu-latest - name: Initiate deploy job in CircleCI - steps: - - uses: actions/checkout@v2 - - name: Circle CI Deployment Trigger - id: curl-circle-ci - uses: promiseofcake/circleci-trigger-action@v1 - with: - user-token: ${{ secrets.CIRCLE_CI_V2_TOKEN }} - project-slug: ${{ github.repository }} - branch: ${{ github.ref_name }} - payload: '{ - "develop_branch_deploy": true, - "target_env": "develop", - "triggered": true - }' From b61e832d85110d8c6aaa7ce06b7b02575ea7bc92 Mon Sep 17 00:00:00 2001 From: George Hudson Date: Fri, 1 Dec 2023 10:49:16 -0700 Subject: [PATCH 22/24] fixed spacing --- .circleci/deployment/jobs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/deployment/jobs.yml b/.circleci/deployment/jobs.yml index e47f5ae3b..d6faf27b8 100644 --- a/.circleci/deployment/jobs.yml +++ b/.circleci/deployment/jobs.yml @@ -7,8 +7,8 @@ working_directory: ~/tdp-deploy steps: - deploy-cloud-dot-gov: - backend-appname: tdp-backend-<< parameters.target_env >> - frontend-appname: tdp-frontend-<< parameters.target_env >> + backend-appname: tdp-backend-<< parameters.target_env >> + frontend-appname: tdp-frontend-<< parameters.target_env >> deploy-staging: executor: docker-executor From b124de124269866d94c5174daaa15c7af4abfb07 Mon Sep 17 00:00:00 2001 From: George Hudson Date: Mon, 4 Dec 2023 09:45:46 -0700 Subject: [PATCH 23/24] remove this branch from CI tracking --- .circleci/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fca5b843c..65715debc 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -73,7 +73,6 @@ workflows: - main - master - /^release.*/ - # - '2722/circleci' #DELETE BEFORE MERGE circle-ci-setup: jobs: - setup: @@ -84,5 +83,4 @@ workflows: - main - master - /^release.*/ - # - '2722/circleci' #DELETE BEFORE MERGE From 880ccf46233c4e0b9623c52a10b44cb3a46b9033 Mon Sep 17 00:00:00 2001 From: George Hudson Date: Tue, 19 Dec 2023 08:14:41 -0700 Subject: [PATCH 24/24] removed 2722/circleci branch references now that testing is done --- .circleci/deployment/workflows.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.circleci/deployment/workflows.yml b/.circleci/deployment/workflows.yml index bfb7fe7a2..8a4269c04 100644 --- a/.circleci/deployment/workflows.yml +++ b/.circleci/deployment/workflows.yml @@ -6,7 +6,6 @@ - equal: [ master, << pipeline.git.branch >> ] - equal: [ main, << pipeline.git.branch >> ] - equal: [ develop, << pipeline.git.branch >> ] - # - equal: [ '2722/circleci', << pipeline.git.branch >> ] #DELETE BEFORE MERGE - << pipeline.parameters.run_dev_deployment >> - not: << pipeline.parameters.run_nightly_owasp_scan >> @@ -21,7 +20,6 @@ filters: branches: ignore: - # - '2722/circleci' #DELETE BEFORE MERGE - develop - main - master @@ -29,7 +27,6 @@ filters: branches: only: - # - '2722/circleci' #DELETE BEFORE MERGE - develop - main - deploy-infrastructure-production: @@ -56,7 +53,6 @@ filters: branches: only: - # - '2722/circleci' #DELETE BEFORE MERGE - develop - enable-versioning: requires: @@ -94,7 +90,6 @@ filters: branches: ignore: - # - '2722/circleci' #DELETE BEFORE MERGE - develop - main - master @@ -104,7 +99,6 @@ filters: branches: only: - # - '2722/circleci' #DELETE BEFORE MERGE - develop - deploy-staging: requires: @@ -126,7 +120,6 @@ filters: branches: only: - - '2722/circleci' #DELETE BEFORE MERGE - develop - make_erd: # from ../util folder filters: