Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

26294: Accelerator Pipeline Adjustments #487

Merged
merged 7 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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