diff --git a/eng/common/testproxy/onboarding/common-asset-functions.ps1 b/eng/common/testproxy/onboarding/common-asset-functions.ps1 index 3d7bcf605584..2f7c1b37c3c7 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 bd825eebbe14..3576fd3c6bd6 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