forked from Azure/azure-cosmos-dotnet-v3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-faultinjection.yml
72 lines (62 loc) · 2.49 KB
/
azure-pipelines-faultinjection.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
trigger: none
pr: none
variables:
ReleaseArguments: ' --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: Fault Injection Release Gates
jobs:
- template: templates/static-tools.yml
parameters:
BuildConfiguration: '${{ variables.BuildConfiguration }}'
VmImage: '${{ variables.VmImage }}'
# - template: templates/build-fault-injection-test.yml
# parameters:
# BuildConfiguration: '${{ variables.BuildConfiguration }}'
# Arguments: '${{ variables.ReleaseArguments }}'
# VmImage: '${{ variables.VmImage }}'
# MultiRegionConnectionString: $(COSMOSDB_MULTI_REGION)
- job:
displayName: FaultInjection Integration Tests ${{ 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 SDK and runtimes
- task: UseDotNet@2
displayName: Use .NET 6.0
inputs:
packageType: 'runtime'
version: '6.x'
- task: UseDotNet@2
displayName: Use .NET 8.0
inputs:
packageType: 'sdk'
version: '8.x'
- task: DotNetCoreCLI@2
displayName: Integration Test With Fault Injection
condition: succeeded()
inputs:
command: test
projects: 'Microsoft.Azure.Cosmos/FaultInjection/tests/*.csproj'
arguments: --verbosity normal --configuration ${{ variables.BuildConfiguration }} /p:OS=Windows
nugetConfigPath: NuGet.config
publishTestResults: true
testRunTitle: FaultInjectionTests
env:
COSMOSDB_MULTI_REGION: $(COSMOSDB_MULTI_REGION) # Real Account Connection String used by Integration Tests while running as part of release pipeline
- stage:
displayName: Publish
jobs:
- template: templates/fault-injection-nuget-pack.yml
parameters:
BuildConfiguration: Release
VmImage: '${{ variables.VmImage }}'
ReleasePackage: true
OutputPath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/Release/Microsoft.Azure.Cosmos.FaultInjection'
BlobVersion: $(BlobVersion)