Skip to content

Commit 00fc4e3

Browse files
committed
.....
1 parent c571a5b commit 00fc4e3

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

CI/Azure-DevOps/AZ_MainPipeline.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -853,18 +853,21 @@ stages:
853853

854854
jobs:
855855
- job: DebugInfo
856-
variables:
857-
- name: CreateEnvOnly
858-
value: ${{ parameters.CreateEnvOnly }}
859-
- name: PrintSQLInfoStat
860-
value: "${{ dependencies.Create_Environments.PrintSQLInfo.result }}"
861-
- name: PrintSQLInfoSuc
862-
value: succeeded('Create_Environments.PrintSQLInfo')
856+
dependsOn:
857+
- Create_Environments
863858
steps:
864-
- script: |
865-
echo "CreateEnvOnly: $(CreateEnvOnly)"
866-
echo "PrintSQLInfoSuc: $(PrintSQLInfoSuc)"
867-
echo "PrintSQLInfoStat: $(PrintSQLInfoStat)"
859+
- pwsh: |
860+
# Access the parameter directly
861+
Write-Host "CreateEnvOnly: ${{ parameters.CreateEnvOnly }}"
862+
863+
# Access the outcome of a job from another stage, assuming `Create_Environments` is a stage and `PrintSQLInfo` is a job within that stage.
864+
$printSQLInfoStatus = '$(stageDependencies.Create_Environments.PrintSQLInfo.result)'
865+
Write-Host "PrintSQLInfo Status: $printSQLInfoStatus"
866+
867+
# Determine if the specific job succeeded
868+
$printSQLInfoSucceeded = '$[eq(variables[''stageDependencies.Create_Environments.PrintSQLInfo.result''], ''Succeeded'')]'
869+
Write-Host "PrintSQLInfo Succeeded: $printSQLInfoSucceeded"
870+
868871
869872
- job: Delete_VM
870873

0 commit comments

Comments
 (0)