Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions eng/common/testproxy/test-proxy-standalone-tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parameters:
targetVersion: ''
templateRoot: '$(Build.SourcesDirectory)'
condition: true
proxyUrl: 'http://localhost:5000'

steps:
- pwsh: |
Expand Down Expand Up @@ -56,14 +57,14 @@ steps:
- pwsh: |
$invocation = @"
Start-Process $(PROXY_EXE)
-ArgumentList `"start -u --storage-location ${{ parameters.rootFolder }}`"
-ArgumentList `"start -u --storage-location ${{ parameters.rootFolder }} -- --urls ${{ parameters.proxyUrl }}`"
-NoNewWindow -PassThru -RedirectStandardOutput ${{ parameters.rootFolder }}/test-proxy.log
-RedirectStandardError ${{ parameters.rootFolder }}/test-proxy-error.log
"@
Write-Host $invocation

$Process = Start-Process $(PROXY_EXE) `
-ArgumentList "start -u --storage-location ${{ parameters.rootFolder }}" `
-ArgumentList "start -u --storage-location ${{ parameters.rootFolder }} -- --urls ${{ parameters.proxyUrl }}" `
-NoNewWindow -PassThru -RedirectStandardOutput ${{ parameters.rootFolder }}/test-proxy.log `
-RedirectStandardError ${{ parameters.rootFolder }}/test-proxy-error.log

Expand All @@ -77,8 +78,8 @@ steps:
if [[ "$(uname)" == "Darwin" ]]; then
export DOTNET_ROOT="$HOME/.dotnet"
fi
echo "nohup $(PROXY_EXE) 1>${{ parameters.rootFolder }}/test-proxy.log 2>${{ parameters.rootFolder }}/test-proxy-error.log &"
nohup $(PROXY_EXE) 1>${{ parameters.rootFolder }}/test-proxy.log 2>${{ parameters.rootFolder }}/test-proxy-error.log &
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 &"
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 &

echo $! > $(Build.SourcesDirectory)/test-proxy.pid

Expand All @@ -93,8 +94,8 @@ steps:
- pwsh: |
for ($i = 0; $i -lt 10; $i++) {
try {
Write-Host "Invoke-WebRequest -Uri `"http://localhost:5000/Admin/IsAlive`" | Out-Null"
Invoke-WebRequest -Uri "http://localhost:5000/Admin/IsAlive" | Out-Null
Write-Host "Invoke-WebRequest -Uri `"${{ parameters.proxyUrl }}/Admin/IsAlive`" | Out-Null"
Invoke-WebRequest -Uri "${{ parameters.proxyUrl }}/Admin/IsAlive" | Out-Null
Write-Host "Successfully connected to the test proxy on port 5000."
exit 0
} catch {
Expand Down
11 changes: 6 additions & 5 deletions eng/common/testproxy/test-proxy-tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parameters:
targetVersion: ''
templateRoot: '$(Build.SourcesDirectory)'
condition: true
proxyUrl: 'http://localhost:5000'

steps:
- pwsh: |
Expand Down Expand Up @@ -67,14 +68,14 @@ steps:
- pwsh: |
$invocation = @"
Start-Process $(Build.BinariesDirectory)/test-proxy/test-proxy.exe
-ArgumentList `"start -u --storage-location ${{ parameters.rootFolder }}`"
-ArgumentList `"start -u --storage-location ${{ parameters.rootFolder }} -- --urls ${{ parameters.proxyUrl }}`"
-NoNewWindow -PassThru -RedirectStandardOutput ${{ parameters.rootFolder }}/test-proxy.log
-RedirectStandardError ${{ parameters.rootFolder }}/test-proxy-error.log
"@
Write-Host $invocation
$Process = Start-Process $(Build.BinariesDirectory)/test-proxy/test-proxy.exe `
-ArgumentList "start -u --storage-location ${{ parameters.rootFolder }}" `
-ArgumentList "start -u --storage-location ${{ parameters.rootFolder }} -- --urls ${{ parameters.proxyUrl }}" `
-NoNewWindow -PassThru -RedirectStandardOutput ${{ parameters.rootFolder }}/test-proxy.log `
-RedirectStandardError ${{ parameters.rootFolder }}/test-proxy-error.log
Expand All @@ -90,7 +91,7 @@ steps:
if [[ "$(uname)" == "Darwin" ]]; then
export DOTNET_ROOT="$HOME/.dotnet"
fi
nohup $(Build.BinariesDirectory)/test-proxy/test-proxy 1>${{ parameters.rootFolder }}/test-proxy.log 2>${{ parameters.rootFolder }}/test-proxy-error.log &
nohup $(Build.BinariesDirectory)/test-proxy/test-proxy start -u --storage-location ${{ parameters.rootFolder }} -- --urls "${{ parameters.proxyUrl }}" 1>${{ parameters.rootFolder }}/test-proxy.log 2>${{ parameters.rootFolder }}/test-proxy-error.log &
echo $! > $(Build.SourcesDirectory)/test-proxy.pid
Expand All @@ -105,8 +106,8 @@ steps:
- pwsh: |
for ($i = 0; $i -lt 10; $i++) {
try {
Write-Host "Invoke-WebRequest -Uri `"http://localhost:5000/Admin/IsAlive`" | Out-Null"
Invoke-WebRequest -Uri "http://localhost:5000/Admin/IsAlive" | Out-Null
Write-Host "Invoke-WebRequest -Uri `"${{ parameters.proxyUrl }}/Admin/IsAlive`" | Out-Null"
Invoke-WebRequest -Uri "${{ parameters.proxyUrl }}/Admin/IsAlive" | Out-Null
Write-Host "Successfully connected to the test proxy on port 5000."
exit 0
} catch {
Expand Down
Loading