File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ function New-ALZDirectoryEnvironment {
5
5
[Alias (" Output" )]
6
6
[Alias (" OutputDirectory" )]
7
7
[Alias (" O" )]
8
- [string ] $alzEnvironmentDestination
8
+ [string ] $alzEnvironmentDestination ,
9
+ [string ] $alzCicdDestination
9
10
)
10
11
# Create destination file structure
11
12
$gitHubPipeline = Join-Path $alzEnvironmentDestination " .github" " workflows"
@@ -15,8 +16,8 @@ function New-ALZDirectoryEnvironment {
15
16
$upstream = Join-Path $alzEnvironmentDestination " upstream-releases"
16
17
17
18
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
20
21
New-Item - ItemType Directory - Path $config - Force | Out-String | Write-Verbose
21
22
New-Item - ItemType Directory - Path $upstream - Force | Out-String | Write-Verbose
22
23
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 {
54
54
55
55
$bicepConfig = Get-ALZBicepConfig - alzBicepVersion $alzBicepVersion
56
56
57
- New-ALZDirectoryEnvironment - alzEnvironmentDestination $alzEnvironmentDestination | Out-String | Write-Verbose
57
+ New-ALZDirectoryEnvironment - alzEnvironmentDestination $alzEnvironmentDestination - alzCicdDestination $alzCicdPlatform | Out-String | Write-Verbose
58
58
59
59
$alzEnvironmentDestinationInternalCode = Join-Path $alzEnvironmentDestination " upstream-releases"
60
60
Original file line number Diff line number Diff line change @@ -27,8 +27,7 @@ InModuleScope 'ALZ' {
27
27
New-ALZDirectoryEnvironment - OutputDirectory $basePath
28
28
Should - Invoke - CommandName New-Item - ParameterFilter { $Path -eq ' ./config' }
29
29
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
32
31
Should - Invoke - CommandName New-Item - ParameterFilter { $Path -eq $ (Join-Path $basePath ' config' ) } - Exactly 1
33
32
}
34
33
}
You can’t perform that action at this time.
0 commit comments