Skip to content

Commit

Permalink
templatize makefile config and bicepparams
Browse files Browse the repository at this point in the history
using the tooling/templatize tool, the entire infrastructure and
service deployment is driven by the config/config.yaml file
  • Loading branch information
geoberle committed Oct 28, 2024
1 parent 6bc6002 commit 769a975
Show file tree
Hide file tree
Showing 118 changed files with 1,341 additions and 973 deletions.
14 changes: 14 additions & 0 deletions .github/actions/install-azure-cli/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Install azure-cli
description: Installs the azure cli.
runs:
using: composite
steps:
- name: install azure-cli
run: |
sudo apt-get install -y ca-certificates curl apt-transport-https lsb-release gnupg
curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null
AZ_REPO=$(lsb_release -cs)
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
sudo apt-get update
sudo apt-get install -y azure-cli
shell: bash
39 changes: 39 additions & 0 deletions .github/workflows/aro-hcp-dev-what-if.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: ARO HCP Integrated DEV Bicep What-If
env:
DEPLOY_ENV: dev
on:
pull_request:
branches:
- main
paths:
- 'dev-infrastructure/**/*.bicep'
- 'dev-infrastructure/**/*.bicepparam'
- 'dev-infrastructure/Makefile'
- '.github/workflows/aro-hcp-dev-bicep-what-if.yml'

jobs:
what-if:
permissions:
id-token: 'write'
contents: 'read'
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1

- name: 'Az CLI login'
uses: azure/login@6c251865b4e6290e7b78be643ea2d005bc51f69a # v2.1.1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Install Azure CLI
uses: ./.github/actions/install-azure-cli

- name: 'Deployment What If'
run: |
cd dev-infrastructure/
make what-if
114 changes: 0 additions & 114 deletions .github/workflows/bicep-what-if.yml

This file was deleted.

82 changes: 0 additions & 82 deletions .github/workflows/cs-integ-bicep-what-if.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/cs-pr-what-if.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: CS PR Check Environment Bicep What-If
env:
DEPLOY_ENV: cs-pr
on:
pull_request:
branches:
- main
paths:
- 'dev-infrastructure/**/*.bicep'
- 'dev-infrastructure/**/*.bicepparam'
- 'dev-infrastructure/Makefile'
- '.github/workflows/cs-pr-bicep-what-if.yml'

jobs:
what-if:
permissions:
id-token: 'write'
contents: 'read'
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1

- name: 'Az CLI login'
uses: azure/login@6c251865b4e6290e7b78be643ea2d005bc51f69a # v2.1.1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Install Azure CLI
uses: ./.github/actions/install-azure-cli

- name: 'Deployment What If'
run: |
cd dev-infrastructure/
make what-if
2 changes: 1 addition & 1 deletion .github/workflows/yaml-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
- name: Linters
uses: oxsecurity/megalinter/flavors/ci_light@v8
env:
FILTER_REGEX_EXCLUDE: 'hypershiftoperator/deploy/base/|hypershiftoperator/deploy/crds/|maestro/deploy/helm/|acm/deploy/helm/multicluster-engine-config/charts/policy/charts'
FILTER_REGEX_EXCLUDE: 'hypershiftoperator/deploy/base/|hypershiftoperator/deploy/crds/|maestro/server/helm/templates/allow-cluster-service.authorizationpolicy.yaml|acm/deploy/helm/multicluster-engine-config/charts/policy/charts'
1 change: 0 additions & 1 deletion .yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ yaml-files:
- '.yamllint'

rules:
braces: enable
brackets: enable
colons: enable
commas: enable
Expand Down
Loading

0 comments on commit 769a975

Please sign in to comment.