Skip to content

Commit

Permalink
remove all references to docker (#34811)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Beddall (from Dev Box) <scbedd@microsoft.com>
  • Loading branch information
azure-sdk and scbedd authored Mar 18, 2024
1 parent b22e5cc commit cec4fdc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 37 deletions.
35 changes: 0 additions & 35 deletions eng/common/testproxy/onboarding/common-asset-functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions eng/common/testproxy/onboarding/generate-assets-json.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cec4fdc

Please sign in to comment.