-
Notifications
You must be signed in to change notification settings - Fork 58
159 lines (137 loc) · 4.25 KB
/
services-ci.yml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
---
name: ARO HCP Dev Environment Continuous Deployment
env:
DEPLOY_ENV: dev
on:
workflow_call:
inputs:
push:
description: 'Push to the registry'
required: true
type: boolean
secrets:
AZURE_CLIENT_ID:
description: 'Azure Client ID'
required: true
AZURE_TENANT_ID:
description: 'Azure Tenant ID'
required: true
AZURE_SUBSCRIPTION_ID:
description: 'Azure Subscription ID'
required: true
concurrency:
group: ${{ github.workflow }}-service-ci
cancel-in-progress: false
jobs:
build_push_frontend:
permissions:
id-token: 'write'
contents: 'read'
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: Build frontend container image
run: |
cd frontend/
make image
- name: "install azure-cli"
if: inputs.push == true
uses: "Azure/ARO-HCP@main"
- name: 'Az CLI login'
if: inputs.push == true
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Push frontend container image
if: inputs.push == true
run: |
cd frontend/
make push
build_push_backend:
permissions:
id-token: 'write'
contents: 'read'
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: Build backend container image
run: |
cd backend/
make image
- name: "install azure-cli"
if: inputs.push == true
uses: "Azure/ARO-HCP@main"
- name: 'Az CLI login'
if: inputs.push == true
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Push backend container image
if: inputs.push == true
run: |
cd backend/
make push
build_push_ocmirror:
permissions:
id-token: 'write'
contents: 'read'
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: Build oc-mirror container image
run: |
cd image-sync/oc-mirror
make image
- name: "install azure-cli"
if: inputs.push == true
uses: "Azure/ARO-HCP@main"
- name: 'Az CLI login'
if: inputs.push == true
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Push oc-mirror container image
if: inputs.push == true
run: |
cd image-sync/oc-mirror
make push
build_push_imagesync:
permissions:
id-token: 'write'
contents: 'read'
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: Build image-sync container image
run: |
cd tooling/image-sync
make image
- name: "install azure-cli"
if: inputs.push == true
uses: "Azure/ARO-HCP@main"
- name: 'Az CLI login'
if: inputs.push == true
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Push image-sync container image
if: inputs.push == true
run: |
cd tooling/image-sync
make push