forked from Azure/ARO-HCP
-
Notifications
You must be signed in to change notification settings - Fork 0
158 lines (130 loc) · 4.55 KB
/
services-cd.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
---
name: ARO HCP Deploy Service Components
env:
DEPLOY_ENV: ${{ inputs.deploy_env }}
SKIP_CONFIRM: true
on:
workflow_call:
inputs:
deploy_env:
description: 'The deploy environment to use for service deployments'
required: true
type: string
deploy_cs_pr_check_deps:
description: 'Deploy PR check environment dependencies'
required: false
default: false
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-cd-${{ inputs.deploy_env }}
cancel-in-progress: false
jobs:
deploy_to_service_cluster:
permissions:
id-token: 'write'
contents: 'read'
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: "install azure-cli"
uses: "Azure/ARO-HCP@main"
- name: 'Az CLI login'
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- uses: azure/setup-kubectl@3e0aec4d80787158d308d7b364cb1b702e7feb7f # v4.0.0
# Used to deploy Cluster Service
- name: 'Install oc'
run: |
curl -sfLo - https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.15.9/openshift-client-linux.tar.gz | tar xzf -
sudo mv oc /usr/local/bin/oc
chmod +x /usr/local/bin/oc
# Used to deploy Maestro Server, Frontend
- uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
with:
version: 'v3.13.3'
- uses: azure/use-kubelogin@76597ae0fcbaace21b05e13a2cbf8daee2c6e820 # v1.2
with:
kubelogin-version: 'v0.1.3'
# Prepare kubeconfig
- name: 'Prepare kubeconfig'
run: |
cd dev-infrastructure/
make svc.aks.kubeconfig
- name: 'Deploy Istio Configuration'
run: |
make istio.deploy
- name: 'Deploy Frontend'
run: |
make frontend.deploy
- name: 'Deploy Backend'
run: |
make backend.deploy
- name: 'Deploy Cluster Service'
run: |
make cluster-service.deploy
- name: 'Deploy Maestro'
run: |
make maestro.server.deploy maestro.registration.deploy
- name: 'Deploy Prometheus Config'
run: |
make metrics.deploy
- name: 'Deploy CS PR check environment dressup'
if: inputs.deploy_cs_pr_check_deps
run: |
./svc-deploy.sh ${DEPLOY_ENV} cluster-service svc deploy-pr-env-deps
deploy_to_management_cluster:
permissions:
id-token: 'write'
contents: 'read'
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: "install azure-cli"
uses: "Azure/ARO-HCP@main"
- name: 'Az CLI login'
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- uses: azure/setup-kubectl@3e0aec4d80787158d308d7b364cb1b702e7feb7f # v4.0.0
- uses: azure/use-kubelogin@76597ae0fcbaace21b05e13a2cbf8daee2c6e820 # v1.2
with:
kubelogin-version: 'v0.1.3'
- uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
with:
version: 'v3.13.3'
# Prepare kubeconfig
- name: 'Prepare kubeconfig'
run: |
cd dev-infrastructure/
make mgmt.aks.kubeconfig
- name: 'Deploy PKO'
run: |
make pko.deploy
- name: 'Deploy ACM'
run: |
make acm.deploy
- name: 'Deploy Maestro Agent'
run: |
make maestro.agent.deploy
- name: 'Deploy Hypershift Operator and External DNS Operator'
run: |
make hypershiftoperator.deploy