From b3cb1e9cafc381c4c7b2de5fea676e1af54d955f Mon Sep 17 00:00:00 2001 From: paulbourelly999 <77466294+paulbourelly999@users.noreply.github.com> Date: Thu, 12 May 2022 14:50:02 -0400 Subject: [PATCH] Issue-369:Added automated release image push (#370) --- .circleci/config.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d90ebb815..225d7bcf0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -207,6 +207,40 @@ jobs: docker push usdotfhwaops/v2xhubarm:latest docker push usdotfhwaops/port-drayage-webservice_arm:latest docker push usdotfhwaops/php_arm:latest + automated_release : + machine: + image: ubuntu-2004:202201-02 + steps: + - run: + name: Docker Pull Release + # Pull all built images associated with github tag + command: | + docker pull usdotfhwaops/php:master + docker pull usdotfhwaops/port-drayage-webservice:master + docker pull usdotfhwaops/v2xhubamd:master + docker pull usdotfhwaops/php_arm:master + docker pull usdotfhwaops/port-drayage-webservice_arm:master + docker pull usdotfhwaops/v2xhubarm:master + - run: + name: Docker Tag Release + # Tag all pulled images with github tag name + command: | + docker tag usdotfhwaops/php:master usdotfhwaops/php:${CIRCLE_TAG} + docker tag usdotfhwaops/port-drayage-webservice:master usdotfhwaops/port-drayage-webservice:${CIRCLE_TAG} + docker tag usdotfhwaops/v2xhubamd:master usdotfhwaops/v2xhubamd:${CIRCLE_TAG} + docker tag usdotfhwaops/php_arm:master usdotfhwaops/php_arm:${CIRCLE_TAG} + docker tag usdotfhwaops/port-drayage-webservice_arm:master usdotfhwaops/port-drayage-webservice_arm:${CIRCLE_TAG} + docker tag usdotfhwaops/v2xhubarm:master usdotfhwaops/v2xhubarm:${CIRCLE_TAG} + - run: + name: Docker Push Release Tag + # Push all tagged images + command: | + docker push usdotfhwaops/php:${CIRCLE_TAG} + docker push usdotfhwaops/port-drayage-webservice:${CIRCLE_TAG} + docker push usdotfhwaops/v2xhubamd:${CIRCLE_TAG} + docker push usdotfhwaops/php_arm:${CIRCLE_TAG} + docker push usdotfhwaops/port-drayage-webservice_arm:${CIRCLE_TAG} + docker push usdotfhwaops/v2xhubarm:${CIRCLE_TAG} workflows: version: 2 build: @@ -233,5 +267,14 @@ workflows: - sonar-scanner_develop: requires: - docker_build_push_develop + - automated_release: + requires: + - docker_build_push + - arm_build_push + filters: + tags: + only: ^[\.0-9]*$ + branches: + only: master