forked from microsoft/clrmd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
122 lines (115 loc) · 4.36 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
111
112
113
114
115
116
117
118
119
120
121
122
variables:
Build.Repository.Clean: true
_TeamName: DotNetCore
# Variables for public PR builds
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.DefinitionName'], 'github')) }}:
_HelixType: build/product
_HelixSource: pr/Microsoft/clrmd/$(Build.SourceBranch)
# Variables for internal Official builds
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.DefinitionName'], 'official')) }}:
_HelixType: build/product
_HelixSource: official/Microsoft/clrmd/$(Build.SourceBranch)
_SignType: real
_SignArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName)
_OfficialBuildIdArgs: /p:OfficialBuildId=$(Build.BuildNumber)
resources:
containers:
- container: LinuxContainer
image: microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-0cd4667-20170319080304
trigger:
- master
# To be added in the future when VSTS supports this feature
# pr:
# - master
# Three phases for each of the three OSes we want to run on
phases:
- template: /eng/common/templates/phases/base.yml
parameters:
name: Windows_NT
# enableMicrobuild and enableTelemetry can't be read from a user-defined variable (Azure DevOps limitation)
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.DefinitionName'], 'official')) }}:
enableMicrobuild: true
enableTelemetry: true
queue:
# agent pool can't be read from a user-defined variable (Azure DevOps limitation)
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.DefinitionName'], 'github')) }}:
name: dotnet-external-temp
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.DefinitionName'], 'official')) }}:
name: dotnet-internal-temp
parallel: 99
matrix:
debug:
_BuildConfig: Debug
release:
_BuildConfig: Release
steps:
- script: eng\common\cibuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
$(_SignArgs)
$(_OfficialBuildIdArgs)
name: Build
displayName: Build
condition: succeeded()
- task: PublishTestResults@2
displayName: Publish xUnit Test Results
condition: always()
continueOnError: true
inputs:
testRunner: xunit
testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml'
- task: PublishBuildArtifacts@1
displayName: Publish Packages
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)'
PublishLocation: Container
ArtifactName: Packages_$(Agent.Os)_$(Agent.JobName)
continueOnError: true
condition: always()
- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
PublishLocation: Container
ArtifactName: Logs_$(Agent.Os)_$(Agent.JobName)
continueOnError: true
condition: always()
variables:
_HelixBuildConfig: $(_BuildConfig)
- template: /eng/common/templates/phases/base.yml
parameters:
name: Linux
enableTelemetry: true
queue:
name: Hosted Ubuntu 1604
parallel: 99
container: LinuxContainer
matrix:
debug:
_BuildConfig: Debug
release:
_BuildConfig: Release
steps:
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
name: Build
displayName: Build
condition: succeeded()
- task: PublishTestResults@2
displayName: Publish xUnit Test Results
condition: always()
continueOnError: true
inputs:
testRunner: xunit
testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml'
- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
PublishLocation: Container
ArtifactName: Logs_$(Agent.Os)_$(Agent.JobName)
continueOnError: true
condition: always()
variables:
_HelixBuildConfig: $(_BuildConfig)