Skip to content

Commit cff96f8

Browse files
azure-sdkscbedd
andauthored
Sync eng/common directory with azure-sdk-tools for PR 3656 (#3834)
* someone wants to reference the test-proxy startup scripts externally. to make this easy on them we're parameterizing the root of the eng/common for easy use in that scenario * two leading $ signs on the definition of the certificate path was causing some issues! Co-authored-by: scbedd <[email protected]>
1 parent 73bb61d commit cff96f8

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

eng/common/testproxy/test-proxy-docker.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
parameters:
22
rootFolder: '$(Build.SourcesDirectory)'
33
targetVersion: ''
4+
templateRoot: '$(Build.SourcesDirectory)'
45

56
steps:
67
- pwsh: |
7-
$(Build.SourcesDirectory)/eng/common/scripts/trust-proxy-certificate.ps1
8+
${{ parameters.templateRoot }}/eng/common/scripts/trust-proxy-certificate.ps1
89
displayName: 'Language Specific Certificate Trust'
910
1011
- pwsh: |
1112
docker info
1213
displayName: 'Dump active docker information'
1314
1415
- pwsh: |
15-
$(Build.SourcesDirectory)/eng/common/testproxy/docker-start-proxy.ps1 -Mode start -TargetFolder "${{ parameters.rootFolder }}" -VersionOverride="${{ parameters.targetVersion }}"
16+
${{ parameters.templateRoot }}/eng/common/testproxy/docker-start-proxy.ps1 -Mode start -TargetFolder "${{ parameters.rootFolder }}" -VersionOverride="${{ parameters.targetVersion }}"
1617
displayName: 'Run the docker container'
1718
1819
- pwsh: |

eng/common/testproxy/test-proxy-tool.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ parameters:
22
rootFolder: '$(Build.SourcesDirectory)'
33
runProxy: true
44
targetVersion: ''
5+
templateRoot: '$(Build.SourcesDirectory)'
56

67
steps:
78
- pwsh: |
8-
$(Build.SourcesDirectory)/eng/common/scripts/trust-proxy-certificate.ps1
9+
${{ parameters.templateRoot }}/eng/common/scripts/trust-proxy-certificate.ps1
910
displayName: 'Language Specific Certificate Trust'
1011
1112
- pwsh: |
12-
$version = $(Get-Content "$(Build.SourcesDirectory)/eng/common/testproxy/target_version.txt" -Raw).Trim()
13+
$version = $(Get-Content "${{ parameters.templateRoot }}/eng/common/testproxy/target_version.txt" -Raw).Trim()
1314
$overrideVersion = "${{ parameters.targetVersion }}"
1415
1516
if($overrideVersion) {
@@ -29,21 +30,21 @@ steps:
2930
3031
- ${{ if eq(parameters.runProxy, 'true') }}:
3132
- pwsh: |
32-
Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Path]$(Build.SourcesDirectory)/eng/common/testproxy/dotnet-devcert.pfx"
33+
Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Path]${{ parameters.templateRoot }}/eng/common/testproxy/dotnet-devcert.pfx"
3334
Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Password]password"
3435
Write-Host "##vso[task.setvariable variable=PROXY_MANUAL_START]true"
3536
displayName: 'Configure Kestrel and PROXY_MANUAL_START Variables'
3637
3738
- pwsh: |
3839
Start-Process $(Build.BinariesDirectory)/test-proxy/test-proxy.exe `
3940
-ArgumentList "--storage-location ${{ parameters.rootFolder }}" `
40-
-NoNewWindow -PassThru -RedirectStandardOutput $(Build.SourcesDirectory)/test-proxy.log
41+
-NoNewWindow -PassThru -RedirectStandardOutput ${{ parameters.templateRoot }}/test-proxy.log
4142
displayName: 'Run the testproxy - windows'
4243
condition: and(succeeded(), eq(variables['Agent.OS'],'Windows_NT'))
4344
4445
# nohup does NOT continue beyond the current session if you use it within powershell
4546
- bash: |
46-
nohup $(Build.BinariesDirectory)/test-proxy/test-proxy > $(Build.SourcesDirectory)/test-proxy.log &
47+
nohup $(Build.BinariesDirectory)/test-proxy/test-proxy > ${{ parameters.templateRoot }}/test-proxy.log &
4748
displayName: "Run the testproxy - linux/mac"
4849
condition: and(succeeded(), ne(variables['Agent.OS'],'Windows_NT'))
4950
workingDirectory: "${{ parameters.rootFolder }}"

0 commit comments

Comments
 (0)