Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jefajers authored Jan 4, 2024
1 parent cc28e0b commit 1d056a9
Show file tree
Hide file tree
Showing 26 changed files with 29 additions and 26 deletions.
2 changes: 2 additions & 0 deletions src/functions/Invoke-AzOpsPush.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,8 @@
}

if ($deploymentResult) {
# Output deploymentResult outside module
$deploymentResult
#Process deploymentResult and output result
foreach ($result in $deploymentResult) {
Set-AzOpsWhatIfOutput -FilePath $result.filePath -ParameterFilePath $result.parameterFilePath -Results $result.results
Expand Down
3 changes: 2 additions & 1 deletion src/internal/functions/New-AzOpsDeployment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
filePath = ''
parameterFilePath = ''
results = ''
deployment = ''
}
if ($TemplateParameterFilePath) {
$parameters.TemplateParameterFile = $TemplateParameterFilePath
Expand Down Expand Up @@ -224,7 +225,7 @@
$parameters.Name = $DeploymentName
if ($PSCmdlet.ShouldProcess("Start $($scopeObject.type) Deployment with $deploymentCommand?")) {
if (-not $invalidTemplate) {
& $deploymentCommand @parameters | Out-Null
$deploymentResult.deployment = & $deploymentCommand @parameters
}
}
else {
Expand Down
4 changes: 2 additions & 2 deletions src/internal/functions/Set-AzOpsWhatIfOutput.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
$tempPath = [System.IO.Path]::GetTempPath()
if ((-not (Test-Path -Path ($tempPath + 'OUTPUT.md'))) -or (-not (Test-Path -Path ($tempPath + 'OUTPUT.json')))) {
Write-PSFMessage -Level Verbose -String 'Set-AzOpsWhatIfOutput.WhatIfFile'
New-Item -Path ($tempPath + 'OUTPUT.md') -WhatIf:$false
New-Item -Path ($tempPath + 'OUTPUT.json') -WhatIf:$false
New-Item -Path ($tempPath + 'OUTPUT.md') -WhatIf:$false | Out-Null
New-Item -Path ($tempPath + 'OUTPUT.json') -WhatIf:$false | Out-Null
}

if ($ParameterFilePath) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Describe "Scenario - policyAssignments" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Describe "Scenario - roleAssignments" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Describe "Scenario - virtualMachines" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Describe "Scenario - activityLogAlerts" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Describe "Scenario - vaults" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Describe "Scenario - workflows" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Describe "Scenario - userAssignedIdentities" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Describe "Scenario - managementGroups" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Describe "Scenario - azureFirewalls" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Describe "Scenario - bastionHosts" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Describe "Scenario - connections" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Describe "Scenario - localNetworkGateways" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Describe "Scenario - networkInterfaces" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Describe "Scenario - networkSecurityGroups" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Describe "Scenario - privateDnsZones" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Describe "Scenario - privateEndpoints" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Describe "Scenario - publicIPAddresses" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Describe "Scenario - routeTables" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Describe "Scenario - virtualNetworks" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Describe "Scenario - resourceGroups" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Describe "Scenario - storageAccounts" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Describe "Scenario - serverfarms" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down
2 changes: 1 addition & 1 deletion src/tests/functional/Microsoft.Web/sites/scenario.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Describe "Scenario - sites" {

#region Push Test
It "Push should be successful" {
$script:push.ProvisioningState | Should -Be "Succeeded"
$script:push.deployment.ProvisioningState | Should -Be "Succeeded"
}
#endregion Push Test
}
Expand Down

0 comments on commit 1d056a9

Please sign in to comment.