Push images to CSP registries during CD.

Add config (CircleCI Orb recipes) for building Docker images and pushing
the results to both AWS and Azure Docker registries.
This commit is contained in:
dandds 2019-07-12 11:21:15 -04:00
parent beabd2ce72
commit 89852346f8

View File

@ -1,4 +1,8 @@
version: 2.0 version: 2.1
orbs:
aws-ecr: circleci/aws-ecr@4.0.1
azure-acr: circleci/azure-acr@0.1.1
defaults: defaults:
appEnvironment: &appEnvironment appEnvironment: &appEnvironment
@ -21,10 +25,6 @@ jobs:
- checkout - checkout
- run: sudo apt-get update - run: sudo apt-get update
- run: sudo apt-get install postgresql-client-9.6 - run: sudo apt-get install postgresql-client-9.6
- run:
name: "Clone Submodules"
command: |
git submodule update --init --recursive
- attach_workspace: - attach_workspace:
at: . at: .
- run: ./script/setup - run: ./script/setup
@ -74,6 +74,7 @@ jobs:
name: "Run Tests" name: "Run Tests"
command: ./script/cibuild command: ./script/cibuild
workflows: workflows:
version: 2 version: 2
run-tests: run-tests:
@ -82,3 +83,23 @@ workflows:
- test: - test:
requires: requires:
- app_setup - app_setup
- aws-ecr/build_and_push_image:
repo: atat
tag: "${CIRCLE_SHA1}"
requires:
- test
filters:
branches:
only:
- master
- azure-acr/build_and_push_image:
login-server-name: "${AZURE_SERVER_NAME}"
registry-name: pwatat
repo: atat
tag: "${CIRCLE_SHA1}"
requires:
- test
filters:
branches:
only:
- master