* add test-proxy invocations to eng/common folder Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>
47 lines
1.9 KiB
YAML
47 lines
1.9 KiB
YAML
parameters:
|
|
rootFolder: '$(Build.SourcesDirectory)'
|
|
|
|
steps:
|
|
- pwsh: |
|
|
$(Build.SourcesDirectory)/eng/common/scripts/trust-proxy-certificate.ps1
|
|
displayName: 'Language Specific Certificate Trust'
|
|
|
|
- pwsh: |
|
|
Write-Host "##vso[task.setvariable variable=OriginalPath]$env:PATH"
|
|
displayName: 'Store Path Value'
|
|
|
|
- pwsh: |
|
|
Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Path]$(Build.SourcesDirectory)/eng/common/testproxy/dotnet-devcert.pfx"
|
|
Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Password]password"
|
|
displayName: 'Configure Kestrel Environment Variables'
|
|
|
|
- task: UseDotNet@2
|
|
displayName: "Use .NET Core SDK"
|
|
inputs:
|
|
packageType: sdk
|
|
version: 5.0.205
|
|
|
|
- pwsh: |
|
|
dotnet tool install azure.sdk.tools.testproxy `
|
|
--tool-path $(Build.BinariesDirectory)/test-proxy `
|
|
--add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json `
|
|
--version 1.0.0-dev.20210811.2
|
|
displayName: "Install test-proxy"
|
|
|
|
- pwsh: |
|
|
Start-Process $(Build.BinariesDirectory)/test-proxy/test-proxy.exe `
|
|
-ArgumentList "--storage-location '${{ parameters.rootFolder }}'" `
|
|
-NoNewWindow -PassThru
|
|
displayName: 'Run the testproxy - windows'
|
|
condition: and(succeeded(), eq(variables['Agent.OS'],'Windows_NT'))
|
|
|
|
# nohup does NOT continue beyond the current session if you use it within powershell
|
|
- bash: |
|
|
sudo nohup $(Build.BinariesDirectory)/test-proxy/test-proxy &
|
|
displayName: "Run the testproxy - linux/mac"
|
|
condition: and(succeeded(), ne(variables['Agent.OS'],'Windows_NT'))
|
|
workingDirectory: "${{ parameters.rootFolder }}"
|
|
|
|
- pwsh: |
|
|
Write-Host "##vso[task.setvariable variable=PATH]$(OriginalPath)"
|
|
displayName: 'Restore .NET version by resetting path' |