forked from MiniProfiler/dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
92 lines (83 loc) · 2.04 KB
/
azure-pipelines.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
resources:
containers:
- container: redis
image: redis
ports:
- 6379:6379
- container: mongo
image: mongo
ports:
- 27017:27017
- container: mysql
image: mysql
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
- container: postgres
image: postgres
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
services:
redis: redis
mongo: mongo
mysql: mysql
postgres: postgres
pool:
name: Hosted Windows Container
vmImage: win1803
# Build Variables
variables:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
RedisConnectionString: localhost:6379
MongoDbConnectionString: mongodb://localhost:27017/test
MySQLConnectionString: server=localhost;uid=root;pwd=root;database=test;Allow User Variables=true
PostgreSqlConnectionString: Server=localhost;Port=5432;Database=test;User Id=postgres;Password=postgres;
SQLServerConnectionString: Data Source=(LocalDb)\MSSQLLocalDB;Initial Catalog=tempdb;Trusted_Connection=True;
system.debug: true
# CI Trigger on master branch
trigger:
batch: false
branches:
include:
- master
paths:
exclude:
- docs/*
- '**/*.md'
# Trigger builds for PR's targeting master
pr:
branches:
include:
- master
paths:
exclude:
- docs/*
- '**/*.md'
steps:
- task: DotNetCoreInstaller@0
displayName: 'Install DotNet Core 2.1.3'
inputs:
version: 2.1.300
- task: PowerShell@2
displayName: 'Build / Test / Create Packages'
inputs:
targetType: filePath
filePath: build.AzureDevops.ps1
- task: PublishTestResults@2
displayName: 'Publish Test Results **/Test-*.xml'
inputs:
testResultsFormat: XUnit
testResultsFiles: '**/Test-*.xml'
mergeTestResults: true
# PR doesn't create nuget packages. So publish artifact step disabled for PR's
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: packages'
inputs:
PathtoPublish: .nupkgs
ArtifactName: packages
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))