File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ function New-ALZDirectoryEnvironment {
55 [Alias (" Output" )]
66 [Alias (" OutputDirectory" )]
77 [Alias (" O" )]
8- [string ] $alzEnvironmentDestination
8+ [string ] $alzEnvironmentDestination ,
9+ [string ] $alzCicdDestination
910 )
1011 # Create destination file structure
1112 $gitHubPipeline = Join-Path $alzEnvironmentDestination " .github" " workflows"
@@ -15,8 +16,8 @@ function New-ALZDirectoryEnvironment {
1516 $upstream = Join-Path $alzEnvironmentDestination " upstream-releases"
1617
1718 New-Item - ItemType Directory - Path $alzEnvironmentDestination - Force | Out-String | Write-Verbose
18- New-Item - ItemType Directory - Path $gitHubPipeline - Force | Out-String | Write-Verbose
19- New-Item - ItemType Directory - Path $azureDevOpsPipeline - Force | Out-String | Write-Verbose
19+ $cicd = if ( $alzCicdDestination -eq " github " ) { $gitHubPipeline } else { $azureDevOpsPipeline }
20+ New-Item - ItemType Directory - Path $cicd - Force | Out-String | Write-Verbose
2021 New-Item - ItemType Directory - Path $config - Force | Out-String | Write-Verbose
2122 New-Item - ItemType Directory - Path $upstream - Force | Out-String | Write-Verbose
2223 New-Item - ItemType Directory - Path $configModules - Force | Out-String | Write-Verbose
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ function New-ALZEnvironment {
5454
5555 $bicepConfig = Get-ALZBicepConfig - alzBicepVersion $alzBicepVersion
5656
57- New-ALZDirectoryEnvironment - alzEnvironmentDestination $alzEnvironmentDestination | Out-String | Write-Verbose
57+ New-ALZDirectoryEnvironment - alzEnvironmentDestination $alzEnvironmentDestination - alzCicdDestination $alzCicdPlatform | Out-String | Write-Verbose
5858
5959 $alzEnvironmentDestinationInternalCode = Join-Path $alzEnvironmentDestination " upstream-releases"
6060
Original file line number Diff line number Diff line change @@ -27,8 +27,7 @@ InModuleScope 'ALZ' {
2727 New-ALZDirectoryEnvironment - OutputDirectory $basePath
2828 Should - Invoke - CommandName New-Item - ParameterFilter { $Path -eq ' ./config' }
2929 Should - Invoke - CommandName New-Item - ParameterFilter { $Path -eq $ (Join-Path $basePath ' upstream-releases' ) } - Exactly 1
30- Should - Invoke - CommandName New-Item - ParameterFilter { $Path -eq $ (Join-Path $basePath ' .github' ' workflows' ) } - Exactly 1
31- Should - Invoke - CommandName New-Item - ParameterFilter { $Path -eq $ (Join-Path $basePath ' .azuredevops' ' pipelines' ) } - Exactly 1
30+ Should - Invoke - CommandName New-Item - ParameterFilter { $Path -eq $ (Join-Path $basePath ' .github' ' workflows' ) -or $Path -eq $ (Join-Path $basePath ' .azuredevops' ' pipelines' ) } - Exactly 1
3231 Should - Invoke - CommandName New-Item - ParameterFilter { $Path -eq $ (Join-Path $basePath ' config' ) } - Exactly 1
3332 }
3433 }
You can’t perform that action at this time.
0 commit comments