@@ -3,11 +3,13 @@ parameters:
33 runProxy : true
44 targetVersion : ' '
55 templateRoot : ' $(Build.SourcesDirectory)'
6+ condition : true
67
78steps :
89 - pwsh : |
910 ${{ parameters.templateRoot }}/eng/common/scripts/trust-proxy-certificate.ps1
1011 displayName: 'Language Specific Certificate Trust'
12+ condition: and(succeeded(), ${{ parameters.condition }})
1113
1214 - pwsh : |
1315 $version = $(Get-Content "${{ parameters.templateRoot }}/eng/common/testproxy/target_version.txt" -Raw).Trim()
2325 --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json `
2426 --version $version
2527 displayName: "Install test-proxy"
28+ condition: and(succeeded(), ${{ parameters.condition }})
2629
2730 - pwsh : |
2831 Write-Host "##vso[task.prependpath]$(Build.BinariesDirectory)/test-proxy"
@@ -34,19 +37,20 @@ steps:
3437 Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Password]password"
3538 Write-Host "##vso[task.setvariable variable=PROXY_MANUAL_START]true"
3639 displayName: 'Configure Kestrel and PROXY_MANUAL_START Variables'
40+ condition: and(succeeded(), ${{ parameters.condition }})
3741
3842 - pwsh : |
3943 Start-Process $(Build.BinariesDirectory)/test-proxy/test-proxy.exe `
4044 -ArgumentList "--storage-location ${{ parameters.rootFolder }}" `
4145 -NoNewWindow -PassThru -RedirectStandardOutput ${{ parameters.templateRoot }}/test-proxy.log
4246 displayName: 'Run the testproxy - windows'
43- condition: and(succeeded(), eq(variables['Agent.OS'],'Windows_NT'))
47+ condition: and(succeeded(), eq(variables['Agent.OS'],'Windows_NT'), ${{ parameters.condition }} )
4448
4549 # nohup does NOT continue beyond the current session if you use it within powershell
4650 - bash : |
4751 nohup $(Build.BinariesDirectory)/test-proxy/test-proxy > ${{ parameters.templateRoot }}/test-proxy.log &
4852 displayName: "Run the testproxy - linux/mac"
49- condition: and(succeeded(), ne(variables['Agent.OS'],'Windows_NT'))
53+ condition: and(succeeded(), ne(variables['Agent.OS'],'Windows_NT'), ${{ parameters.condition }} )
5054 workingDirectory: "${{ parameters.rootFolder }}"
5155
5256 - pwsh : |
6266 Write-Error "Could not connect to test proxy."
6367 exit 1
6468 displayName: Test Proxy IsAlive
65-
69+ condition: and(succeeded(), ${{ parameters.condition }})
0 commit comments