forked from Azure/azure-sdk-for-java
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync eng/common directory with azure-sdk-tools for PR 2758 (Azure#27127)
* 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 <[email protected]>
- Loading branch information
Showing
2 changed files
with
25 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,40 @@ | ||
parameters: | ||
rootFolder: '$(Build.SourcesDirectory)' | ||
runProxy: true | ||
|
||
steps: | ||
- pwsh: | | ||
$(Build.SourcesDirectory)/eng/common/scripts/trust-proxy-certificate.ps1 | ||
displayName: 'Language Specific Certificate Trust' | ||
- 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" | ||
Write-Host "##vso[task.setvariable variable=PROXY_MANUAL_START]true" | ||
displayName: 'Configure Kestrel and PROXY_MANUAL_START Variables' | ||
- 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.20220119.2 | ||
--version 1.0.0-dev.20220210.1 | ||
displayName: "Install test-proxy" | ||
- pwsh: | | ||
Start-Process $(Build.BinariesDirectory)/test-proxy/test-proxy.exe ` | ||
-ArgumentList "--storage-location ${{ parameters.rootFolder }}" ` | ||
-NoNewWindow -PassThru -RedirectStandardOutput $(Build.SourcesDirectory)/test-proxy.log | ||
displayName: 'Run the testproxy - windows' | ||
condition: and(succeeded(), eq(variables['Agent.OS'],'Windows_NT')) | ||
Write-Host "##vso[task.prependpath]$(Build.BinariesDirectory)/test-proxy" | ||
displayName: "Prepend path with test-proxy tool install location" | ||
- ${{ if eq(parameters.runProxy, 'true') }}: | ||
- 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" | ||
Write-Host "##vso[task.setvariable variable=PROXY_MANUAL_START]true" | ||
displayName: 'Configure Kestrel and PROXY_MANUAL_START Variables' | ||
- pwsh: | | ||
Start-Process $(Build.BinariesDirectory)/test-proxy/test-proxy.exe ` | ||
-ArgumentList "--storage-location ${{ parameters.rootFolder }}" ` | ||
-NoNewWindow -PassThru -RedirectStandardOutput $(Build.SourcesDirectory)/test-proxy.log | ||
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: | | ||
nohup $(Build.BinariesDirectory)/test-proxy/test-proxy > $(Build.SourcesDirectory)/test-proxy.log & | ||
displayName: "Run the testproxy - linux/mac" | ||
condition: and(succeeded(), ne(variables['Agent.OS'],'Windows_NT')) | ||
workingDirectory: "${{ parameters.rootFolder }}" | ||
# nohup does NOT continue beyond the current session if you use it within powershell | ||
- bash: | | ||
nohup $(Build.BinariesDirectory)/test-proxy/test-proxy > $(Build.SourcesDirectory)/test-proxy.log & | ||
displayName: "Run the testproxy - linux/mac" | ||
condition: and(succeeded(), ne(variables['Agent.OS'],'Windows_NT')) | ||
workingDirectory: "${{ parameters.rootFolder }}" |