Skip to content

Commit e535623

Browse files
committed
Dual-push images to per-env robotics ACRs alongside Aurora
1 parent c564c0f commit e535623

2 files changed

Lines changed: 50 additions & 1 deletion

File tree

.github/workflows/deploy_to_staging.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,26 @@ jobs:
6666
registry_password: ${{ secrets.AURORA_CONTAINER_REGISTRY_PROD_PASSWORD }}
6767
registry_username: ${{ secrets.AURORA_CONTAINER_REGISTRY_PROD_USERNAME }}
6868

69+
build-and-push-latest-release-flotilla-component-to-robotics-staging-container-registry:
70+
name: Build and push latest release flotilla components to robotics staging container registry
71+
permissions:
72+
contents: read
73+
packages: write
74+
strategy:
75+
matrix:
76+
component: [broker, backend, frontend]
77+
uses: equinor/armada/.github/workflows/build_and_publish_docker_image_to_container_registry.yml@main
78+
with:
79+
registry: roboticsstagingacr.azurecr.io
80+
image_name: robotics/flotilla-${{ matrix.component }}
81+
tag: ${{ github.event.release.tag_name }}
82+
secondary_tag: latest
83+
path_to_dockerfile: ${{ matrix.component}}/Dockerfile
84+
path_to_context: ./${{ matrix.component}}
85+
secrets:
86+
registry_password: ${{ secrets.ROBOTICS_ROBOTICSSTAGINGACR_PASSWORD }}
87+
registry_username: ${{ secrets.ROBOTICS_ROBOTICSSTAGINGACR_USERNAME }}
88+
6989
deploy:
7090
name: Update deployment in Staging
7191
permissions:

.github/workflows/promote_to_production.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,38 @@ jobs:
5656
working_directory: backend/api
5757
azure_subscription_id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
5858

59+
copy-images-to-robotics-prod-registry:
60+
name: Copy staging images to robotics prod registry
61+
needs: [get_staging_version, trigger-github-deployment]
62+
runs-on: ubuntu-latest
63+
strategy:
64+
matrix:
65+
component: [broker, backend, frontend]
66+
steps:
67+
- name: Log in to robotics staging registry
68+
uses: docker/login-action@v3
69+
with:
70+
registry: roboticsstagingacr.azurecr.io
71+
username: ${{ secrets.ROBOTICS_ROBOTICSSTAGINGACR_USERNAME }}
72+
password: ${{ secrets.ROBOTICS_ROBOTICSSTAGINGACR_PASSWORD }}
73+
74+
- name: Log in to robotics prod registry
75+
uses: docker/login-action@v3
76+
with:
77+
registry: roboticsprodacr.azurecr.io
78+
username: ${{ secrets.ROBOTICS_ROBOTICSPRODACR_USERNAME }}
79+
password: ${{ secrets.ROBOTICS_ROBOTICSPRODACR_PASSWORD }}
80+
81+
- name: Copy image from staging to prod registry
82+
run: |
83+
docker buildx imagetools create \
84+
--tag roboticsprodacr.azurecr.io/robotics/flotilla-${{ matrix.component }}:${{ needs.get_staging_version.outputs.versionTag }} \
85+
--tag roboticsprodacr.azurecr.io/robotics/flotilla-${{ matrix.component }}:latest \
86+
roboticsstagingacr.azurecr.io/robotics/flotilla-${{ matrix.component }}:${{ needs.get_staging_version.outputs.versionTag }}
87+
5988
deploy:
6089
name: Update deployment in Production
61-
needs: [get_staging_version, trigger-github-deployment]
90+
needs: [get_staging_version, trigger-github-deployment, copy-images-to-robotics-prod-registry]
6291
strategy:
6392
max-parallel: 1
6493
matrix:

0 commit comments

Comments
 (0)