From 89852346f8f614bb9ea4301ddbb26d5888266588 Mon Sep 17 00:00:00 2001 From: dandds Date: Fri, 12 Jul 2019 11:21:15 -0400 Subject: [PATCH] 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. --- .circleci/config.yml | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 11bc63a0..b9d73612 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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: appEnvironment: &appEnvironment @@ -21,10 +25,6 @@ jobs: - checkout - run: sudo apt-get update - run: sudo apt-get install postgresql-client-9.6 - - run: - name: "Clone Submodules" - command: | - git submodule update --init --recursive - attach_workspace: at: . - run: ./script/setup @@ -74,6 +74,7 @@ jobs: name: "Run Tests" command: ./script/cibuild + workflows: version: 2 run-tests: @@ -82,3 +83,23 @@ workflows: - test: requires: - 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