Skip to content

Commit 8022032

Browse files
committed
simplified condition broken VMs will now not get cleaned up
1 parent 7d72f98 commit 8022032

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

CI/Azure-DevOps/AZ_MainPipeline.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -846,34 +846,19 @@ stages:
846846
- Create_Environments
847847
- Validate
848848

849+
condition: not(eq(${{ parameters.CreateEnvOnly }}, true))
850+
849851
pool:
850852
vmImage: 'windows-latest'
851853

852854
jobs:
853-
- job: DebugInfo
854-
steps:
855-
- pwsh: |
856-
# Access the parameter directly
857-
Write-Host "CreateEnvOnly: ${{ parameters.CreateEnvOnly }}"
858-
859-
# Access the outcome of a job from another stage, assuming `Create_Environments` is a stage and `PrintSQLInfo` is a job within that stage.
860-
$printSQLInfoStatus = '$(stageDependencies.Create_Environments.PrintSQLInfo.result)'
861-
Write-Host "PrintSQLInfo Status: $printSQLInfoStatus"
862-
863-
# Determine if the specific job succeeded
864-
$printSQLInfoSucceeded = '$[eq(variables[''stageDependencies.Create_Environments.PrintSQLInfo.result''], ''Succeeded'')]'
865-
Write-Host "PrintSQLInfo Succeeded: $printSQLInfoSucceeded"
866-
867-
868855
- job: Delete_VM
869856

870857
strategy:
871858
matrix:
872859
${{ each version in parameters.VMMatrix }}:
873860
${{ format('{0}', version.name) }}:
874861
SQLVersionEdition: ${{ version.SQLVersionEdition }}
875-
876-
condition: not(and(eq(${{ parameters.CreateEnvOnly }}, true), succeeded(format('Create_Environments.PrintSQLInfo_{0}', version.name))))
877862

878863
variables:
879864
databaseAccessDetails: $[convertToJson(stageDependencies.Create_Environments.Create.outputs)]

0 commit comments

Comments
 (0)