From bb82e70011159c55695e6d59b5e4e8e5a1cd8246 Mon Sep 17 00:00:00 2001 From: "Scott Beddall (from Dev Box)" Date: Fri, 15 Mar 2024 17:45:57 -0700 Subject: [PATCH 1/2] remove docker cli integration as we will not be maintaining the docker configurations for test-proxy --- tools/test-proxy/tests.yml | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/tools/test-proxy/tests.yml b/tools/test-proxy/tests.yml index e8a0af71a46..d737ea9dce1 100644 --- a/tools/test-proxy/tests.yml +++ b/tools/test-proxy/tests.yml @@ -79,36 +79,6 @@ stages: GIT_COMMIT_OWNER: azure-sdk GIT_COMMIT_EMAIL: azuresdk@microsoft.com - - job: Docker_CLI_Integration_Test - - pool: - name: azsdk-pool-mms-ubuntu-2204-general - - variables: - CLI_TEST_DOCKER_TAG: localproxyinstance - - steps: - - template: /eng/pipelines/templates/steps/install-dotnet.yml - - - pwsh: | - ./prepare.ps1 - - docker build -t $(CLI_TEST_DOCKER_TAG) . - workingDirectory: tools/test-proxy/docker/ - displayName: "Prepare and Build local docker image" - - - template: /eng/common/pipelines/templates/steps/run-pester-tests.yml - parameters: - TargetTags: "Integration" - TargetDirectory: tools/test-proxy/scripts/test-scripts/ - EnvVars: - GIT_TOKEN: $(azuresdk-github-pat) - GIT_COMMIT_OWNER: azure-sdk - GIT_COMMIT_EMAIL: azuresdk@microsoft.com - CLI_TEST_WITH_DOCKER: true - CLI_TEST_DOCKER_TAG: $(CLI_TEST_DOCKER_TAG) - DISABLE_INTEGRATION_BRANCH_CLEANUP: true - - stage: RepoUnitTests displayName: Repo-Specific Unit Tests dependsOn: [] From e5a490be262e8e1750d8e21e17fb0ba59af53d48 Mon Sep 17 00:00:00 2001 From: "Scott Beddall (from Dev Box)" Date: Fri, 15 Mar 2024 17:53:57 -0700 Subject: [PATCH 2/2] remove all references to docker --- .../onboarding/common-asset-functions.ps1 | 35 ------ .../onboarding/generate-assets-json.ps1 | 4 +- .../Azure.Sdk.Tools.TestProxy/README.md | 75 +----------- tools/test-proxy/ci.yml | 24 ---- tools/test-proxy/docker/.dockerignore | 5 - tools/test-proxy/docker/README.md | 114 ------------------ tools/test-proxy/docker/dockerfile | 54 --------- tools/test-proxy/docker/prepare.ps1 | 36 ------ tools/test-proxy/docker/run_proxy.sh | 2 - 9 files changed, 3 insertions(+), 346 deletions(-) delete mode 100644 tools/test-proxy/docker/.dockerignore delete mode 100644 tools/test-proxy/docker/README.md delete mode 100644 tools/test-proxy/docker/dockerfile delete mode 100644 tools/test-proxy/docker/prepare.ps1 delete mode 100644 tools/test-proxy/docker/run_proxy.sh diff --git a/eng/common/testproxy/onboarding/common-asset-functions.ps1 b/eng/common/testproxy/onboarding/common-asset-functions.ps1 index 3d7bcf60558..2f7c1b37c3c 100644 --- a/eng/common/testproxy/onboarding/common-asset-functions.ps1 +++ b/eng/common/testproxy/onboarding/common-asset-functions.ps1 @@ -207,41 +207,6 @@ Function Invoke-ProxyCommand { ) $updatedDirectory = $TargetDirectory.Replace("`\", "/") - # CommandString just a string indicating the proxy arguments. In the default case of running against the proxy tool, can just be used directly. - # However, in the case of docker, we need to append a bunch more arguments to the string. - if ($TestProxyExe -eq "docker" -or $TestProxyExe -eq "podman"){ - $token = $env:GIT_TOKEN - $committer = $env:GIT_COMMIT_OWNER - $email = $env:GIT_COMMIT_EMAIL - - if (-not $committer) { - $committer = & git config --global user.name - } - - if (-not $email) { - $email = & git config --global user.email - } - - if(-not $token -or -not $committer -or -not $email){ - Write-Error ("When running this transition script in `"docker`" or `"podman`" mode, " ` - + "the environment variables GIT_TOKEN, GIT_COMMIT_OWNER, and GIT_COMMIT_EMAIL must be set to reflect the appropriate user. ") - exit 1 - } - - $targetImage = if ($env:TRANSITION_SCRIPT_DOCKER_TAG) { $env:TRANSITION_SCRIPT_DOCKER_TAG } else { "azsdkengsys.azurecr.io/engsys/test-proxy:latest" } - - $CommandString = @( - "run --rm --name transition.test.proxy", - "-v `"${updatedDirectory}:/srv/testproxy`"", - "-e `"GIT_TOKEN=${token}`"", - "-e `"GIT_COMMIT_OWNER=${committer}`"", - "-e `"GIT_COMMIT_EMAIL=${email}`"", - $targetImage, - "test-proxy", - $CommandString - ) -join " " - } - Write-Host "$TestProxyExe $CommandString" [array] $output = & "$TestProxyExe" $CommandString.Split(" ") --storage-location="$updatedDirectory" # echo the command output diff --git a/eng/common/testproxy/onboarding/generate-assets-json.ps1 b/eng/common/testproxy/onboarding/generate-assets-json.ps1 index bd825eebbe1..3576fd3c6bd 100644 --- a/eng/common/testproxy/onboarding/generate-assets-json.ps1 +++ b/eng/common/testproxy/onboarding/generate-assets-json.ps1 @@ -22,9 +22,9 @@ Generated assets.json file contents If flag InitialPush is set, recordings will be automatically pushed to the assets repo and the Tag property updated. .PARAMETER TestProxyExe -The executable used during the "InitialPush" action. Defaults to the dotnet tool test-proxy, but also supports "docker" or "podman". +The executable used during the "InitialPush" action. Defaults to the dotnet tool test-proxy, but also supports custom executables as well. -If the user provides their own value that doesn't match options "test-proxy", "docker", or "podman", the script will use this input as the test-proxy exe +If the user provides their own value that doesn't match options "test-proxy" the script will use this input as the test-proxy exe when invoking commands. EG "$TestProxyExe push -a sdk/keyvault/azure-keyvault-keys/assets.json." .PARAMETER InitialPush diff --git a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/README.md b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/README.md index 084dad43fb8..8b8e6ebc023 100644 --- a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/README.md +++ b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/README.md @@ -16,11 +16,8 @@ to documentation in your specific language repository in order to configure reco - [Azure SDK Tools Test Proxy](#azure-sdk-tools-test-proxy) - [Test documentation by language:](#test-documentation-by-language) - - [Table of contents](#table-of-contents) - [Installation](#installation) - [Via Local Compile or .NET](#via-local-compile-or-net) - - [Via Docker Image](#via-docker-image) - - [A note about docker caching](#a-note-about-docker-caching) - [Via Standalone Executable](#via-standalone-executable) - [Which should I install?](#which-should-i-install) - [Command line arguments](#command-line-arguments) @@ -62,10 +59,6 @@ to documentation in your specific language repository in order to configure reco - [Providing your own `Host` header](#providing-your-own-host-header) - [Testing](#testing) - [SSL Support](#ssl-support) - - [On Mac and Windows, .NET can be used to generate a local certificate](#on-mac-and-windows-net-can-be-used-to-generate-a-local-certificate) - - [Option 1](#option-1) - - [Option 2](#option-2) - - [Docker Image + SSL](#docker-image--ssl) - [Troubleshooting](#troubleshooting) - [Visual studio](#visual-studio) - [ASP.NET and web development](#aspnet-and-web-development) @@ -101,7 +94,7 @@ dotnet tool update azure.sdk.tools.testproxy --global --add-source https://pkgs. The test-proxy is also available from the [azure-sdk-for-net public feed](https://dev.azure.com/azure-sdk/public/_artifacts/feed/azure-sdk-for-net) -_Note: if you're not authorized to access these feeds, make sure you have [Azure Artifacts Credential Provider](https://github.com/microsoft/artifacts-credprovider) installed. You can also [download executable](#via-standalone-executable) or use a prebuilt [docker image](#via-docker-image)._ +_Note: if you're not authorized to access these feeds, make sure you have [Azure Artifacts Credential Provider](https://github.com/microsoft/artifacts-credprovider) installed. You can also [download executable](#via-standalone-executable)._ To uninstall an existing test-proxy @@ -121,40 +114,6 @@ If you've already installed the tool, you can always check the installed version test-proxy --version ``` -### Via Docker Image - -The Azure SDK Team maintains a public Azure Container Registry. - -```powershell -docker run -v :/srv/testproxy/ -p 5001:5001 -p 5000:5000 azsdkengsys.azurecr.io/engsys/test-proxy:latest -``` - -For example, to save test recordings to disk in your repo's `/sdk//tests/recordings` directory, provide the path to the root of the repo: - -```powershell -docker run -v C:\\repo\\azure-sdk-for-:/srv/testproxy/ -p 5001:5001 -p 5000:5000 azsdkengsys.azurecr.io/engsys/test-proxy:latest -``` - -Note the **port and volume mapping** as arguments! Any files that exist in this volume locally will only be appended to/updated in place. It is a non-destructive initialize. - -Within the container, recording outputs are written within the directory `/srv/testproxy/`. - -NOTE: if you are authenticated to github via SSH keys instead of a credential manager with https, you must mount your ssh credentials into docker. The following command shows an example mounting the default ssh key ~/.ssh/id_rsa on linux: - -```bash -docker run -v /home/ben/.ssh:/root/.ssh -v /home/ben/sdk/azure-sdk-for-go:/srv/testproxy --add-host=host.docker.internal:host-gateway -p 5001:5001 -p 5000:5000 testproxy bash -c 'eval `ssh-agent` && ssh-add /root/.ssh/id_rsa && test-proxy start --dump' -``` - -#### A note about docker caching - -The azure-sdk team regularly update the image associated with the `latest` tag. Combined with the fact that docker will aggressively cache if possible, it is very possible that developers' local machines may be running outdated versions of the test-proxy. - -To ensure that your local copy is up to date, run: - -```powershell -docker pull azsdkengsys.azurecr.io/engsys/test-proxy:latest -``` - ### Via Standalone Executable Standalone executable versions of the test-proxy are published to [github releases on this repository.](https://github.com/Azure/azure-sdk-tools/releases?q=Azure.Sdk.Tools.TestProxy&expanded=true) @@ -286,7 +245,6 @@ The test-proxy is integrated with the following environment variables. | `Logging__LogLevel__Default` | Defaults to `Information`. Possible valid values are

`Debug`, `Information`, `Warning`, `Error`, `Critical`.

Do not set for .NET test runs as it would cause the tests *themselves* to start emitting logs.| | `Logging__LogLevel__Azure.Sdk.Tools.TestProxy`| Set to `Debug` to see request level logs emitted by the Test Proxy.| -Both of the above variables can be set in the `docker` runtime by providing additional arguments EG: `docker run -e Logging__LogLevel__Default=Warning azsdkengsys.azurecr.io/engsys/test-proxy:latest`. For multiple environment variables, just use multiple `-e` provisions. ## How do I use the test-proxy to get a recording? @@ -312,7 +270,6 @@ A couple notes before running the test-proxy: - Reference [command line arguments](#command-line-arguments) and understand the options. - The test-proxy runs in a "context" which is just a directory on your disk. When initializing a recording, all paths should be relative to this context directory. -- If running the proxy as a docker image, ensure you **map** `etc/testproxy/` to a target context directory on your drive. In the example `docker run` invocations above, look for the `-v` argument. ### Where will my recordings end up? @@ -789,36 +746,6 @@ Within this repository there is a single certificate. - `eng/common/testproxy/dotnet-devcert.pfx`: generated on a `Ubuntu` distribution using `openssl`. -Unfortunately, the `dotnet dev-certs` generated certificates are _not_ acceptable to a standard ubuntu distro. The issue is that the `KeyUsage` field in the `.crt` [MUST contain](https://github.com/dotnet/aspnetcore/issues/7246#issuecomment-541165030) the `keyCertSign` flag. Certificates generated by `dotnet dev-certs` do NOT have this flag. This means that if you're on Windows AND running the Ubuntu docker image, you will need to trust the `dotnet-devcert.pfx` locally prior to `docker run`. - -For further details on importing and using the provided dev-certificates, please investigate the [additional docker readme.](../docker/README.md) - -### On Mac and Windows, .NET can be used to generate a local certificate - -There are two options here, generate your own SSL Cert, or import an existing one. - -#### Option 1 - -Invoke the command: - -```powershell -dotnet dev-certs https --trust -``` - -This will be automatically retrieved if you run the nuget installed version of the tool. You may optionally use `openssl` [like so](https://raw.githubusercontent.com/BorisWilhelms/create-dotnet-devcert/f3b5da6f9107834eb31ea5ba7c0583e14cda6b31/create-dotnet-devcert.sh) to generate a certificate. Note that this shell script creates a dev cert that is compatible with ubuntu. - -#### Option 2 - -Import the appropriate already existing certificate within the `eng/common/testproxy/` folder. - -### Docker Image + SSL - -To connect to the docker on SSL, both the docker image and your local machine must trust the same SSL cert. The docker image already has `dotnet-devcert.pfx` imported and trusted, so all that is necessary is to trust that same cert prior to `docker run`. - -In the future, passing in a custom cert via a bound volume that contains your certificate will be a possibility as well. - -For additional reading on this process for trusting SSL certs locally, feel free to read up [here.](https://devblogs.microsoft.com/aspnet/configuring-https-in-asp-net-core-across-different-platforms/) The afore-mentioned [docker specific readme](../docker/README.md) also has details that are relevant. - ## Troubleshooting ### Visual studio diff --git a/tools/test-proxy/ci.yml b/tools/test-proxy/ci.yml index b7ce0ec5dba..ea64e8460d5 100644 --- a/tools/test-proxy/ci.yml +++ b/tools/test-proxy/ci.yml @@ -25,30 +25,6 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml parameters: ToolDirectory: tools/test-proxy - DockerTagPrefix: '1.0.0-dev.' - DockerDeployments: - - name: test_proxy_linux - pool: azsdk-pool-mms-ubuntu-2204-general - vmImage: ubuntu-22.04 - dockerRepo: 'engsys/testproxy-lin' - prepareScript: tools/test-proxy/docker/prepare.ps1 - dockerFile: 'tools/test-proxy/docker/dockerfile' - stableTags: - - 'latest' - - name: test_proxy_linux_arm64 - pool: azsdk-pool-mms-ubuntu-2204-general - vmImage: ubuntu-22.04 - dockerRepo: 'engsys/testproxy-lin-arm64' - prepareScript: 'tools/test-proxy/docker/prepare.ps1 -qemu' - additionalDockerArgs: '--build-arg ARCH=-arm64v8 --platform linux/arm64' - dockerFile: 'tools/test-proxy/docker/dockerfile' - stableTags: - - 'latest' - ManifestDeployment: - - name: 'test_proxy_multiarch' - dockerRepo: 'engsys/test-proxy' - stableTags: - - 'latest' ReleaseBinaries: true StandaloneExeMatrix: - rid: osx-x64 diff --git a/tools/test-proxy/docker/.dockerignore b/tools/test-proxy/docker/.dockerignore deleted file mode 100644 index 50c26a298b1..00000000000 --- a/tools/test-proxy/docker/.dockerignore +++ /dev/null @@ -1,5 +0,0 @@ -.dockerignore -dockerfile -dockerfile-win -prepare.ps1 -README.md diff --git a/tools/test-proxy/docker/README.md b/tools/test-proxy/docker/README.md deleted file mode 100644 index 44c74b10a93..00000000000 --- a/tools/test-proxy/docker/README.md +++ /dev/null @@ -1,114 +0,0 @@ -# Common Docker Questions - - -## Local Generation of the test-proxy image - -### Build and Run - -**Be aware there is a pre-step to prepare the working directory before building the dockerfile.** - -This is necessary to access supporting certificate files located in eng/common. There is intent to adjust this build upon a `test-assets image` that will allow us to relocate build context to this local folder, but that is as yet incomplete. - -Prior to any other steps, invoke: - -```pwsh -./prepare.ps1 -``` - -Then, invoke to generate a container (with optional tag): - -```docker -docker build . -t test-proxy -``` - -Start locally using: - -```docker -docker run -p 5000:5000 -p 5001:5001 -v :/srv/testproxy/ -t test-proxy -``` - -Generated files will be within `/srv/testproxy/` inside the docker image. Providing a volume as shown above is necessary if you want to propogate these recordings onto your local file system. - -If you _don't_ provide a volume bound to `/srv/testproxy/`, it's not actually the end of the world. Use `docker cp` to grab those files into your host system. - -```docker -docker cp :/srv/testproxy/ -``` - -### Certificates - -All necessary components for dev-certificate usage are present within the `eng/common/testproxy` directory. Reference [trusting-cert-per-language.md](../documentation/test-proxy/trusting-cert-per-language.md) to learn how to add and trust with the toolchain of your choice. - -Please note that each language + its SSL stack will provide different mechanisms for validating SSL certificates. Again, reference [trusting-cert-per-language.md](../documentation/test-proxy/trusting-cert-per-language.md) to understand the process beyond the most general case. - -### Confirm Success - -Run the container and attempt a `curl https://localhost:5001/Admin/IsAlive`. - -Do you see activity in docker logs + a 200 response? - -### Acknowledgement - -The bulk of the methodology came from [this beautiful repo](https://github.com/BorisWilhelms/create-dotnet-devcert). Go give it a star! - -## Troubleshooting Access to Public Container Registry - -Most issues we've seen are related to having a prior `az acr login` or the like. The registry is intended to be anonymously available. - -If your error looks something like this: - -```bash -> 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 -``` - -Need to clear multiple sets of credentials. - -1. `docker logout` -2. check `Windows Credentials` under `Credential Manager` -> Remove `azsdkengsys.azurecr.io` windows credential. -3. Attempt another pull - -This occurs when a user has a **prior login** to `azsdkengsys.azurecr.io`. `az acr login` sets a windows credential with the value of the generated token. This token has a limited expiry, but it doesn't self clean. This means that even if you're already "logged out" of `az` context, etc, your console will still attempt to use that same expired token. Need to manually clean it out. - -For errors that look like: - -```bash -> 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 -``` - -Open up docker desktop and click the bug. - -![image](https://user-images.githubusercontent.com/45376673/126579279-5048132c-39c0-4b40-a3b2-6da03553097b.png) - -Then click `Restart`. Reference [this stack overflow](https://stackoverflow.com/questions/35289802/docker-pull-error-x509-certificate-has-expired-or-is-not-yet-valid) post. The docker daemon clock doesn't stay synced with windows, which causes these certificate failures. - -## Building a multiplatform image - -To build the `arm64` version of the linux image, simply provide a build time argument of `ARCH=-arm64v8`. - -```pwsh -./prepare.ps1 -docker build -t testproxy --build-arg ARCH=-arm64v8 . --platform linux/arm64 -``` - -## Publishing a multiplatform image - -- Use `docker manifest` -- `experimental` mode must be enabled to gain access to `docker manifest` features. -- Push images that we want to base the manifest list on - -Create a manifest list - -```pwsh -docker manifest create azsdkengsys.azurecr.io/engsys/testproxy:1.0.0-dev.20220407.1 ` - #[ repo ] [ tag ] - azsdkengsys.azurecr.io/engsys/testproxy-lin-arm64:1.0.0-dev.20220407.1 ` - azsdkengsys.azurecr.io/engsys/testproxy-lin:1.0.0-dev.20220407.1 -``` - -Push it - -```pwsh -docker manifest push azsdkengsys.azurecr.io/engsys/testproxy:1.0.0-dev.20220407.1 -``` diff --git a/tools/test-proxy/docker/dockerfile b/tools/test-proxy/docker/dockerfile deleted file mode 100644 index 2d255d964f1..00000000000 --- a/tools/test-proxy/docker/dockerfile +++ /dev/null @@ -1,54 +0,0 @@ -ARG ARCH= -FROM mcr.microsoft.com/dotnet/sdk:6.0.102-alpine3.14${ARCH} AS build - -# copy the code -COPY docker_build/Azure.Sdk.Tools.TestProxy/ /proxyservercode - -# publish the package -RUN cd /proxyservercode && dotnet publish -c Release -o /proxyserver -f net6.0 - -FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine3.14${ARCH} - -ENV \ - NO_AT_BRIDGE=1 \ - CERT_FOLDER=/var/certwork \ - CERT_IMPORT_SH=apply-dev-cert.sh \ - ASPNETCORE_ENVIRONMENT=Development \ - # this override allows the tool server to listen to traffic over the docker bridge. - # default URL of localhost:5000 or localhost:50001 are not usable from outside the container - ASPNETCORE_URLS="http://0.0.0.0:5000;https://0.0.0.0:5001" \ - Logging__Console__FormatterName= \ - Logging__LogLevel__Default=Information \ - Logging__LogLevel__Microsoft=Information \ - TEST_PROXY_FOLDER="/srv/testproxy/" \ - PATH="/proxyserver:${PATH}" \ - TEST_PROXY_CONTAINER=true - -# dotnet-dev-certs tool is not included in aspnet image, so manually copy from sdk image -COPY --from=build /usr/share/dotnet/sdk/6.0.102/DotnetTools/dotnet-dev-certs/6.0.2-servicing.22064.12/tools/net6.0/any/ /dotnet-dev-certs - -# prep the machine dev certificate -COPY docker_build/$CERT_IMPORT_SH docker_build/dotnet-devcert.pfx docker_build/dotnet-devcert.crt $CERT_FOLDER/ -ADD run_proxy.sh /proxyserver/test-proxy - -RUN \ - apk add --no-cache bash nss-tools openssh git \ - # Fix line endings - && sed -i -e 's/\r$//' $CERT_FOLDER/$CERT_IMPORT_SH \ - && sed -i -e 's/\r$//' /proxyserver/test-proxy \ - # Use copied dotnet-dev-certs tool - && sed -i -e 's|dotnet dev-certs|dotnet /dotnet-dev-certs/dotnet-dev-certs.dll|' $CERT_FOLDER/$CERT_IMPORT_SH \ - # Run script to import certificate - && chmod +x $CERT_FOLDER/$CERT_IMPORT_SH \ - && chmod +x /proxyserver/test-proxy \ - && $CERT_FOLDER/$CERT_IMPORT_SH \ - && rm $CERT_FOLDER/$CERT_IMPORT_SH \ - && mkdir -p /srv/testproxy - -EXPOSE 5000 5001 - -WORKDIR /proxyserver - -COPY --from=build /proxyserver . - -CMD ["test-proxy", "start", "--dump"] diff --git a/tools/test-proxy/docker/prepare.ps1 b/tools/test-proxy/docker/prepare.ps1 deleted file mode 100644 index 85dd691e68e..00000000000 --- a/tools/test-proxy/docker/prepare.ps1 +++ /dev/null @@ -1,36 +0,0 @@ -<# -.SYNOPSIS -Copies local test-proxy code into the docker build context. - -.DESCRIPTION -Copies code from tools/test-proxy/Azure.Sdk.Tools.TestProxy/ into the local docker directory. Taking a copy of the source allows us to pass the source into -the docker build without including the entire sdk-tools repo as build context. - -.PARAMETER qemu -Flag. Used to enable the installation of unix QEMU packages and subsequent docker reset. -#> -param( - [Parameter(mandatory=$false)] - [switch]$qemu = $false -) - -$copyDirectory = Resolve-Path (Join-Path -Path $PSScriptRoot -ChildPath "../../../eng/common/testproxy/") -$codeDirectory = Resolve-Path (Join-Path -Path $PSScriptRoot -ChildPath "../Azure.Sdk.Tools.TestProxy/") -$targetDirectory = "$PsScriptRoot/docker_build" - -if (-not (Test-Path $targetDirectory)) -{ - mkdir $targetDirectory -} - -# copy all files other than .yml from eng/common/scripts/testproxy into local directory dev_certificate -Get-ChildItem $copyDirectory -Exclude "*.yml" | % { Copy-Item -Path $_ -Destination "$targetDirectory/${$_.Name}" } - -# get a local copy of the source -Copy-Item -Path $codeDirectory -Destination $targetDirectory -Force -Recurse - -# install qemu if requested -if($qemu){ - apt-get install qemu binfmt-support qemu-user-static - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes -} diff --git a/tools/test-proxy/docker/run_proxy.sh b/tools/test-proxy/docker/run_proxy.sh deleted file mode 100644 index 7aaf3afab03..00000000000 --- a/tools/test-proxy/docker/run_proxy.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -dotnet /proxyserver/Azure.Sdk.Tools.TestProxy.dll "$@"