Skip to content

Commit

Permalink
26294: Accelerator Pipeline Adjustments (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
oZakari authored Apr 4, 2023
1 parent df8a6ca commit 1ccf0a7
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 12 deletions.
1 change: 1 addition & 0 deletions accelerator/.github/workflows/alz-bicep-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ env:
UPSTREAM_RELEASE_VERSION: ""
MANAGEMENT_SUBSCRIPTION_ID: ""
TOP_LEVEL_MG_PREFIX: ""
LOGGING_RESOURCE_GROUP: ""

jobs:
ALZ_Bicep_1_Workflow_Job:
Expand Down
2 changes: 1 addition & 1 deletion accelerator/.github/workflows/alz-bicep-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
subscription-id: ${{ env.MANAGEMENT_SUBSCRIPTION_ID }}
enable-AzPSSession: true

# Example: Modify Deploy-ALZRoleAssignments.ps1 with applicable pararameter file and uncomment lines below to enable Role Assignments Deployment.
Expand Down
2 changes: 1 addition & 1 deletion accelerator/.github/workflows/alz-bicep-3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
subscription-id: ${{ env.MANAGEMENT_SUBSCRIPTION_ID }}
enable-AzPSSession: true

- name: "Deploy Subscription Placement"
Expand Down
1 change: 1 addition & 0 deletions accelerator/.github/workflows/alz-bicep-4a.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:
UPSTREAM_RELEASE_VERSION: ""
CONNECTIVITY_SUBSCRIPTION_ID: ""
TOP_LEVEL_MG_PREFIX: ""
CONNECTIVITY_RESOURCE_GROUP: ""

jobs:
ALZ_Bicep_4a_Workflow_Job:
Expand Down
3 changes: 2 additions & 1 deletion accelerator/.github/workflows/alz-bicep-4b.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "main"
paths:
- "config/custom-parameters/resourceGroupConnectivity.parameters.all.json"
- "config/custom-parameters/hubNetworking.parameters.all.json"
- "config/custom-parameters/vwanConnectivity.parameters.all.json"
workflow_dispatch:

permissions:
Expand All @@ -18,6 +18,7 @@ env:
UPSTREAM_RELEASE_VERSION: ""
CONNECTIVITY_SUBSCRIPTION_ID: ""
TOP_LEVEL_MG_PREFIX: ""
CONNECTIVITY_RESOURCE_GROUP: ""

jobs:
ALZ_Bicep_4b_Workflow_Job:
Expand Down
19 changes: 17 additions & 2 deletions accelerator/.github/workflows/alz-bicep-pr-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,27 @@ jobs:
$bicepVersion = bicep --version
Write-Information "=====> Now installed Bicep version is: $bicepVersion <=====" -InformationAction Continue
- name: Check for Custom Modules
shell: pwsh
working-directory: config
run: |
if (Test-Path -Path ./custom-modules/*)
{
echo "CUSTOM_MODULES=true" >> $env:GITHUB_ENV
echo "Set CUSTOM_MODULES to true"
}
else
{
echo "Set CUSTOM_MODULES to false"
}
- name: Bicep Build & Lint All Custom Modules
shell: pwsh
if: ${{ env.CUSTOM_MODULES == 'true' }}
working-directory: config/custom-modules
run: |
$output = @()
Get-ChildItem -Recurse -Filter '*.bicep' -Exclude 'callModuleFromACR.example.bicep','orchHubSpoke.bicep' | ForEach-Object {
Get-ChildItem -Recurse -Filter '*.bicep' | ForEach-Object {
Write-Information "==> Attempting Bicep Build For File: $_" -InformationAction Continue
$bicepOutput = bicep build $_.FullName 2>&1
if ($LastExitCode -ne 0)
Expand All @@ -57,7 +72,7 @@ jobs:
$output += "$($item) `r`n"
}
}
Else
else
{
echo "Bicep Build Successful for File: $_"
}
Expand Down
4 changes: 2 additions & 2 deletions accelerator/pipeline-scripts/Deploy-ALZHub-HubAndSpoke.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param (
[String]$ConnectivitySubscriptionId = "$($env:CONNECTIVITY_SUBSCRIPTION_ID)",

[Parameter()]
[String]$TopLevelMGPrefix = "$($env:TOP_LEVEL_MG_PREFIX)",
[String]$ConnectivityResourceGroup = "$($env:CONNECTIVITY_RESOURCE_GROUP)",

[Parameter()]
[String]$TemplateFile = "upstream-releases\$($env:UPSTREAM_RELEASE_VERSION)\infra-as-code\bicep\modules\hubNetworking\hubNetworking.bicep",
Expand All @@ -15,7 +15,7 @@ param (
# Parameters necessary for deployment
$inputObject = @{
DeploymentName = 'alz-Hub-and-SpokeDeploy-{0}' -f ( -join (Get-Date -Format 'yyyyMMddTHHMMssffffZ')[0..63])
ResourceGroupName = "rg-$TopLevelMGPrefix-hub-networking-001"
ResourceGroupName = $ConnectivityResourceGroup
TemplateFile = $TemplateFile
TemplateParameterFile = $TemplateParameterFile
Verbose = $true
Expand Down
6 changes: 3 additions & 3 deletions accelerator/pipeline-scripts/Deploy-ALZHub-VWAN.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param (
[String]$ConnectivitySubscriptionId = "$($env:CONNECTIVITY_SUBSCRIPTION_ID)",

[Parameter()]
[String]$TopLevelMGPrefix = "$($env:TOP_LEVEL_MG_PREFIX)",
[String]$ConnectivityResourceGroup = "$($env:CONNECTIVITY_RESOURCE_GROUP)",

[Parameter()]
[String]$TemplateFile = "upstream-releases\$($env:UPSTREAM_RELEASE_VERSION)\infra-as-code\bicep\modules\vwanConnectivity\vwanConnectivity.bicep",
Expand All @@ -14,8 +14,8 @@ param (

# Parameters necessary for deployment
$inputObject = @{
DeploymentName = 'alz-VWAN-{0}' -f ( -join (Get-Date -Format 'yyyyMMddTHHMMssffffZ')[0..63])
ResourceGroupName = "rg-$TopLevelMGPrefix-hub-networking-001"
DeploymentName = 'alz-VWANDeploy-{0}' -f ( -join (Get-Date -Format 'yyyyMMddTHHMMssffffZ')[0..63])
ResourceGroupName = $ConnectivityResourceGroup
TemplateFile = $TemplateFile
TemplateParameterFile = $TemplateParameterFile
Verbose = $true
Expand Down
4 changes: 2 additions & 2 deletions accelerator/pipeline-scripts/Deploy-ALZLoggingAndSentinel.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param (
[String]$ManagementSubscriptionId = "$($env:MANAGEMENT_SUBSCRIPTION_ID)",

[Parameter()]
[String]$TopLevelMGPrefix = "$($env:TOP_LEVEL_MG_PREFIX)",
[String]$LoggingResourceGroup = "$($env:LOGGING_RESOURCE_GROUP)",

[Parameter()]
[String]$TemplateFile = "upstream-releases\$($env:UPSTREAM_RELEASE_VERSION)\infra-as-code\bicep\modules\logging\logging.bicep",
Expand All @@ -15,7 +15,7 @@ param (
# Parameters necessary for deployment
$inputObject = @{
DeploymentName = 'alz-LoggingDeploy-{0}' -f ( -join (Get-Date -Format 'yyyyMMddTHHMMssffffZ')[0..63])
ResourceGroupName = "rg-$TopLevelMGPrefix-logging-001"
ResourceGroupName = $LoggingResourceGroup
TemplateFile = $TemplateFile
TemplateParameterFile = $TemplateParameterFile
Verbose = $true
Expand Down

0 comments on commit 1ccf0a7

Please sign in to comment.