From eaf003e94f32798a621b51d6c2a10ef0e1811afe Mon Sep 17 00:00:00 2001 From: Direside Date: Mon, 3 Feb 2020 11:57:59 -0800 Subject: [PATCH 01/30] Adding Commit Orbs tests. --- .circleci/config.yml | 4 +++ examples/commit-orbs/approvals/config.yml | 38 +++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 examples/commit-orbs/approvals/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index b21118c..a688341 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,4 +1,8 @@ version: 2.1 + +orbs: + - approvals: commitdev/approvals@dev-approvals-orb + jobs: # This job is useful when you've got a large git history and you want to be able to do a single shallow checkout and then # use a workspace to persist the checked out code for later jobs in the pipeline. diff --git a/examples/commit-orbs/approvals/config.yml b/examples/commit-orbs/approvals/config.yml new file mode 100644 index 0000000..9ba57c8 --- /dev/null +++ b/examples/commit-orbs/approvals/config.yml @@ -0,0 +1,38 @@ +version: 2.1 + +orbs: + - approvals: commitdev/approvals@dev-approvals-orb + +jobs: + build: + docker: + - image: circleci/python:3.8 + steps: + - run: + name: The First Step + command: | + echo 'Hello World!' + echo 'This is the delivery pipeline' + + staging_deploy: + docker: + - image: circleci/python:3.8 + steps: + - approvals/get + - deploy: + name: Staging Deployment + command: | + echo 'DEPLOYING STAG approved by $WORKFLOW_APPROVER!!!' + +workflows: + simple_workflow: + jobs: + - build + - test + - wait_for_approve: + type: approval + requires: + - build + - deploy: + requires: + - wait_for_approve From ccfcbdeadb38685fb6a445d478ded194950274e7 Mon Sep 17 00:00:00 2001 From: Direside Date: Mon, 3 Feb 2020 11:59:42 -0800 Subject: [PATCH 02/30] Fixed orb version tag. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a688341..b74ed7d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 orbs: - - approvals: commitdev/approvals@dev-approvals-orb + - approvals: commitdev/approvals@dev:approvals-orb jobs: # This job is useful when you've got a large git history and you want to be able to do a single shallow checkout and then From 8f9b17d876f8936dcf5b8a7f0bcdff156e822d03 Mon Sep 17 00:00:00 2001 From: Direside Date: Mon, 3 Feb 2020 12:01:09 -0800 Subject: [PATCH 03/30] Fixed orb version tag. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b74ed7d..6738537 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 orbs: - - approvals: commitdev/approvals@dev:approvals-orb + approvals: commitdev/approvals@dev:approvals-orb jobs: # This job is useful when you've got a large git history and you want to be able to do a single shallow checkout and then From 9da116438f322d3be3cf75324319e52d086a8af6 Mon Sep 17 00:00:00 2001 From: Direside Date: Mon, 3 Feb 2020 12:03:16 -0800 Subject: [PATCH 04/30] Trigger build now 3rd part orbs enabled. --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6738537..1a07ced 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,6 +3,7 @@ version: 2.1 orbs: approvals: commitdev/approvals@dev:approvals-orb + jobs: # This job is useful when you've got a large git history and you want to be able to do a single shallow checkout and then # use a workspace to persist the checked out code for later jobs in the pipeline. From c827384a429d5454307c8bbb5a7620d6d7203938 Mon Sep 17 00:00:00 2001 From: Direside Date: Mon, 3 Feb 2020 12:14:07 -0800 Subject: [PATCH 05/30] Deploying to Production test with approvals orb. --- .circleci/config.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1a07ced..5233c2b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -182,10 +182,11 @@ jobs: docker: - image: circleci/python:3.8 steps: - - run: - name: The First Step + - approvals/get + - deploy: + name: Staging Deployment command: | - echo 'DEPLOYING PROD!!!' + echo 'Deploying to Production approved by $WORKFLOW_APPROVER' workflows: approval_workflow: From 49f4e433ae6e329ff3cd26d70750b8cd91503f67 Mon Sep 17 00:00:00 2001 From: Direside Date: Mon, 3 Feb 2020 13:20:54 -0800 Subject: [PATCH 06/30] Removed second approval step. --- .circleci/config.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5233c2b..d551b47 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -197,14 +197,9 @@ workflows: type: approval requires: - build - - wait_for_approve2: - type: approval - requires: - - build - deploy: requires: - wait_for_approve - - wait_for_approve2 docker_build_workflow: jobs: From 397b17fa36871050e23a260e8680613be30dda05 Mon Sep 17 00:00:00 2001 From: Direside Date: Tue, 4 Feb 2020 11:55:49 -0800 Subject: [PATCH 07/30] Testing released orb. --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d551b47..1b3a12c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,8 +1,7 @@ version: 2.1 orbs: - approvals: commitdev/approvals@dev:approvals-orb - + approvals: commitdev/approvals@0.0.1 jobs: # This job is useful when you've got a large git history and you want to be able to do a single shallow checkout and then From 8fa2eaef8180582ba61112b53bd141322d042fb7 Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 11:08:09 -0800 Subject: [PATCH 08/30] Testing queue and wait. --- .circleci/config.yml | 3 +++ examples/wait-for-approval/config.yml | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1b3a12c..3e31b67 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,6 +2,7 @@ version: 2.1 orbs: approvals: commitdev/approvals@0.0.1 + queue: eddiewebb/queue@1.4.2 jobs: # This job is useful when you've got a large git history and you want to be able to do a single shallow checkout and then @@ -182,6 +183,8 @@ jobs: - image: circleci/python:3.8 steps: - approvals/get + - queue/until_front_of_line: + time: '10' - deploy: name: Staging Deployment command: | diff --git a/examples/wait-for-approval/config.yml b/examples/wait-for-approval/config.yml index dd57d80..3871eb2 100644 --- a/examples/wait-for-approval/config.yml +++ b/examples/wait-for-approval/config.yml @@ -1,4 +1,8 @@ version: 2.1 + +orbs: + queue: eddiewebb/queue@1.4.2 + jobs: build: docker: @@ -23,6 +27,10 @@ jobs: docker: - image: circleci/python:3.8 steps: + - queue/until_front_of_line: + only-on-branch: master + time: '10' + - run: echo "This job will not overlap" - deploy: name: Staging Deployment command: | From 60bf80a221bc9aac5e9919d4e122543c5fbc5828 Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 11:08:52 -0800 Subject: [PATCH 09/30] Testing queue and wait. --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3e31b67..7c2a804 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -199,6 +199,9 @@ workflows: type: approval requires: - build + - deploy: + requires: + - build - deploy: requires: - wait_for_approve From bef0f6ffe76d68742f97a83d234cef5287d01282 Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 11:28:50 -0800 Subject: [PATCH 10/30] Testing queue and wait. --- .circleci/config.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7c2a804..fe44ce9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -205,6 +205,20 @@ workflows: - deploy: requires: - wait_for_approve + + approval_workflow_with_queue: + jobs: + - build + - test + - wait_for_approve: + type: approval + requires: + - build + - queue/until_front_of_line + - deploy: + requires: + - queue/until_front_of_line + - wait_for_approve docker_build_workflow: jobs: From ea66e6c15b67eaaf11ca8b41e29f253d8198c893 Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 11:34:31 -0800 Subject: [PATCH 11/30] Testing queue and wait. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fe44ce9..e3a8c9b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -214,7 +214,7 @@ workflows: type: approval requires: - build - - queue/until_front_of_line + - queue/block_workflow - deploy: requires: - queue/until_front_of_line From cfba88d0e6228c966a46329aa7884e5d17cc29cb Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 11:37:08 -0800 Subject: [PATCH 12/30] Testing queue and wait. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e3a8c9b..9c98009 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -217,7 +217,7 @@ workflows: - queue/block_workflow - deploy: requires: - - queue/until_front_of_line + - queue/block_workflow - wait_for_approve docker_build_workflow: From 451880a517c107df7644878e752240e4eb0a6aed Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 11:38:57 -0800 Subject: [PATCH 13/30] Testing queue and wait. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9c98009..bf09a5f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -205,7 +205,7 @@ workflows: - deploy: requires: - wait_for_approve - + approval_workflow_with_queue: jobs: - build From fba09c23068c8c2edfb26cb248c6430212bfb908 Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 11:40:31 -0800 Subject: [PATCH 14/30] Testing queue and wait. --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bf09a5f..c6d2bdf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -214,7 +214,9 @@ workflows: type: approval requires: - build - - queue/block_workflow + - queue/block_workflow: + requires: + - wait_for_approve - deploy: requires: - queue/block_workflow From f1757ea845274d1ee63abd8d1f6f59b83ddbb32f Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 14:40:00 -0800 Subject: [PATCH 15/30] Added delay to deployment. --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c6d2bdf..c391593 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -188,6 +188,7 @@ jobs: - deploy: name: Staging Deployment command: | + sleep 50 echo 'Deploying to Production approved by $WORKFLOW_APPROVER' workflows: @@ -205,7 +206,7 @@ workflows: - deploy: requires: - wait_for_approve - + approval_workflow_with_queue: jobs: - build From 1dba45a192f095047bbd640ab5ee8419c739aa86 Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 14:41:51 -0800 Subject: [PATCH 16/30] Added delay to deployment. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c391593..6022974 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -188,7 +188,7 @@ jobs: - deploy: name: Staging Deployment command: | - sleep 50 + sleep 52 echo 'Deploying to Production approved by $WORKFLOW_APPROVER' workflows: From 6ae360225b0166a7969de639535eb49f65c63cc1 Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 15:19:34 -0800 Subject: [PATCH 17/30] Fixed output. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6022974..bfb8aa4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 orbs: - approvals: commitdev/approvals@0.0.1 + approvals: commitdev/approvals@dev:approvals-orb queue: eddiewebb/queue@1.4.2 jobs: From fab996c68806981d4926c265f3af660eec1fa2b9 Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 15:37:54 -0800 Subject: [PATCH 18/30] New version of approvals orb. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bfb8aa4..cf2ddc7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 orbs: - approvals: commitdev/approvals@dev:approvals-orb + approvals: commitdev/approvals@0.0.2 queue: eddiewebb/queue@1.4.2 jobs: From 7e8706d6bac72124f383ce4b5c109f64987dabf9 Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 18:01:04 -0800 Subject: [PATCH 19/30] Trying 3 workflows. --- .circleci/config.yml | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cf2ddc7..f48f252 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -178,7 +178,20 @@ jobs: echo 'Hello World!' echo 'This is the delivery pipeline' - deploy: + deploy_with_queue: + docker: + - image: circleci/python:3.8 + steps: + - approvals/get + - queue/until_front_of_line: + time: '10' + - deploy: + name: Staging Deployment + command: | + sleep 52 + echo 'Deploying to Production approved by $WORKFLOW_APPROVER' + + deploy_with_queue: docker: - image: circleci/python:3.8 steps: @@ -192,22 +205,15 @@ jobs: echo 'Deploying to Production approved by $WORKFLOW_APPROVER' workflows: - approval_workflow: + approval_workflow_ONE: jobs: - build - test - - wait_for_approve: - type: approval - requires: - - build - - deploy: + - deploy_with_queue: requires: - build - - deploy: - requires: - - wait_for_approve - approval_workflow_with_queue: + approval_workflow_TWO: jobs: - build - test @@ -221,6 +227,20 @@ workflows: - deploy: requires: - queue/block_workflow + + approval_workflow_THREE: + jobs: + - build + - test + - queue/block_workflow: + requires: + - build + - wait_for_approve: + type: approval + requires: + - queue/block_workflow + - deploy: + requires: - wait_for_approve docker_build_workflow: From eb83999acf0f5f70302628cd680bb39df92df319 Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 18:01:39 -0800 Subject: [PATCH 20/30] Testing... --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index f48f252..402c997 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -205,6 +205,7 @@ jobs: echo 'Deploying to Production approved by $WORKFLOW_APPROVER' workflows: + # Trigger 1 approval_workflow_ONE: jobs: - build From 4919275026ae9d3253db3046c009af1739042037 Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 18:02:53 -0800 Subject: [PATCH 21/30] Testing... --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 402c997..c39f3e6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -205,7 +205,7 @@ jobs: echo 'Deploying to Production approved by $WORKFLOW_APPROVER' workflows: - # Trigger 1 + # Trigger 2 approval_workflow_ONE: jobs: - build From 122d0036dc03a4578d69eaae4e828bd5b6fed5fe Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 18:05:36 -0800 Subject: [PATCH 22/30] Testing... --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c39f3e6..9d3e400 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -178,7 +178,7 @@ jobs: echo 'Hello World!' echo 'This is the delivery pipeline' - deploy_with_queue: + deploy: docker: - image: circleci/python:3.8 steps: From d55c73e83eaa669dab40b8d28aac4be481808962 Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 18:05:49 -0800 Subject: [PATCH 23/30] Testing... --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9d3e400..7e6b0b2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -205,7 +205,7 @@ jobs: echo 'Deploying to Production approved by $WORKFLOW_APPROVER' workflows: - # Trigger 2 + # Trigger 3 approval_workflow_ONE: jobs: - build From e9b1648b74300d5f4c3f3a0bbddb9886c2eeeecf Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 18:06:55 -0800 Subject: [PATCH 24/30] Testing... --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7e6b0b2..8c2533f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -205,7 +205,7 @@ jobs: echo 'Deploying to Production approved by $WORKFLOW_APPROVER' workflows: - # Trigger 3 + # Trigger 4 approval_workflow_ONE: jobs: - build From 9e5d8ef962149af4e8d4b4c4d9f817c714bade89 Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 18:13:43 -0800 Subject: [PATCH 25/30] Testing... --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8c2533f..9385ef6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -205,7 +205,7 @@ jobs: echo 'Deploying to Production approved by $WORKFLOW_APPROVER' workflows: - # Trigger 4 + # Trigger 1b approval_workflow_ONE: jobs: - build From 3a446de52a1a3cd0536836f056c29fba84c79810 Mon Sep 17 00:00:00 2001 From: Direside Date: Wed, 5 Feb 2020 18:14:22 -0800 Subject: [PATCH 26/30] Testing... --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9385ef6..d13544d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -205,7 +205,7 @@ jobs: echo 'Deploying to Production approved by $WORKFLOW_APPROVER' workflows: - # Trigger 1b + # Trigger 2b approval_workflow_ONE: jobs: - build From d1237082f60054fa774deebc85fb42ecdfc2ac3e Mon Sep 17 00:00:00 2001 From: Direside Date: Thu, 5 Mar 2020 11:02:27 -0800 Subject: [PATCH 27/30] Added params to deployments. --- .circleci/config.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d13544d..7288d56 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -183,8 +183,6 @@ jobs: - image: circleci/python:3.8 steps: - approvals/get - - queue/until_front_of_line: - time: '10' - deploy: name: Staging Deployment command: | @@ -205,7 +203,22 @@ jobs: echo 'Deploying to Production approved by $WORKFLOW_APPROVER' workflows: - # Trigger 2b + approval_workflow_ENVIRONMENTS: + jobs: + - build + - test + - deploy: + environment: staging + blocking: true + - e2e_test: + environment: staging + blocking: true + - deploy: + environment: production + blocking: true + - post_deploy: + environment: production + blocking: false # Allows us to have steps run that don't block other deploys to this environment.1 approval_workflow_ONE: jobs: - build From 073cbd021aec3512a5a28f158a944918c59aaa84 Mon Sep 17 00:00:00 2001 From: Direside Date: Thu, 5 Mar 2020 11:08:39 -0800 Subject: [PATCH 28/30] Added parameters for jobs. --- .circleci/config.yml | 139 ++++++++++++++++++++++++++++--------------- 1 file changed, 92 insertions(+), 47 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7288d56..1ef9df9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -178,9 +178,36 @@ jobs: echo 'Hello World!' echo 'This is the delivery pipeline' + e2e_test: + docker: + - image: circleci/node:12 + parameters: + environment: + type: string + description: Environment to test. + blocking: + type: boolean + default: true + description: | + Whether this step running will block all other jobs against this environment. + steps: + - run: + command: | + sleep 120 + echo 'Done testing << parameters.environment >>' + deploy: docker: - image: circleci/python:3.8 + parameters: + environment: + type: string + description: Environment to test. + blocking: + type: boolean + default: true + description: | + Whether this step running will block all other jobs against this environment. steps: - approvals/get - deploy: @@ -189,6 +216,24 @@ jobs: sleep 52 echo 'Deploying to Production approved by $WORKFLOW_APPROVER' + post_deploy: + docker: + - image: circleci/node:12 + parameters: + environment: + type: string + description: Environment to test. + blocking: + type: boolean + default: true + description: | + Whether this step running will block all other jobs against this environment. + steps: + - run: + command: | + sleep 120 + echo 'Done post-deploy for << parameters.environment >>' + deploy_with_queue: docker: - image: circleci/python:3.8 @@ -219,53 +264,53 @@ workflows: - post_deploy: environment: production blocking: false # Allows us to have steps run that don't block other deploys to this environment.1 - approval_workflow_ONE: - jobs: - - build - - test - - deploy_with_queue: - requires: - - build + # approval_workflow_ONE: + # jobs: + # - build + # - test + # - deploy_with_queue: + # requires: + # - build - approval_workflow_TWO: - jobs: - - build - - test - - wait_for_approve: - type: approval - requires: - - build - - queue/block_workflow: - requires: - - wait_for_approve - - deploy: - requires: - - queue/block_workflow + # approval_workflow_TWO: + # jobs: + # - build + # - test + # - wait_for_approve: + # type: approval + # requires: + # - build + # - queue/block_workflow: + # requires: + # - wait_for_approve + # - deploy: + # requires: + # - queue/block_workflow - approval_workflow_THREE: - jobs: - - build - - test - - queue/block_workflow: - requires: - - build - - wait_for_approve: - type: approval - requires: - - queue/block_workflow - - deploy: - requires: - - wait_for_approve + # approval_workflow_THREE: + # jobs: + # - build + # - test + # - queue/block_workflow: + # requires: + # - build + # - wait_for_approve: + # type: approval + # requires: + # - queue/block_workflow + # - deploy: + # requires: + # - wait_for_approve - docker_build_workflow: - jobs: - - shallow_checkout_and_save_workspace - - go_build: - requires: - - shallow_checkout_and_save_workspace - - basic_docker_build: - requires: - - go_build - - basic_docker_build_remote_docker: - requires: - - go_build + # docker_build_workflow: + # jobs: + # - shallow_checkout_and_save_workspace + # - go_build: + # requires: + # - shallow_checkout_and_save_workspace + # - basic_docker_build: + # requires: + # - go_build + # - basic_docker_build_remote_docker: + # requires: + # - go_build From 9459614a02785778d00fe5a8a5f8358e3ea92c87 Mon Sep 17 00:00:00 2001 From: Direside Date: Thu, 5 Mar 2020 11:38:46 -0800 Subject: [PATCH 29/30] Created workflow. --- .circleci/config.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1ef9df9..243d474 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -253,17 +253,29 @@ workflows: - build - test - deploy: + name: deploy_staging environment: staging blocking: true + requires: + - build + - test - e2e_test: environment: staging blocking: true + requires: + - deploy_staging - deploy: + name: deploy_production environment: production blocking: true + requires: + - e2e_test - post_deploy: environment: production - blocking: false # Allows us to have steps run that don't block other deploys to this environment.1 + blocking: false # Allows us to have steps run that don't block other deploys to this environment. + requires: + - deploy_production + # approval_workflow_ONE: # jobs: # - build From 5ec200964538961c6556e408740b9ff2c9fa71df Mon Sep 17 00:00:00 2001 From: Direside Date: Thu, 5 Mar 2020 15:20:38 -0800 Subject: [PATCH 30/30] Adding a second workflow to make sure I have the heirarchy correct. --- .circleci/config.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 243d474..4409948 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -276,13 +276,13 @@ workflows: requires: - deploy_production - # approval_workflow_ONE: - # jobs: - # - build - # - test - # - deploy_with_queue: - # requires: - # - build + approval_workflow_OTHER: + jobs: + - build + - test + - deploy_with_queue: + requires: + - build # approval_workflow_TWO: # jobs: