forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split live testing YAML to allow separate live testing of services (A…
…zure#5865) * Update and add YAML to support live testing scenarios
- Loading branch information
1 parent
b2d863b
commit d1849bf
Showing
2 changed files
with
73 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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# External variables: | ||
# ProjectFile - The project to build and test. This variable is defined in pipeline web ui because we want to be able to provide it at queue time and that isn't supported in yaml yet. | ||
# MaxParallelTestJobs - Maximum number of parallel test jobs | ||
# AzConfigConnectionString - The connection string used for testing the AzConfig service. This is set in the pipeline web ui as it needs different values for public vs internal. | ||
# ServiceBusConnectionString - The connection string used for testing the Service Bus service. This is set in the pipeline web ui as it needs different values for public vs internal. | ||
# EventHubsConnectionString - The connection string to the namespace used for testing the Event Hubs service. This is set in the pipeline web ui and needs different values for public vs internal. | ||
# EventHubsStorageConnectionString - The connection string to the storage account used for testing the Event Hubs service. This is set in the pipeline web ui and needs different values for public vs internal. | ||
|
||
trigger: | ||
- master | ||
|
||
variables: | ||
DotNetCoreVersion: '2.1.503' | ||
|
||
jobs: | ||
- job: 'Test' | ||
|
||
strategy: | ||
maxParallel: $[ variables['MaxParallelTestJobs'] ] | ||
matrix: | ||
Linux: | ||
OSName: 'Linux' | ||
OSVmImage: 'ubuntu-16.04' | ||
Windows: | ||
OSName: 'Windows' | ||
OSVmImage: 'vs2017-win2016' | ||
MacOs: | ||
OSName: 'MacOS' | ||
OSVmImage: 'macOS-10.13' | ||
|
||
pool: | ||
vmImage: '$(OSVmImage)' | ||
|
||
steps: | ||
- powershell: | | ||
Invoke-WebRequest -Uri "https://github.com/Azure/azure-sdk-tools/releases/download/sdk-tools_14793/sdk-tools.zip" ` | ||
-OutFile "sdk-tools.zip" | Wait-Process; Expand-Archive -Path "sdk-tools.zip" -DestinationPath "./sdk-tools/" | ||
workingDirectory: '$(Build.BinariesDirectory)' | ||
displayName: 'Download Tools Archive From Github Release and Extract it' | ||
- task: PythonScript@0 | ||
displayName: 'Run VerifyAgentOS script' | ||
inputs: | ||
scriptPath: '$(Build.BinariesDirectory)/sdk-tools/scripts/python/verify_agent_os.py' | ||
arguments: $(OSName) | ||
|
||
- task: DotNetCoreInstaller@0 | ||
displayName: 'Use .NET Core sdk $(DotNetCoreVersion)' | ||
inputs: | ||
version: '$(DotNetCoreVersion)' | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'Build & Test (all tests)' | ||
env: | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
DOTNET_MULTILEVEL_LOOKUP: 0 | ||
APP_CONFIG_CONNECTION: $(AppConfigConnectionString) | ||
AZ_SERVICE_BUS_CONNECTION: $(ServiceBusConnectionString) | ||
inputs: | ||
command: test | ||
projects: '$(ProjectFile)' | ||
arguments: --logger trx | ||
publishTestResults: false | ||
|
||
- task: PublishTestResults@2 | ||
condition: succeededOrFailed() | ||
inputs: | ||
testResultsFiles: '**/*.trx' | ||
testRunTitle: '$(OSName) DotNet $(DotNetCoreVersion)' | ||
testResultsFormat: 'VSTest' | ||
mergeTestResults: true |