Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
eaf003e
Adding Commit Orbs tests.
Direside Feb 3, 2020
ccfcbde
Fixed orb version tag.
Direside Feb 3, 2020
8f9b17d
Fixed orb version tag.
Direside Feb 3, 2020
9da1164
Trigger build now 3rd part orbs enabled.
Direside Feb 3, 2020
c827384
Deploying to Production test with approvals orb.
Direside Feb 3, 2020
49f4e43
Removed second approval step.
Direside Feb 3, 2020
397b17f
Testing released orb.
Direside Feb 4, 2020
8fa2eae
Testing queue and wait.
Direside Feb 5, 2020
60bf80a
Testing queue and wait.
Direside Feb 5, 2020
bef0f6f
Testing queue and wait.
Direside Feb 5, 2020
ea66e6c
Testing queue and wait.
Direside Feb 5, 2020
cfba88d
Testing queue and wait.
Direside Feb 5, 2020
451880a
Testing queue and wait.
Direside Feb 5, 2020
fba09c2
Testing queue and wait.
Direside Feb 5, 2020
f1757ea
Added delay to deployment.
Direside Feb 5, 2020
1dba45a
Added delay to deployment.
Direside Feb 5, 2020
6ae3602
Fixed output.
Direside Feb 5, 2020
fab996c
New version of approvals orb.
Direside Feb 5, 2020
7e8706d
Trying 3 workflows.
Direside Feb 6, 2020
eb83999
Testing...
Direside Feb 6, 2020
4919275
Testing...
Direside Feb 6, 2020
122d003
Testing...
Direside Feb 6, 2020
d55c73e
Testing...
Direside Feb 6, 2020
e9b1648
Testing...
Direside Feb 6, 2020
9e5d8ef
Testing...
Direside Feb 6, 2020
3a446de
Testing...
Direside Feb 6, 2020
d123708
Added params to deployments.
Direside Mar 5, 2020
073cbd0
Added parameters for jobs.
Direside Mar 5, 2020
9459614
Created workflow.
Direside Mar 5, 2020
5ec2009
Adding a second workflow to make sure I have the heirarchy correct.
Direside Mar 5, 2020
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
154 changes: 134 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
version: 2.1

orbs:
approvals: commitdev/approvals@0.0.2
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
# use a workspace to persist the checked out code for later jobs in the pipeline.
Expand Down Expand Up @@ -173,42 +178,151 @@ 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:
name: Staging Deployment
command: |
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:
name: The First Step
command: |
echo 'DEPLOYING PROD!!!'
sleep 120
echo 'Done post-deploy for << parameters.environment >>'

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'

workflows:
approval_workflow:
approval_workflow_ENVIRONMENTS:
jobs:
- build
- test
- wait_for_approve:
type: approval
- deploy:
name: deploy_staging
environment: staging
blocking: true
requires:
- build
- wait_for_approve2:
type: approval
- test
- e2e_test:
environment: staging
blocking: true
requires:
- build
- deploy_staging
- deploy:
name: deploy_production
environment: production
blocking: true
requires:
- wait_for_approve
- wait_for_approve2
- e2e_test
- post_deploy:
environment: production
blocking: false # Allows us to have steps run that don't block other deploys to this environment.
requires:
- deploy_production

docker_build_workflow:
approval_workflow_OTHER:
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:
- build
- test
- deploy_with_queue:
requires:
- go_build
- 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_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
38 changes: 38 additions & 0 deletions examples/commit-orbs/approvals/config.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions examples/wait-for-approval/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
version: 2.1

orbs:
queue: eddiewebb/queue@1.4.2

jobs:
build:
docker:
Expand All @@ -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: |
Expand Down