Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot Fix automated CircleCI workflow for git-tag triggered docker release image build and push on master #377

Merged
merged 2 commits into from
May 19, 2022
Merged
Changes from all commits
Commits
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
44 changes: 44 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,41 @@ 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: |
echo "$DOCKERHUB_PASSWORD" | docker login --username $DOCKERHUB_USERNAME --password-stdin
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:
Expand All @@ -233,5 +268,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