Skip to content

Commit ca0302b

Browse files
azure-sdkscbedd
andauthored
Sync eng/common directory with azure-sdk-tools for PR 2290 (Azure#21791)
* update docker-start-proxy to have a slightly different default parameter * we were surrounding the value in single quotes, breaking recording load Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>
1 parent 7fa9f0a commit ca0302b

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

eng/common/testproxy/docker-start-proxy.ps1

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
#!/usr/bin/env pwsh -c
22

33
<#
4+
.SYNOPSIS
5+
Easy start/stop of docker proxy.
6+
47
.DESCRIPTION
58
Start the docker proxy container. If it is already running, quietly exit. Any other error should fail.
9+
610
.PARAMETER Mode
7-
"start" or "stop" to start up or stop the test-proxy instance.
11+
Pass value "start" or "stop" to start up or stop the test-proxy instance.
12+
813
.PARAMETER TargetFolder
914
The folder in which context the test proxy will be started. Defaults to current working directory.
15+
1016
#>
1117
[CmdletBinding(SupportsShouldProcess = $true)]
1218
param(
1319
[ValidateSet("start", "stop")]
1420
[String]
1521
$Mode,
1622
[String]
17-
$TargetFolder = "."
23+
$TargetFolder = ""
1824
)
1925

2026
try {
@@ -29,6 +35,11 @@ $SELECTED_IMAGE_TAG = "1147815"
2935
$CONTAINER_NAME = "ambitious_azsdk_test_proxy"
3036
$LINUX_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-lin:${SELECTED_IMAGE_TAG}"
3137
$WINDOWS_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-win:${SELECTED_IMAGE_TAG}"
38+
39+
if (-not $TargetFolder){
40+
$TargetFolder = Join-Path -Path $PSScriptRoot -ChildPath "../../../"
41+
}
42+
3243
$root = (Resolve-Path $TargetFolder).Path.Replace("`\", "/")
3344

3445
function Get-Proxy-Container(){

eng/common/testproxy/test-proxy-tool.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ steps:
2121
2222
- pwsh: |
2323
Start-Process $(Build.BinariesDirectory)/test-proxy/test-proxy.exe `
24-
-ArgumentList "--storage-location '${{ parameters.rootFolder }}'" `
24+
-ArgumentList "--storage-location ${{ parameters.rootFolder }}" `
2525
-NoNewWindow -PassThru -RedirectStandardOutput $(Build.SourcesDirectory)/test-proxy.log
2626
displayName: 'Run the testproxy - windows'
2727
condition: and(succeeded(), eq(variables['Agent.OS'],'Windows_NT'))

0 commit comments

Comments
 (0)