Skip to content

Commit 3bd0bc3

Browse files
azure-sdkscbedd
andauthored
Sync eng/common directory with azure-sdk-tools for PR 3212 (Azure#24176)
* bump consumed version of test proxy. update scripting to target the fully cross-platform image tag name. * update target version of the test-proxy to one that enforces http/1.1 Co-authored-by: scbedd <[email protected]>
1 parent 39532dd commit 3bd0bc3

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ catch {
3838

3939
$SELECTED_IMAGE_TAG = $(Get-Content "$PSScriptRoot/target_version.txt" -Raw).Trim()
4040
$CONTAINER_NAME = "ambitious_azsdk_test_proxy"
41-
$LINUX_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-lin:${SELECTED_IMAGE_TAG}"
42-
$WINDOWS_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-win:${SELECTED_IMAGE_TAG}"
41+
$IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy:${SELECTED_IMAGE_TAG}"
4342

4443
if($VersionOverride) {
4544
Write-Host "Overriding default target proxy version of '$SELECTED_IMAGE_TAG' with override $VersionOverride."
@@ -58,16 +57,13 @@ function Get-Proxy-Container(){
5857
| Select-Object -First 1)
5958
}
6059

61-
62-
$SelectedImage = $LINUX_IMAGE_SOURCE
6360
$Initial = ""
6461
$AdditionalContainerArgs = "--add-host=host.docker.internal:host-gateway"
6562

6663
# most of the time, running this script on a windows machine will work just fine, as docker defaults to linux containers
6764
# however, in CI, windows images default to _windows_ containers. We cannot swap them. We can tell if we're in a CI build by
6865
# checking for the environment variable TF_BUILD.
6966
if ($IsWindows -and $env:TF_BUILD){
70-
$SelectedImage = $WINDOWS_IMAGE_SOURCE
7167
$Initial = "C:"
7268
$AdditionalContainerArgs = ""
7369
}
@@ -93,9 +89,9 @@ if ($Mode -eq "start"){
9389
else {
9490
$attempts = 0
9591
Write-Host "Attempting creation of Docker host $CONTAINER_NAME"
96-
Write-Host "docker container create -v `"${root}:${Initial}/srv/testproxy`" $AdditionalContainerArgs -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $SelectedImage"
92+
Write-Host "docker container create -v `"${root}:${Initial}/srv/testproxy`" $AdditionalContainerArgs -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $IMAGE_SOURCE"
9793
while($attempts -lt 3){
98-
docker container create -v "${root}:${Initial}/srv/testproxy" $AdditionalContainerArgs -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $SelectedImage
94+
docker container create -v "${root}:${Initial}/srv/testproxy" $AdditionalContainerArgs -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $IMAGE_SOURCE
9995

10096
if($LASTEXITCODE -ne 0){
10197
$attempts += 1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.0-dev.20220224.2
1+
1.0.0-dev.20220426.1

0 commit comments

Comments
 (0)