Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync eng/common directory with azure-sdk-tools for PR 2290 #25372

Merged
merged 2 commits into from
Nov 17, 2021
Merged
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
15 changes: 13 additions & 2 deletions eng/common/testproxy/docker-start-proxy.ps1
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
#!/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(
[ValidateSet("start", "stop")]
[String]
$Mode,
[String]
$TargetFolder = "."
$TargetFolder = ""
)

try {
Expand All @@ -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(){
Expand Down
2 changes: 1 addition & 1 deletion eng/common/testproxy/test-proxy-tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down