Skip to content

Commit ae1b47e

Browse files
azure-sdkscbedd
andauthored
Sync eng/common directory with azure-sdk-tools for PR 2758 (Azure#27027)
* tooling updates. allow install but no run of test proxy, prepending the path properly, etc * update targeted versions of the test-proxy Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>
1 parent 8854529 commit ae1b47e

File tree

2 files changed

+25
-19
lines changed

2 files changed

+25
-19
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ catch {
3131
Write-Error "Please check your docker invocation and try running the script again."
3232
}
3333

34-
$SELECTED_IMAGE_TAG = "1314089"
34+
$SELECTED_IMAGE_TAG = "1369319"
3535
$CONTAINER_NAME = "ambitious_azsdk_test_proxy"
3636
$LINUX_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-lin:${SELECTED_IMAGE_TAG}"
3737
$WINDOWS_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-win:${SELECTED_IMAGE_TAG}"
Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,40 @@
11
parameters:
22
rootFolder: '$(Build.SourcesDirectory)'
3+
runProxy: true
34

45
steps:
56
- pwsh: |
67
$(Build.SourcesDirectory)/eng/common/scripts/trust-proxy-certificate.ps1
78
displayName: 'Language Specific Certificate Trust'
89
9-
- pwsh: |
10-
Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Path]$(Build.SourcesDirectory)/eng/common/testproxy/dotnet-devcert.pfx"
11-
Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Password]password"
12-
Write-Host "##vso[task.setvariable variable=PROXY_MANUAL_START]true"
13-
displayName: 'Configure Kestrel and PROXY_MANUAL_START Variables'
14-
1510
- pwsh: |
1611
dotnet tool install azure.sdk.tools.testproxy `
1712
--tool-path $(Build.BinariesDirectory)/test-proxy `
1813
--add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json `
19-
--version 1.0.0-dev.20220119.2
14+
--version 1.0.0-dev.20220210.1
2015
displayName: "Install test-proxy"
2116
2217
- pwsh: |
23-
Start-Process $(Build.BinariesDirectory)/test-proxy/test-proxy.exe `
24-
-ArgumentList "--storage-location ${{ parameters.rootFolder }}" `
25-
-NoNewWindow -PassThru -RedirectStandardOutput $(Build.SourcesDirectory)/test-proxy.log
26-
displayName: 'Run the testproxy - windows'
27-
condition: and(succeeded(), eq(variables['Agent.OS'],'Windows_NT'))
18+
Write-Host "##vso[task.prependpath]$(Build.BinariesDirectory)/test-proxy"
19+
displayName: "Prepend path with test-proxy tool install location"
20+
21+
- ${{ if eq(parameters.runProxy, 'true') }}:
22+
- pwsh: |
23+
Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Path]$(Build.SourcesDirectory)/eng/common/testproxy/dotnet-devcert.pfx"
24+
Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Password]password"
25+
Write-Host "##vso[task.setvariable variable=PROXY_MANUAL_START]true"
26+
displayName: 'Configure Kestrel and PROXY_MANUAL_START Variables'
27+
28+
- pwsh: |
29+
Start-Process $(Build.BinariesDirectory)/test-proxy/test-proxy.exe `
30+
-ArgumentList "--storage-location ${{ parameters.rootFolder }}" `
31+
-NoNewWindow -PassThru -RedirectStandardOutput $(Build.SourcesDirectory)/test-proxy.log
32+
displayName: 'Run the testproxy - windows'
33+
condition: and(succeeded(), eq(variables['Agent.OS'],'Windows_NT'))
2834
29-
# nohup does NOT continue beyond the current session if you use it within powershell
30-
- bash: |
31-
nohup $(Build.BinariesDirectory)/test-proxy/test-proxy > $(Build.SourcesDirectory)/test-proxy.log &
32-
displayName: "Run the testproxy - linux/mac"
33-
condition: and(succeeded(), ne(variables['Agent.OS'],'Windows_NT'))
34-
workingDirectory: "${{ parameters.rootFolder }}"
35+
# nohup does NOT continue beyond the current session if you use it within powershell
36+
- bash: |
37+
nohup $(Build.BinariesDirectory)/test-proxy/test-proxy > $(Build.SourcesDirectory)/test-proxy.log &
38+
displayName: "Run the testproxy - linux/mac"
39+
condition: and(succeeded(), ne(variables['Agent.OS'],'Windows_NT'))
40+
workingDirectory: "${{ parameters.rootFolder }}"

0 commit comments

Comments
 (0)