Skip to content

Commit 73b699a

Browse files
committed
templatize makefile config and bicepparams
using the tooling/templatize tool, the entire infrastructure and service deployment is driven by the config/config.yaml file Signed-off-by: Gerd Oberlechner <[email protected]>
1 parent 3754ccb commit 73b699a

File tree

151 files changed

+2191
-2133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+2191
-2133
lines changed

.github/workflows/aro-hcp-cd.yml

+177
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
---
2+
name: ARO HCP Continuous Deployment
3+
env:
4+
DEPLOY_ENV: dev
5+
SKIP_CONFIRM: true
6+
on:
7+
workflow_dispatch:
8+
pull_request:
9+
branches:
10+
- main
11+
paths:
12+
- '.github/workflows/aro-hcp-dev-env-cd.yml'
13+
- 'dev-infrastructure/**/*.bicep'
14+
- 'dev-infrastructure/**/*.bicepparam'
15+
- 'dev-infrastructure/configurations/*'
16+
- 'frontend/**'
17+
- 'backend/**'
18+
- 'cluster-service/**'
19+
- 'internal/**'
20+
- 'maestro/**'
21+
- 'pko/**'
22+
- 'acm/**'
23+
- 'hypershiftoperator/**'
24+
- 'image-sync/**/'
25+
- 'tooling/image-sync/**'
26+
- 'tooling/templatize/**'
27+
- 'config/*'
28+
types:
29+
- opened
30+
- synchronize
31+
- reopened
32+
- closed
33+
34+
concurrency:
35+
group: ${{ github.workflow }}
36+
cancel-in-progress: false
37+
38+
jobs:
39+
is_running_on_fork:
40+
name: 'Ensure PR is submitted from Azure/ARO-HCP'
41+
if: github.event_name != 'workflow_dispatch'
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Fail if PR submitted from fork
45+
if: ${{ github.event.pull_request.head.repo.full_name != 'Azure/ARO-HCP' }}
46+
run: core.setFailed('Expected source repository to be Azure/ARO-HCP, re-create PR as a branch of Azure/ARO-HCP')
47+
48+
deploy_global_rg:
49+
name: 'Deploy global resources'
50+
# if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
51+
permissions:
52+
id-token: 'write'
53+
contents: 'read'
54+
env:
55+
DEPLOY_ENV: dev
56+
runs-on: 'ubuntu-latest'
57+
steps:
58+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
59+
with:
60+
fetch-depth: 1
61+
62+
- name: 'Az CLI login'
63+
uses: azure/login@6c251865b4e6290e7b78be643ea2d005bc51f69a # v2.1.1
64+
with:
65+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
66+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
67+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
68+
69+
- name: "install azure-cli"
70+
uses: "Azure/ARO-HCP@main"
71+
72+
- name: 'Deploy'
73+
run: |
74+
cd dev-infrastructure/
75+
76+
# Manage ACR
77+
make acr acr-svc acr-ocp
78+
79+
deploy_image_sync_rg:
80+
name: 'Deploy Image Sync'
81+
#if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
82+
needs:
83+
- deploy_global_rg
84+
permissions:
85+
id-token: 'write'
86+
contents: 'read'
87+
env:
88+
DEPLOY_ENV: dev
89+
runs-on: 'ubuntu-latest'
90+
steps:
91+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
92+
with:
93+
fetch-depth: 1
94+
95+
- name: 'Az CLI login'
96+
uses: azure/login@6c251865b4e6290e7b78be643ea2d005bc51f69a # v2.1.1
97+
with:
98+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
99+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
100+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
101+
102+
- name: "install azure-cli"
103+
uses: "Azure/ARO-HCP@main"
104+
105+
- name: 'Deploy'
106+
run: |
107+
cd dev-infrastructure/
108+
make imagesync
109+
110+
service_ci:
111+
name: 'Build service images'
112+
permissions:
113+
id-token: 'write'
114+
contents: 'read'
115+
secrets: inherit
116+
uses: ./.github/workflows/services-ci.yml
117+
with:
118+
push: ${{ github.event.pull_request.merged == true }}
119+
120+
deploy_dev_environment_infra:
121+
name: 'Deploy integrated DEV infrastructure'
122+
# if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
123+
needs:
124+
- deploy_global_rg
125+
permissions:
126+
id-token: 'write'
127+
contents: 'read'
128+
secrets: inherit
129+
uses: ./.github/workflows/environment-infra-cd.yml
130+
with:
131+
deploy_env: dev
132+
133+
deploy_dev_environment_services:
134+
name: 'Deploy services to integrated DEV'
135+
# if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
136+
needs:
137+
- service_ci
138+
- deploy_dev_environment_infra
139+
permissions:
140+
id-token: 'write'
141+
contents: 'read'
142+
secrets: inherit
143+
uses: ./.github/workflows/services-cd.yml
144+
with:
145+
deploy_env: dev
146+
147+
#
148+
# # CS PR env deployment disabled during testing
149+
#
150+
# deploy_cs_pr_environment_infra:
151+
# name: 'Deploy CS PR infrastructure'
152+
# # if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
153+
# needs:
154+
# - deploy_global_rg
155+
# permissions:
156+
# id-token: 'write'
157+
# contents: 'read'
158+
# secrets: inherit
159+
# uses: ./.github/workflows/environment-infra-cd.yml
160+
# with:
161+
# deploy_env: cs-pr
162+
# deploy_cs_pr_check_deps: true
163+
164+
# deploy_cs_pr_environment_services:
165+
# name: 'Deploy services to CS PR'
166+
# # if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
167+
# needs:
168+
# - service_ci
169+
# - deploy_cs_pr_environment_infra
170+
# permissions:
171+
# id-token: 'write'
172+
# contents: 'read'
173+
# secrets: inherit
174+
# uses: ./.github/workflows/services-cd.yml
175+
# with:
176+
# deploy_env: cs-pr
177+
# deploy_cs_pr_check_deps: true

0 commit comments

Comments
 (0)