forked from dotnet/iot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vsts-ci.yml
142 lines (134 loc) · 4.98 KB
/
.vsts-ci.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
variables:
Build.Repository.Clean: true
_HelixType: build/product
_HelixSource: pr/dotnet/arcade-minimalci-sample/$(Build.SourceBranch)
_enableTelemetry: true
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
OfficialBuildId: $(Build.BuildNumber)
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_MULTILEVEL_LOOKUP: 0
resources:
containers:
- container: LinuxContainer
image: microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-0cd4667-20170319080304
trigger:
- master
pr:
- master
# Three phases for each of the three OSes we want to run on
phases:
- template: /eng/common/templates/phases/base.yml
parameters:
agentOs: Windows_NT
name: Windows_NT
enableTelemetry: $(_enableTelemetry)
queue:
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
name: dotnet-internal-temp
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
name: dotnet-external-temp
parallel: 99
matrix:
debug_configuration:
_BuildConfig: Debug
release_configuration:
_BuildConfig: Release
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
enableMicrobuild: true
steps:
- script: eng\common\cibuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
name: Build
displayName: Build
condition: succeeded()
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- task: PublishBuildArtifacts@1
displayName: Publish Windows package assets
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping
artifactName: BuiltPackageOutputs
artifactType: container
condition: eq(variables['_BuildConfig'], 'Release')
variables:
_HelixBuildConfig: $(_BuildConfig)
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
_TeamName: DotNetCore
_SignType: real
- template: /eng/common/templates/phases/base.yml
parameters:
agentOs: OSX
name: OSX
enableTelemetry: $(_enableTelemetry)
queue:
name: Hosted macOS Preview
parallel: 99
matrix:
debug_configuration:
_BuildConfig: Debug
release_configuration:
_BuildConfig: Release
steps:
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
name: Build
displayName: Build
condition: succeeded()
variables:
_HelixBuildConfig: $(_BuildConfig)
- template: /eng/common/templates/phases/base.yml
parameters:
agentOs: Linux
name: Linux
enableTelemetry: $(_enableTelemetry)
queue:
name: Hosted Ubuntu 1604
parallel: 99
container: LinuxContainer
matrix:
debug_configuration:
_BuildConfig: Debug
release_configuration:
_BuildConfig: Release
steps:
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
name: Build
displayName: Build
condition: succeeded()
variables:
_HelixBuildConfig: $(_BuildConfig)
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates/phases/base.yml
parameters:
dependsOn:
- Windows_NT
- OSX
- Linux
agentOs: Windows_NT
name: PublishToMyGet
enableTelemetry: $(_enableTelemetry)
queue:
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
name: dotnet-internal-temp
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
name: dotnet-external-temp
steps:
- task: DownloadBuildArtifacts@0
displayName: Download Built Packages
inputs:
artifactName: BuiltPackageOutputs
downloadPath: $(Build.SourcesDirectory)/artifacts/packages/pushToMyGet
- task: AzureKeyVault@1
displayName: Downloading MyGet Secret
inputs:
azureSubscription: 'DotNet-Engineering-Services_KeyVault'
KeyVaultName: EngKeyVault
SecretsFilter: 'dotnet-myget-org-api-key'
- script: powershell -ExecutionPolicy ByPass -NoProfile -command "& """$(Build.SourcesDirectory)\eng\common\Build.ps1""" -restore" &&
for /f %%x in ('dir /s /b $(Build.SourcesDirectory)\artifacts\packages\pushToMyGet\*.nupkg') do $(Build.SourcesDirectory)\.dotnet\dotnet.exe nuget push %%x -k $(dotnet-myget-org-api-key) -s https://dotnet.myget.org/F/dotnet-core/
name: PublishPackages
displayName: Publishing Packages to MyGet
condition: succeeded()