[Test-Proxy] Consume Newest Version of the Test-Proxy in eng/common (#3212)
* update target version of the test-proxy to one that enforces http/1.1
This commit is contained in:
Родитель
f824755171
Коммит
1d0d743593
|
@ -38,8 +38,7 @@ catch {
|
||||||
|
|
||||||
$SELECTED_IMAGE_TAG = $(Get-Content "$PSScriptRoot/target_version.txt" -Raw).Trim()
|
$SELECTED_IMAGE_TAG = $(Get-Content "$PSScriptRoot/target_version.txt" -Raw).Trim()
|
||||||
$CONTAINER_NAME = "ambitious_azsdk_test_proxy"
|
$CONTAINER_NAME = "ambitious_azsdk_test_proxy"
|
||||||
$LINUX_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-lin:${SELECTED_IMAGE_TAG}"
|
$IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy:${SELECTED_IMAGE_TAG}"
|
||||||
$WINDOWS_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-win:${SELECTED_IMAGE_TAG}"
|
|
||||||
|
|
||||||
if($VersionOverride) {
|
if($VersionOverride) {
|
||||||
Write-Host "Overriding default target proxy version of '$SELECTED_IMAGE_TAG' with override $VersionOverride."
|
Write-Host "Overriding default target proxy version of '$SELECTED_IMAGE_TAG' with override $VersionOverride."
|
||||||
|
@ -58,8 +57,6 @@ function Get-Proxy-Container(){
|
||||||
| Select-Object -First 1)
|
| Select-Object -First 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$SelectedImage = $LINUX_IMAGE_SOURCE
|
|
||||||
$Initial = ""
|
$Initial = ""
|
||||||
$AdditionalContainerArgs = "--add-host=host.docker.internal:host-gateway"
|
$AdditionalContainerArgs = "--add-host=host.docker.internal:host-gateway"
|
||||||
|
|
||||||
|
@ -67,7 +64,6 @@ $AdditionalContainerArgs = "--add-host=host.docker.internal:host-gateway"
|
||||||
# however, in CI, windows images default to _windows_ containers. We cannot swap them. We can tell if we're in a CI build by
|
# however, in CI, windows images default to _windows_ containers. We cannot swap them. We can tell if we're in a CI build by
|
||||||
# checking for the environment variable TF_BUILD.
|
# checking for the environment variable TF_BUILD.
|
||||||
if ($IsWindows -and $env:TF_BUILD){
|
if ($IsWindows -and $env:TF_BUILD){
|
||||||
$SelectedImage = $WINDOWS_IMAGE_SOURCE
|
|
||||||
$Initial = "C:"
|
$Initial = "C:"
|
||||||
$AdditionalContainerArgs = ""
|
$AdditionalContainerArgs = ""
|
||||||
}
|
}
|
||||||
|
@ -93,9 +89,9 @@ if ($Mode -eq "start"){
|
||||||
else {
|
else {
|
||||||
$attempts = 0
|
$attempts = 0
|
||||||
Write-Host "Attempting creation of Docker host $CONTAINER_NAME"
|
Write-Host "Attempting creation of Docker host $CONTAINER_NAME"
|
||||||
Write-Host "docker container create -v `"${root}:${Initial}/srv/testproxy`" $AdditionalContainerArgs -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $SelectedImage"
|
Write-Host "docker container create -v `"${root}:${Initial}/srv/testproxy`" $AdditionalContainerArgs -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $IMAGE_SOURCE"
|
||||||
while($attempts -lt 3){
|
while($attempts -lt 3){
|
||||||
docker container create -v "${root}:${Initial}/srv/testproxy" $AdditionalContainerArgs -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $SelectedImage
|
docker container create -v "${root}:${Initial}/srv/testproxy" $AdditionalContainerArgs -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $IMAGE_SOURCE
|
||||||
|
|
||||||
if($LASTEXITCODE -ne 0){
|
if($LASTEXITCODE -ne 0){
|
||||||
$attempts += 1
|
$attempts += 1
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1.0.0-dev.20220224.2
|
1.0.0-dev.20220426.1
|
||||||
|
|
|
@ -67,7 +67,7 @@ Most issues we've seen are related to having a prior `az acr login` or the like.
|
||||||
|
|
||||||
If your error looks something like this:
|
If your error looks something like this:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
> docker pull azsdkengsys.azurecr.io/engsys/testproxy-lin:latest
|
> docker pull azsdkengsys.azurecr.io/engsys/testproxy-lin:latest
|
||||||
Error response from daemon: Head https://azsdkengsys.azurecr.io/v2/engsys/testproxy-lin/manifests/latest: unauthorized: authentication required
|
Error response from daemon: Head https://azsdkengsys.azurecr.io/v2/engsys/testproxy-lin/manifests/latest: unauthorized: authentication required
|
||||||
```
|
```
|
||||||
|
@ -82,7 +82,7 @@ This occurs when a user has a **prior login** to `azsdkengsys.azurecr.io`. `az a
|
||||||
|
|
||||||
For errors that look like:
|
For errors that look like:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
> docker pull azsdkengsys.azurecr.io/engsys/testproxy-lin:latest
|
> docker pull azsdkengsys.azurecr.io/engsys/testproxy-lin:latest
|
||||||
Error response from daemon: Get https://azsdkengsys.azurecr.io/v2/: x509: certificate has expired or is not yet valid
|
Error response from daemon: Get https://azsdkengsys.azurecr.io/v2/: x509: certificate has expired or is not yet valid
|
||||||
```
|
```
|
||||||
|
@ -99,7 +99,7 @@ To build the `arm64` version of the linux image, simply provide a build time arg
|
||||||
|
|
||||||
```pwsh
|
```pwsh
|
||||||
./prepare.ps1
|
./prepare.ps1
|
||||||
docker build -t testproxy --build-arg ARCH=-arm64v8 .
|
docker build -t testproxy --build-arg ARCH=-arm64v8 . --platform linux/arm64
|
||||||
```
|
```
|
||||||
|
|
||||||
## Publishing a multiplatform image
|
## Publishing a multiplatform image
|
||||||
|
|
Загрузка…
Ссылка в новой задаче