@@ -5,6 +5,7 @@ parameters:
55 targetVersion : ' '
66 templateRoot : ' $(Build.SourcesDirectory)'
77 condition : true
8+ proxyUrl : ' http://localhost:5000'
89
910steps :
1011 - pwsh : |
@@ -56,14 +57,14 @@ steps:
5657 - pwsh : |
5758 $invocation = @"
5859 Start-Process $(PROXY_EXE)
59- -ArgumentList `"start -u --storage-location ${{ parameters.rootFolder }}`"
60+ -ArgumentList `"start -u --storage-location ${{ parameters.rootFolder }} -- --urls ${{ parameters.proxyUrl }} `"
6061 -NoNewWindow -PassThru -RedirectStandardOutput ${{ parameters.rootFolder }}/test-proxy.log
6162 -RedirectStandardError ${{ parameters.rootFolder }}/test-proxy-error.log
6263 "@
6364 Write-Host $invocation
6465
6566 $Process = Start-Process $(PROXY_EXE) `
66- -ArgumentList "start -u --storage-location ${{ parameters.rootFolder }}" `
67+ -ArgumentList "start -u --storage-location ${{ parameters.rootFolder }} -- --urls ${{ parameters.proxyUrl }} " `
6768 -NoNewWindow -PassThru -RedirectStandardOutput ${{ parameters.rootFolder }}/test-proxy.log `
6869 -RedirectStandardError ${{ parameters.rootFolder }}/test-proxy-error.log
6970
7778 if [[ "$(uname)" == "Darwin" ]]; then
7879 export DOTNET_ROOT="$HOME/.dotnet"
7980 fi
80- echo "nohup $(PROXY_EXE) 1>${{ parameters.rootFolder }}/test-proxy.log 2>${{ parameters.rootFolder }}/test-proxy-error.log &"
81- nohup $(PROXY_EXE) 1>${{ parameters.rootFolder }}/test-proxy.log 2>${{ parameters.rootFolder }}/test-proxy-error.log &
81+ echo "nohup $(PROXY_EXE) start -u --storage-location ${{ parameters.rootFolder }} -- --urls \"${{ parameters.proxyUrl }}\" 1>${{ parameters.rootFolder }}/test-proxy.log 2>${{ parameters.rootFolder }}/test-proxy-error.log &"
82+ nohup $(PROXY_EXE) start -u --storage-location ${{ parameters.rootFolder }} -- --urls "${{ parameters.proxyUrl }}" 1>${{ parameters.rootFolder }}/test-proxy.log 2>${{ parameters.rootFolder }}/test-proxy-error.log &
8283
8384 echo $! > $(Build.SourcesDirectory)/test-proxy.pid
8485
9394 - pwsh : |
9495 for ($i = 0; $i -lt 10; $i++) {
9596 try {
96- Write-Host "Invoke-WebRequest -Uri `"http://localhost:5000 /Admin/IsAlive`" | Out-Null"
97- Invoke-WebRequest -Uri "http://localhost:5000 /Admin/IsAlive" | Out-Null
97+ Write-Host "Invoke-WebRequest -Uri `"${{ parameters.proxyUrl }} /Admin/IsAlive`" | Out-Null"
98+ Invoke-WebRequest -Uri "${{ parameters.proxyUrl }} /Admin/IsAlive" | Out-Null
9899 Write-Host "Successfully connected to the test proxy on port 5000."
99100 exit 0
100101 } catch {
0 commit comments