forked from dotnet/efcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
110 lines (105 loc) · 4.98 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
variables:
- name: _BuildConfig
value: Release
- name: _TeamName
value: AspNetCore
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: true
- name: _PublishUsingPipelines
value: true
- name: _DotNetArtifactsCategory
value: ENTITYFRAMEWORKCORE
trigger:
- master
- release/*
pr: ['*']
jobs:
- template: eng/common/templates/jobs/jobs.yml
parameters:
enableMicrobuild: true
enablePublishBuildArtifacts: true
enablePublishBuildAssets: true
enablePublishUsingPipelines: $(_PublishUsingPipelines)
enablePublishTestResults: true
enableTelemetry: true
helixRepo: aspnet/EntityFrameworkCore
jobs:
- job: Windows
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: NetCorePublic-Int-Pool
queue: BuildPool.Windows.10.Amd64.VS2017.Open
${{ if ne(variables['System.TeamProject'], 'public') }}:
name: NetCoreInternal-Int-Pool
queue: BuildPool.Windows.10.Amd64.VS2017
variables:
- _InternalBuildArgs: ''
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- group: DotNet-Blob-Feed
- _SignType: real
- _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/index.json
- _DotNetPublishToBlobFeed: true
- _InternalBuildArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) /p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl) /p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed) /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines) /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
steps:
- script: "echo ##vso[build.addbuildtag]daily-build"
condition: and(ne(variables['Build.Reason'], 'PullRequest'), ne(variables['IsFinalBuild'], 'true'))
displayName: 'Set CI tags'
- script: "echo ##vso[build.addbuildtag]release-candidate"
condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['IsFinalBuild'], 'true'))
displayName: 'Set CI tags'
- powershell: |
SqlLocalDB stop MSSQLLocalDB -i
SqlLocalDB start MSSQLLocalDB
& "$env:ProgramFiles\Microsoft SQL Server\110\Tools\Binn\SQLCMD.EXE" -S '(localdb)\MSSQLLocalDB' -b -Q @'
DECLARE @name nvarchar(255);
DECLARE db CURSOR FOR SELECT Name FROM sysdatabases WHERE Name NOT IN ('master', 'tempdb', 'model', 'msdb');
OPEN db;
FETCH NEXT FROM db INTO @name;
WHILE @@FETCH_STATUS = 0
BEGIN
SET @name = REPLACE(@name, ']', ']]');
PRINT 'Dropping database [' + @name + ']';
SET @name = 'DROP DATABASE [' + @name + ']';
EXEC (@name);
FETCH NEXT FROM db INTO @name;
END;
CLOSE db;
DEALLOCATE db;
'@
displayName: Cleanup databases
- script: eng\common\cibuild.cmd -configuration $(_BuildConfig) -prepareMachine $(_InternalBuildArgs)
name: Build
- task: PublishBuildArtifacts@1
displayName: Upload artifacts
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
inputs:
pathtoPublish: 'artifacts/packages/'
artifactName: packages
artifactType: Container
parallel: true
- job: macOS
pool:
vmImage: macOS-10.13
variables:
- ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['system.pullrequest.isfork'], false), notin(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest')) }}:
- _CosmosConnection: https://ef-nightly-test.documents.azure.com:443/
- _CosmosToken: $(ef-nightly-cosmos-key)
steps:
- bash: brew install libspatialite
displayName: Install SpatiaLite
continueOnError: true
- script: eng/common/cibuild.sh --configuration $(_BuildConfig) --binaryLog --prepareMachine
env:
Test__Cosmos__Sql__DefaultConnection: $(_CosmosConnection)
Test__Cosmos__Sql__AuthToken: $(_CosmosToken)
name: Build
continueOnError: true
- job: Linux
pool:
vmImage: ubuntu-16.04
steps:
- bash: sudo apt-get install -y libsqlite3-mod-spatialite
displayName: Install SpatiaLite
continueOnError: true
- script: eng/common/cibuild.sh --configuration $(_BuildConfig) --prepareMachine
name: Build