azure-cosmos-dotnet-v3/azure-pipelines-official.yml

67 строки
2.6 KiB
YAML

trigger: none
pr: none
variables:
ReleaseArguments: ' --filter "TestCategory!=Quarantine" --verbosity normal '
BuildConfiguration: Release
Packaging.EnableSBOMSigning: true
VmImage: windows-latest # https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops
stages:
- stage:
displayName: Gate
jobs:
- template: templates/static-tools.yml
parameters:
BuildConfiguration: '${{ variables.BuildConfiguration }}'
VmImage: '${{ variables.VmImage }}'
- template: templates/build-test.yml
parameters:
BuildConfiguration: '${{ variables.BuildConfiguration }}'
Arguments: '${{ variables.ReleaseArguments }}'
VmImage: '${{ variables.VmImage }}'
MultiRegionConnectionString: $(COSMOSDB_MULTI_REGION)
- job:
displayName: TelemetryToService ${{ variables.BuildConfiguration }}
timeoutInMinutes: 120
pool:
name: 'OneES'
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
clean: true # if true, execute `execute git clean -ffdx && git reset --hard HEAD` before fetching
# Add this Command to Include the .NET 6 SDK
- task: UseDotNet@2
displayName: Use .NET 6.0
inputs:
packageType: 'sdk'
version: '6.x'
- task: DotNetCoreCLI@2
displayName: Integration Test With Client Telemetry Service
condition: succeeded()
inputs:
command: test
projects: 'Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/*.csproj'
arguments: --filter "TestCategory=ClientTelemetryRelease & TestCategory!=Quarantine" --verbosity normal --configuration ${{ variables.BuildConfiguration }} /p:OS=Windows
nugetConfigPath: NuGet.config
publishTestResults: true
testRunTitle: Microsoft.Azure.Cosmos.EmulatorTests
env:
COSMOSDB_ACCOUNT_CONNECTION_STRING: $(COSMOSDB_ACCOUNT_CONNECTION_STRING) # Real Account Connection String used by Integration Tests while running as part of release pipeline
CLIENT_TELEMETRY_SERVICE_ENDPOINT: $(CLIENT_TELEMETRY_SERVICE_ENDPOINT) # Client telemetry service url returned by configured account client config API
- stage:
displayName: Publish
jobs:
- template: templates/nuget-pack.yml
parameters:
BuildConfiguration: Release
VmImage: '${{ variables.VmImage }}'
ReleasePackage: true
OutputPath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/Release/Microsoft.Azure.Cosmos'
BlobVersion: $(BlobVersion)