From f5174b15919e4c141386fdce30a308f2a930f357 Mon Sep 17 00:00:00 2001 From: scbedd <45376673+scbedd@users.noreply.github.com> Date: Tue, 16 Nov 2021 11:55:14 -0800 Subject: [PATCH 1/2] update docker-start-proxy to have a slightly different default parameter --- eng/common/testproxy/docker-start-proxy.ps1 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/eng/common/testproxy/docker-start-proxy.ps1 b/eng/common/testproxy/docker-start-proxy.ps1 index 577af6d24d87..dbd087bce9eb 100644 --- a/eng/common/testproxy/docker-start-proxy.ps1 +++ b/eng/common/testproxy/docker-start-proxy.ps1 @@ -1,12 +1,18 @@ #!/usr/bin/env pwsh -c <# +.SYNOPSIS +Easy start/stop of docker proxy. + .DESCRIPTION Start the docker proxy container. If it is already running, quietly exit. Any other error should fail. + .PARAMETER Mode -"start" or "stop" to start up or stop the test-proxy instance. +Pass value "start" or "stop" to start up or stop the test-proxy instance. + .PARAMETER TargetFolder The folder in which context the test proxy will be started. Defaults to current working directory. + #> [CmdletBinding(SupportsShouldProcess = $true)] param( @@ -14,7 +20,7 @@ param( [String] $Mode, [String] - $TargetFolder = "." + $TargetFolder = "" ) try { @@ -29,6 +35,11 @@ $SELECTED_IMAGE_TAG = "1147815" $CONTAINER_NAME = "ambitious_azsdk_test_proxy" $LINUX_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-lin:${SELECTED_IMAGE_TAG}" $WINDOWS_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-win:${SELECTED_IMAGE_TAG}" + +if (-not $TargetFolder){ + $TargetFolder = Join-Path -Path $PSScriptRoot -ChildPath "../../../" +} + $root = (Resolve-Path $TargetFolder).Path.Replace("`\", "/") function Get-Proxy-Container(){ From dfd8c27a3df84a1f81f41c8afa84ca6edc8a5b94 Mon Sep 17 00:00:00 2001 From: scbedd <45376673+scbedd@users.noreply.github.com> Date: Tue, 16 Nov 2021 17:14:59 -0800 Subject: [PATCH 2/2] we were surrounding the value in single quotes, breaking recording load --- eng/common/testproxy/test-proxy-tool.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/testproxy/test-proxy-tool.yml b/eng/common/testproxy/test-proxy-tool.yml index 8401c4f5d073..6ad7eb897e4f 100644 --- a/eng/common/testproxy/test-proxy-tool.yml +++ b/eng/common/testproxy/test-proxy-tool.yml @@ -21,7 +21,7 @@ steps: - pwsh: | Start-Process $(Build.BinariesDirectory)/test-proxy/test-proxy.exe ` - -ArgumentList "--storage-location '${{ parameters.rootFolder }}'" ` + -ArgumentList "--storage-location ${{ parameters.rootFolder }}" ` -NoNewWindow -PassThru -RedirectStandardOutput $(Build.SourcesDirectory)/test-proxy.log displayName: 'Run the testproxy - windows' condition: and(succeeded(), eq(variables['Agent.OS'],'Windows_NT'))