-
Notifications
You must be signed in to change notification settings - Fork 45
69 lines (63 loc) · 2.18 KB
/
Copy pathdeploy_to_development.yml
File metadata and controls
69 lines (63 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Deploy to Development
concurrency:
group: development-concurrency
cancel-in-progress: true
permissions:
contents: read
packages: write
on:
push:
branches:
- "main"
jobs:
get-short-sha:
outputs:
tag: ${{ steps.get-tag.outputs.tag }}
runs-on: ubuntu-latest
steps:
- id: get-tag
run: |
SHA_SHORT=$(echo ${{ github.sha }} | cut -c1-8)
echo "tag=$SHA_SHORT" >> "$GITHUB_OUTPUT"
build-and-push-flotilla-components-to-robotics-staging-registry:
name: Build and push flotilla components to robotics dev container registry
needs: get-short-sha
permissions:
contents: read
packages: write
strategy:
matrix:
component: [broker, backend, frontend]
uses: equinor/armada/.github/workflows/build_and_publish_docker_image_to_container_registry.yml@main
with:
registry: roboticsdevacr.azurecr.io
image_name: robotics/flotilla-${{ matrix.component }}
tag: "dev.${{ needs.get-short-sha.outputs.tag }}"
secondary_tag: dev
path_to_dockerfile: ${{ matrix.component}}/Dockerfile
path_to_context: ./${{ matrix.component}}
secrets:
registry_password: ${{ secrets.ROBOTICS_ROBOTICSDEVACR_PASSWORD }}
registry_username: ${{ secrets.ROBOTICS_ROBOTICSDEVACR_USERNAME }}
deploy:
name: Update deployment in Development
needs: [build-and-push-flotilla-components-to-robotics-staging-registry, get-short-sha]
permissions:
contents: read
packages: write
strategy:
max-parallel: 1
matrix:
component: [frontend, backend, broker]
uses: equinor/armada/.github/workflows/update_kubernetes_deployment.yml@main
with:
environment: development
registry: roboticsdevacr.azurecr.io
image_name: robotics/flotilla-${{ matrix.component }}
tag: "dev.${{ needs.get-short-sha.outputs.tag }}"
author_email: ${{ github.event.head_commit.author.email }}
author_name: ${{ github.event.head_commit.author.name }}
infrastructure_repository: equinor/robotics-infrastructure
commit_message_service_name: Flotilla
secrets:
deploy_key: ${{ secrets.ROBOTICS_INFRASTRUCTURE_DEPLOY_KEY }}