Skip to content

Prep for alz bicep v0.14.0 release #50

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 1 commit into from
Apr 23, 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
8 changes: 6 additions & 2 deletions src/ALZ/Assets/alz-bicep-config/v0.14.1-pre.config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "v0.14.1-pre",
"version": "v0.14.0",
"module_url": "https://github.com/Azure/ALZ-Bicep",
"config_files": [
{
Expand Down Expand Up @@ -125,6 +125,10 @@
{
"source": "accelerator/pipeline-scripts/Deploy-ALZSubscriptionPlacement.ps1",
"destination": "pipeline-scripts/Deploy-ALZSubscriptionPlacement.ps1"
},
{
"source": "accelerator/README.md",
"destination": "README.md"
}
],
"parameters": {
Expand Down Expand Up @@ -469,7 +473,7 @@
},
"UpstreamReleaseVersion": {
"Type": "Computed",
"Value": "v0.14.1-pre",
"Value": "v0.14.0",
"Targets": [
{
"Name": "UPSTREAM_RELEASE_VERSION",
Expand Down
2 changes: 1 addition & 1 deletion src/ALZ/Private/Get-ALZBicepConfig.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function Get-ALZBicepConfig {
#>
param(
[Parameter(Mandatory = $false)]
[string] $alzBicepVersion = "v0.14.1-pre"
[string] $alzBicepVersion = "v0.14.0"
)
# import the config from the json file inside assets and tranform it to a powershell object
$bicepConfig = Get-Content -Path (Join-Path $(Get-ScriptRoot) "../Assets/alz-bicep-config" "$alzBicepVersion.config.json" ) | ConvertFrom-Json
Expand Down
16 changes: 8 additions & 8 deletions src/ALZ/Public/New-ALZEnvironment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function New-ALZEnvironment {
.EXAMPLE
New-ALZEnvironment -alzEnvironmentDestination "."
.EXAMPLE
New-ALZEnvironment -alzEnvironmentDestination "." -alzBicepVersion "v0.14.1-pre"
New-ALZEnvironment -alzEnvironmentDestination "." -alzBicepVersion "v0.14.0"
#>
[CmdletBinding(SupportsShouldProcess = $true)]
param (
Expand All @@ -30,18 +30,18 @@ function New-ALZEnvironment {
[string] $alzEnvironmentDestination = ".",

[Parameter(Mandatory = $false)]
[string] $alzBicepVersion = "v0.14.1-pre",
[string] $alzBicepVersion = "v0.14.0",

[Parameter(Mandatory = $false)]
[ValidateSet("bicep", "terraform")]
[Alias("Iac")]
[string] $alzIacProvider = "bicep"
)

Write-InformationColored "Getting ready to create a new ALZ environment with you..." -ForegroundColor Green -InformationAction Continue
Write-InformationColored "Getting ready to create a new ALZ environment with you..." -ForegroundColor Green -InformationAction Continue

if ($alzIacProvider -eq "terraform") {
Write-InformationColored "Terraform is not yet supported." -ForegroundColor Red -InformationAction Continue
Write-InformationColored "Terraform is not yet supported." -ForegroundColor Red -InformationAction Continue
return
}

Expand All @@ -53,9 +53,9 @@ function New-ALZEnvironment {

$alzEnvironmentDestinationInternalCode = Join-Path $alzEnvironmentDestination "upstream-releases"
Get-GithubRelease -directoryForReleases $alzEnvironmentDestinationInternalCode -githubRepoUrl $bicepConfig.module_url -releases @($bicepConfig.version) | Out-String | Write-Verbose
Write-InformationColored "Copying ALZ-Bicep module to $alzEnvironmentDestinationInternalCode" -ForegroundColor Green -InformationAction Continue
Copy-ALZParametersFile -alzEnvironmentDestination $alzEnvironmentDestination -upstreamReleaseDirectory $(Join-Path $alzEnvironmentDestinationInternalCode $bicepConfig.version) -configFiles $bicepConfig.config_files | Out-String | Write-Verbose
Write-InformationColored "ALZ-Bicep source directory: $alzBicepSourceDirectory" -ForegroundColor Green -InformationAction Continue
Write-InformationColored "Copying ALZ-Bicep module to $alzEnvironmentDestinationInternalCode" -ForegroundColor Green -InformationAction Continue
Copy-ALZParametersFile -alzEnvironmentDestination $alzEnvironmentDestination -upstreamReleaseDirectory $(Join-Path $alzEnvironmentDestinationInternalCode $bicepConfig.version) -configFiles $bicepConfig.config_files | Out-String | Write-Verbose
Write-InformationColored "ALZ-Bicep source directory: $alzBicepSourceDirectory" -ForegroundColor Green -InformationAction Continue

$configuration = Request-ALZEnvironmentConfig -configurationParameters $bicepConfig.parameters

Expand All @@ -64,7 +64,7 @@ function New-ALZEnvironment {

$isGitRepo = Test-ALZGitRepository -alzEnvironmentDestination $alzEnvironmentDestination
if (-not $isGitRepo) {
Write-InformationColored "The directory $alzEnvironmentDestination is not a git repository. Please make it is a git repo after initialization." -ForegroundColor Red -InformationAction Continue
Write-InformationColored "The directory $alzEnvironmentDestination is not a git repository. Please make it is a git repo after initialization." -ForegroundColor Red -InformationAction Continue
}
}

Expand Down