Skip to content

Commit 4ebbb48

Browse files
committed
Stop publishing to Aurora and ghcr; publish and deploy via robotics ACRs
1 parent 391b4e1 commit 4ebbb48

3 files changed

Lines changed: 13 additions & 57 deletions

File tree

.github/workflows/deploy_to_development.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ concurrency:
66

77
permissions:
88
contents: read
9-
packages: write
109

1110
on:
1211
push:
@@ -24,30 +23,29 @@ jobs:
2423
SHA_SHORT=$(echo ${{ github.sha }} | cut -c1-8)
2524
echo "tag=$SHA_SHORT" >> "$GITHUB_OUTPUT"
2625
27-
build-and-push-flotilla-components-to-github-container-registry:
28-
name: Build and push flotilla components to github container registry
26+
build-and-push-flotilla-components-to-robotics-staging-registry:
27+
name: Build and push flotilla components to robotics staging container registry
2928
needs: get-short-sha
3029
permissions:
3130
contents: read
32-
packages: write
3331
strategy:
3432
matrix:
3533
component: [broker, backend, frontend]
3634
uses: equinor/armada/.github/workflows/build_and_publish_docker_image_to_container_registry.yml@main
3735
with:
38-
registry: ghcr.io
39-
image_name: ${{ github.repository }}-${{ matrix.component }}
36+
registry: roboticsstagingacr.azurecr.io
37+
image_name: robotics/flotilla-${{ matrix.component }}
4038
tag: "dev.${{ needs.get-short-sha.outputs.tag }}"
4139
secondary_tag: dev
4240
path_to_dockerfile: ${{ matrix.component}}/Dockerfile
4341
path_to_context: ./${{ matrix.component}}
4442
secrets:
45-
registry_password: ${{ secrets.GITHUB_TOKEN }}
46-
registry_username: ${{ github.actor }}
43+
registry_password: ${{ secrets.ROBOTICS_ROBOTICSSTAGINGACR_PASSWORD }}
44+
registry_username: ${{ secrets.ROBOTICS_ROBOTICSSTAGINGACR_USERNAME }}
4745

4846
deploy:
4947
name: Update deployment in Development
50-
needs: [build-and-push-flotilla-components-to-github-container-registry, get-short-sha]
48+
needs: [build-and-push-flotilla-components-to-robotics-staging-registry, get-short-sha]
5149
permissions:
5250
contents: read
5351
strategy:
@@ -57,8 +55,8 @@ jobs:
5755
uses: equinor/armada/.github/workflows/update_kubernetes_deployment.yml@main
5856
with:
5957
environment: development
60-
registry: ghcr.io
61-
image_name: ${{ github.repository }}-${{ matrix.component }}
58+
registry: roboticsstagingacr.azurecr.io
59+
image_name: robotics/flotilla-${{ matrix.component }}
6260
tag: "dev.${{ needs.get-short-sha.outputs.tag }}"
6361
author_email: ${{ github.event.head_commit.author.email }}
6462
author_name: ${{ github.event.head_commit.author.name }}

.github/workflows/deploy_to_staging.yml

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ concurrency:
77
permissions:
88
contents: read
99
pull-requests: read
10-
packages: write
1110

1211
on:
1312
release:
@@ -26,51 +25,10 @@ jobs:
2625
working_directory: backend/api
2726
azure_subscription_id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
2827

29-
build-and-push-flotilla-components-with-latest-tag-to-github-container-registry:
30-
name: Build and push flotilla components with latest tag to github container registry
31-
permissions:
32-
contents: read
33-
packages: write
34-
strategy:
35-
matrix:
36-
component: [broker, backend, frontend]
37-
uses: equinor/armada/.github/workflows/build_and_publish_docker_image_to_container_registry.yml@main
38-
with:
39-
registry: ghcr.io
40-
image_name: ${{ github.repository }}-${{ matrix.component }}
41-
tag: ${{ github.event.release.tag_name }}
42-
secondary_tag: latest
43-
path_to_dockerfile: ${{ matrix.component}}/Dockerfile
44-
path_to_context: ./${{ matrix.component}}
45-
secrets:
46-
registry_password: ${{ secrets.GITHUB_TOKEN }}
47-
registry_username: ${{ github.actor }}
48-
49-
build-and-push-latest-release-flotilla-component-to-aurora-prod-container-registry:
50-
name: Build and push latest release flotilla components to aurora prod container registry
51-
permissions:
52-
contents: read
53-
packages: write
54-
strategy:
55-
matrix:
56-
component: [broker, backend, frontend]
57-
uses: equinor/armada/.github/workflows/build_and_publish_docker_image_to_container_registry.yml@main
58-
with:
59-
registry: auroraprodacr.azurecr.io
60-
image_name: robotics/flotilla-${{ matrix.component }}
61-
tag: ${{ github.event.release.tag_name }}
62-
secondary_tag: latest
63-
path_to_dockerfile: ${{ matrix.component}}/Dockerfile
64-
path_to_context: ./${{ matrix.component}}
65-
secrets:
66-
registry_password: ${{ secrets.AURORA_CONTAINER_REGISTRY_PROD_PASSWORD }}
67-
registry_username: ${{ secrets.AURORA_CONTAINER_REGISTRY_PROD_USERNAME }}
68-
6928
build-and-push-latest-release-flotilla-component-to-robotics-staging-container-registry:
7029
name: Build and push latest release flotilla components to robotics staging container registry
7130
permissions:
7231
contents: read
73-
packages: write
7432
strategy:
7533
matrix:
7634
component: [broker, backend, frontend]
@@ -90,15 +48,15 @@ jobs:
9048
name: Update deployment in Staging
9149
permissions:
9250
contents: read
93-
needs: build-and-push-latest-release-flotilla-component-to-aurora-prod-container-registry
51+
needs: build-and-push-latest-release-flotilla-component-to-robotics-staging-container-registry
9452
strategy:
9553
max-parallel: 1
9654
matrix:
9755
component: [frontend, backend, broker]
9856
uses: equinor/armada/.github/workflows/update_kubernetes_deployment.yml@main
9957
with:
10058
environment: staging
101-
registry: auroraprodacr.azurecr.io
59+
registry: roboticsstagingacr.azurecr.io
10260
image_name: robotics/flotilla-${{ matrix.component }}
10361
tag: ${{ github.event.release.tag_name }}
10462
author_name: ${{ github.event.release.author.login }}

.github/workflows/promote_to_production.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Get Flotilla version in staging
3939
id: get_version_tag
4040
run: |
41-
TAG_LINE_NUMBER=$(($(grep -n "auroraprodacr.azurecr.io/robotics/flotilla-frontend" k8s_kustomize/overlays/staging/kustomization.yaml | cut --delimiter=":" --fields=1)+1))
41+
TAG_LINE_NUMBER=$(($(grep -n "roboticsstagingacr.azurecr.io/robotics/flotilla-frontend" k8s_kustomize/overlays/staging/kustomization.yaml | cut --delimiter=":" --fields=1)+1))
4242
VERSION_TAG=$(sed -n "${TAG_LINE_NUMBER}p" k8s_kustomize/overlays/staging/kustomization.yaml | cut --delimiter=":" --fields=2 | tr -d '[:space:]')
4343
echo "tag=$VERSION_TAG" >> "$GITHUB_OUTPUT"
4444
@@ -96,7 +96,7 @@ jobs:
9696
with:
9797
environment: production
9898
tag: ${{ needs.get_staging_version.outputs.versionTag }}
99-
registry: auroraprodacr.azurecr.io
99+
registry: roboticsprodacr.azurecr.io
100100
image_name: robotics/flotilla-${{ matrix.component }}
101101
author_name: ${{ github.actor }}
102102
infrastructure_repository: equinor/robotics-infrastructure

0 commit comments

Comments
 (0)