Skip to content

Download jit #4

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

Merged
merged 3 commits into from
Mar 17, 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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ coverage.xml
.Trashes
ehthumbs.db
Thumbs.db
src/ALZ/Assets/alz-bicep-internal/
src/ALZ/Assets/alz-bicep-internal/
test_output/
35 changes: 0 additions & 35 deletions src/ALZ.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -432,41 +432,6 @@ Add-BuildTask CreateHelpComplete -After CreateExternalHelp {
Write-Build Green ' ...CreateHelp Complete!'
} #CreateHelpStart


Add-BuildTask DownloadALZReleases -After AssetCopy {
Write-Build White ' Downloading ALZ Bicep Supported releases'

$ALZReleases = Invoke-WebRequest -Uri 'https://api.github.com/repos/Azure/ALZ-Bicep/releases' -ErrorAction Stop | ConvertFrom-Json
$ALZReleases | ForEach-Object {
# Skip if the release is has been downloaded already
$tagName = $_.tag_name
$ALZReleaseZipballFileName = "ALZ-Bicep-$tagName"
# remove v from tag name
$alzDirectory = $tagName -replace '^v', ''
$downloadUrl = "https://github.com/Azure/ALZ-Bicep/archive/refs/tags/$tagName.zip"
$ALZReleaseZipballFilePath = "$script:ArtifactsPath/$ALZReleaseZipballFileName.zip"
if (Test-Path -Path "$script:ArtifactsPath/Assets/alz-bicep-internal/ALZ-Bicep-$alzDirectory") {
Write-Build Gray " Skipping $ALZReleaseZipballFileName because it already exists."
return
}
# skip if the release it is not one of the supported releases
if ($script:ALZBicepSupportedReleases -notcontains $tagName) {
Write-Build Gray " Skipping $ALZReleaseZipballFileName because it is not a supported release."
return
}
Write-Build Gray " Downloading $ALZReleaseZipballFileName..."
Invoke-WebRequest -Uri $downloadUrl -OutFile $ALZReleaseZipballFilePath -ErrorAction Stop
Write-Build Gray ' ...Download complete.'
Write-Build Gray ' Extracting ALZ release...'
Expand-Archive -Path $ALZReleaseZipballFilePath -DestinationPath "$script:ArtifactsPath/Assets/alz-bicep-internal/" -Force
Write-Build Gray ' ...Extraction complete.'
Write-Build Gray ' Removing zip file...'
Remove-Item -Path $ALZReleaseZipballFilePath -Force
Write-Build Gray ' ...Zip file removed.'
}
Write-Build Green ' ...ALZ releases downloaded!'
} #DownloadALZReleases

# Synopsis: Copies module assets to Artifacts folder
Add-BuildTask AssetCopy -Before Build {
Write-Build Gray ' Copying assets to Artifacts...'
Expand Down
225 changes: 211 additions & 14 deletions src/ALZ/Assets/alz-bicep-config/v0.13.0.config.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,219 @@
{
"orchestration": {
"01.managementGroups": {
"source": "infra-as-code/bicep/modules/managementGroups/managementGroups.bicep"
"version": "v0.13.0",
"module_url": "https://github.com/Azure/ALZ-Bicep",
"config_files": [
{
"source": "infra-as-code/bicep/modules/resourceGroup/parameters/resourceGroup.parameters.all.json",
"detination": "config/resourceGroup.parameters.json"
},
"02.policy.definitions": {
"source": "infra-as-code/bicep/modules/policy/definitions/customPolicyDefinitions.bicep"
{
"source": "infra-as-code/bicep/modules/policy/definitions/parameters/customPolicyDefinitions.parameters.all.json",
"destination": "config/customPolicyDefinitions.parameters.json"
}
],
"parameters": {
"Prefix": {
"Type": "UserInput",
"Description": "The prefix that will be added to all resources created by this deployment. (e.g. 'alz')",
"Targets": [
{
"Name": "parTopLevelManagementGroupPrefix",
"Destination": "Parameters"
},
{
"Name": "parCompanyPrefix",
"Destination": "Parameters"
},
{
"Name": "parTargetManagementGroupId",
"Destination": "Parameters"
},
{
"Name": "parAssignableScopeManagementGroupId",
"Destination": "Parameters"
}
],
"Value": "",
"DefaultValue": "alz",
"Valid": "^[a-zA-Z]{3,5}$"
},
"Suffix": {
"Type": "UserInput",
"Description": "The suffix that will be added to all resources created by this deployment. (e.g. 'test')",
"Targets": [
{
"Name": "parTopLevelManagementGroupSuffix",
"Destination": "Parameters"
}
],
"Value": "",
"DefaultValue": "",
"Valid": "^[a-zA-Z]{0,5}$"
},
"Location": {
"Type": "UserInput",
"Description": "Deployment location.",
"Value": "",
"Targets": [
{
"Name": "parLocation",
"Destination": "Parameters"
},
{
"Name": "parAutomationAccountLocation",
"Destination": "Parameters"
},
{
"Name": "parLogAnalyticsWorkspaceLocation",
"Destination": "Parameters"
}
],
"AllowedValues": [
"asia",
"asiapacific",
"australia",
"australiacentral",
"australiacentral2",
"australiaeast",
"australiasoutheast",
"brazil",
"brazilsouth",
"brazilsoutheast",
"canada",
"canadacentral",
"canadaeast",
"centralindia",
"centralus",
"centraluseuap",
"centralusstage",
"eastasia",
"eastasiastage",
"eastus",
"eastus2",
"eastus2euap",
"eastus2stage",
"eastusstg",
"europe",
"france",
"francecentral",
"francesouth",
"germany",
"germanynorth",
"germanywestcentral",
"global",
"india",
"japan",
"japaneast",
"japanwest",
"jioindiacentral",
"jioindiawest",
"korea",
"koreacentral",
"koreasouth",
"northcentralus",
"northcentralusstage",
"northeurope",
"norway",
"norwayeast",
"norwaywest",
"qatarcentral",
"singapore",
"southafrica",
"southafricanorth",
"southafricawest",
"southcentralus",
"southcentralusstage",
"southeastasia",
"southindia",
"swedencentral",
"switzerland",
"switzerlandnorth",
"switzerlandwest",
"uaecentral",
"uaenorth",
"uksouth",
"ukwest",
"unitedstates",
"westcentralus",
"westeurope",
"westindia",
"westus",
"westus2",
"westus2stage",
"westus3",
"westusstage"
]
},
"Environment": {
"Type": "UserInput",
"Description": "The Type of environment that will be created. (e.g. 'dev', 'test', 'qa', 'staging', 'prod')",
"Targets": [
{
"Name": "parEnvironment",
"Destination": "Parameters"
}
],
"Value": "",
"DefaultValue": "prod",
"Valid": "^[a-zA-Z0-9]{2,10}$"
},
"IdentitySubscriptionId": {
"Type": "UserInput",
"Description": "The identifier of the Identity Subscription. (e.g '00000000-0000-0000-0000-000000000000')",
"Valid": "^( {){0,1}[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(}){0,1}$",
"Targets": [
{
"Name": "IdentitySubscriptionId",
"Destination": "Environment"
}
],
"Value": ""
},
"ConnectivitySubscriptionId": {
"Type": "UserInput",
"Description": "The identifier of the Connectivity Subscription. (e.g '00000000-0000-0000-0000-000000000000')",
"Valid": "^( {){0,1}[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(}){0,1}$",
"Targets": [
{
"Name": "ConnectivitySubscriptionId",
"Destination": "Environment"
}
],
"Value": ""
},
"ManagementSubscriptionId": {
"Type": "UserInput",
"Description": "The identifier of the Management Subscription. (e.g 00000000-0000-0000-0000-000000000000)",
"Valid": "^( {){0,1}[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(}){0,1}$",
"Targets": [
{
"Name": "ManagementSubscriptionId",
"Destination": "Environment"
}
],
"Value": ""
},
"03.customRoleDefinitions": {
"source": "infra-as-code/bicep/modules/customRoleDefinitions/customRoleDefinitions.bicep"
"BillingAccountId": {
"Type": "UserInput",
"Description": "The identifier of the Billing Account. (e.g 00000000-0000-0000-0000-000000000000)",
"Valid": "^( {){0,1}[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(}){0,1}$",
"Value": ""
},
"04.logging": {
"source": "infra-as-code/bicep/module/logging/logging.bicep"
"EnrollmentAccountId": {
"Type": "UserInput",
"Description": "The identifier of the Enrollment Account. (e.g 00000000-0000-0000-0000-000000000000)",
"Valid": "^( {){0,1}[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(}){0,1}$",
"Value": ""
},
"04-1.mgdiagnostics": {
"source": "infra-as-code/bicep/orchestration/mgDiagSettingsAll/mgDiagSettingsAll.bicep"
"LogAnalyticsResourceId": {
"Type": "Computed",
"Value": "/subscriptions/{%ManagementSubscriptionId%}/resourcegroups/alz-logging/providers/microsoft.operationalinsights/workspaces/alz-log-analytics",
"Targets": [
{
"Name": "parLogAnalyticsWorkspaceResourceId",
"Destination": "Parameters"
}
]
}
},
"custom_modules" : {

}
}
Loading