|
1 | 1 | parameters: |
2 | 2 | rootFolder: '$(Build.SourcesDirectory)' |
| 3 | + runProxy: true |
3 | 4 |
|
4 | 5 | steps: |
5 | 6 | - pwsh: | |
6 | 7 | $(Build.SourcesDirectory)/eng/common/scripts/trust-proxy-certificate.ps1 |
7 | 8 | displayName: 'Language Specific Certificate Trust' |
8 | 9 |
|
9 | | - - pwsh: | |
10 | | - Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Path]$(Build.SourcesDirectory)/eng/common/testproxy/dotnet-devcert.pfx" |
11 | | - Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Password]password" |
12 | | - Write-Host "##vso[task.setvariable variable=PROXY_MANUAL_START]true" |
13 | | - displayName: 'Configure Kestrel and PROXY_MANUAL_START Variables' |
14 | | -
|
15 | 10 | - pwsh: | |
16 | 11 | dotnet tool install azure.sdk.tools.testproxy ` |
17 | 12 | --tool-path $(Build.BinariesDirectory)/test-proxy ` |
18 | 13 | --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json ` |
19 | | - --version 1.0.0-dev.20220119.2 |
| 14 | + --version 1.0.0-dev.20220210.1 |
20 | 15 | displayName: "Install test-proxy" |
21 | 16 |
|
22 | 17 | - pwsh: | |
23 | | - Start-Process $(Build.BinariesDirectory)/test-proxy/test-proxy.exe ` |
24 | | - -ArgumentList "--storage-location ${{ parameters.rootFolder }}" ` |
25 | | - -NoNewWindow -PassThru -RedirectStandardOutput $(Build.SourcesDirectory)/test-proxy.log |
26 | | - displayName: 'Run the testproxy - windows' |
27 | | - condition: and(succeeded(), eq(variables['Agent.OS'],'Windows_NT')) |
| 18 | + Write-Host "##vso[task.prependpath]$(Build.BinariesDirectory)/test-proxy" |
| 19 | + displayName: "Prepend path with test-proxy tool install location" |
| 20 | +
|
| 21 | + - ${{ if eq(parameters.runProxy, 'true') }}: |
| 22 | + - pwsh: | |
| 23 | + Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Path]$(Build.SourcesDirectory)/eng/common/testproxy/dotnet-devcert.pfx" |
| 24 | + Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Password]password" |
| 25 | + Write-Host "##vso[task.setvariable variable=PROXY_MANUAL_START]true" |
| 26 | + displayName: 'Configure Kestrel and PROXY_MANUAL_START Variables' |
| 27 | +
|
| 28 | + - pwsh: | |
| 29 | + Start-Process $(Build.BinariesDirectory)/test-proxy/test-proxy.exe ` |
| 30 | + -ArgumentList "--storage-location ${{ parameters.rootFolder }}" ` |
| 31 | + -NoNewWindow -PassThru -RedirectStandardOutput $(Build.SourcesDirectory)/test-proxy.log |
| 32 | + displayName: 'Run the testproxy - windows' |
| 33 | + condition: and(succeeded(), eq(variables['Agent.OS'],'Windows_NT')) |
28 | 34 |
|
29 | | - # nohup does NOT continue beyond the current session if you use it within powershell |
30 | | - - bash: | |
31 | | - nohup $(Build.BinariesDirectory)/test-proxy/test-proxy > $(Build.SourcesDirectory)/test-proxy.log & |
32 | | - displayName: "Run the testproxy - linux/mac" |
33 | | - condition: and(succeeded(), ne(variables['Agent.OS'],'Windows_NT')) |
34 | | - workingDirectory: "${{ parameters.rootFolder }}" |
| 35 | + # nohup does NOT continue beyond the current session if you use it within powershell |
| 36 | + - bash: | |
| 37 | + nohup $(Build.BinariesDirectory)/test-proxy/test-proxy > $(Build.SourcesDirectory)/test-proxy.log & |
| 38 | + displayName: "Run the testproxy - linux/mac" |
| 39 | + condition: and(succeeded(), ne(variables['Agent.OS'],'Windows_NT')) |
| 40 | + workingDirectory: "${{ parameters.rootFolder }}" |
0 commit comments