|
| 1 | +trigger: |
| 2 | +- master |
| 3 | +- release/* |
| 4 | + |
| 5 | +pr: |
| 6 | +- master |
| 7 | +- release/* |
| 8 | + |
| 9 | +jobs: |
| 10 | +- template: /eng/build.yml |
| 11 | + parameters: |
| 12 | + name: Windows |
| 13 | + osGroup: Windows_NT |
| 14 | + strategy: |
| 15 | + matrix: |
| 16 | + Build_Debug: |
| 17 | + _BuildConfig: Debug |
| 18 | + _BuildArch: x64 |
| 19 | + Build_Release: |
| 20 | + _BuildConfig: Release |
| 21 | + _BuildArch: x64 |
| 22 | + _PublishArtifacts: bin |
| 23 | + Build_Release_x86: |
| 24 | + _BuildConfig: Release |
| 25 | + _BuildArch: x86 |
| 26 | + _PublishArtifacts: bin/Windows_NT.x86.Release |
| 27 | + Build_Release_arm: |
| 28 | + _BuildConfig: Release |
| 29 | + _BuildArch: arm |
| 30 | + _PublishArtifacts: bin/Windows_NT.arm.Release |
| 31 | + |
| 32 | +- template: /eng/build.yml |
| 33 | + parameters: |
| 34 | + name: CentOS_7 |
| 35 | + osGroup: Linux |
| 36 | + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343 |
| 37 | + strategy: |
| 38 | + matrix: |
| 39 | + Build_Debug: |
| 40 | + _BuildConfig: Debug |
| 41 | + _BuildArch: x64 |
| 42 | + _PublishArtifacts: bin/Linux.x64.Debug |
| 43 | + Build_Release: |
| 44 | + _BuildConfig: Release |
| 45 | + _BuildArch: x64 |
| 46 | + _PublishArtifacts: bin/Linux.x64.Release |
| 47 | + |
| 48 | +- template: /eng/build.yml |
| 49 | + parameters: |
| 50 | + name: Linux_cross |
| 51 | + osGroup: Linux |
| 52 | + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-14.04-cross-1735d26-20190521133857 |
| 53 | + crossrootfsDir: '/crossrootfs/arm' |
| 54 | + strategy: |
| 55 | + matrix: |
| 56 | + Build_Release: |
| 57 | + _BuildConfig: Release |
| 58 | + _BuildArch: arm |
| 59 | + _PublishArtifacts: bin/Linux.arm.Release |
| 60 | + |
| 61 | +- template: /eng/build.yml |
| 62 | + parameters: |
| 63 | + name: Linux_cross64 |
| 64 | + osGroup: Linux |
| 65 | + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-a3ae44b-20180315221921 |
| 66 | + crossrootfsDir: '/crossrootfs/arm64' |
| 67 | + strategy: |
| 68 | + matrix: |
| 69 | + Build_Release: |
| 70 | + _BuildConfig: Release |
| 71 | + _BuildArch: arm64 |
| 72 | + _PublishArtifacts: bin/Linux.arm64.Release |
| 73 | + |
| 74 | +- template: /eng/build.yml |
| 75 | + parameters: |
| 76 | + name: Alpine3_6 |
| 77 | + osGroup: Linux |
| 78 | + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.6-WithNode-f4d3fe3-20181220200247 |
| 79 | + strategy: |
| 80 | + matrix: |
| 81 | + Build_Release: |
| 82 | + _BuildConfig: Release |
| 83 | + _BuildArch: x64 |
| 84 | + _PublishArtifacts: bin/Linux.x64.Release |
| 85 | + |
| 86 | +- template: /eng/build.yml |
| 87 | + parameters: |
| 88 | + name: MacOS |
| 89 | + osGroup: MacOS |
| 90 | + strategy: |
| 91 | + matrix: |
| 92 | + Build_Release: |
| 93 | + _BuildConfig: Release |
| 94 | + _BuildArch: x64 |
| 95 | + _PublishArtifacts: bin/OSX.x64.Release |
| 96 | + |
| 97 | +# Test only legs |
| 98 | + |
| 99 | +- template: /eng/build.yml |
| 100 | + parameters: |
| 101 | + name: Debian_Stretch |
| 102 | + osGroup: Linux |
| 103 | + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-stretch-3e800f1-20190521154431 |
| 104 | + dependsOn: CentOS_7 |
| 105 | + testOnly: true |
| 106 | + strategy: |
| 107 | + matrix: |
| 108 | + Build_Debug: |
| 109 | + _BuildConfig: Debug |
| 110 | + _BuildArch: x64 |
| 111 | + |
| 112 | +- template: /eng/build.yml |
| 113 | + parameters: |
| 114 | + name: Fedora_28 |
| 115 | + osGroup: Linux |
| 116 | + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-09ca40b-20190508143249 |
| 117 | + dependsOn: CentOS_7 |
| 118 | + testOnly: true |
| 119 | + strategy: |
| 120 | + matrix: |
| 121 | + Build_Debug: |
| 122 | + _BuildConfig: Debug |
| 123 | + _BuildArch: x64 |
| 124 | + |
| 125 | +- template: /eng/build.yml |
| 126 | + parameters: |
| 127 | + name: Fedora_29 |
| 128 | + osGroup: Linux |
| 129 | + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-29-09ca40b-20190508143249 |
| 130 | + dependsOn: CentOS_7 |
| 131 | + testOnly: true |
| 132 | + strategy: |
| 133 | + matrix: |
| 134 | + Build_Debug: |
| 135 | + _BuildConfig: Debug |
| 136 | + _BuildArch: x64 |
| 137 | + |
| 138 | +- template: /eng/build.yml |
| 139 | + parameters: |
| 140 | + name: OpenSuse_42_1 |
| 141 | + osGroup: Linux |
| 142 | + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-42.1-c103199-20180628122439 |
| 143 | + dependsOn: CentOS_7 |
| 144 | + testOnly: true |
| 145 | + strategy: |
| 146 | + matrix: |
| 147 | + Build_Debug: |
| 148 | + _BuildConfig: Debug |
| 149 | + _BuildArch: x64 |
| 150 | + |
| 151 | +- template: /eng/build.yml |
| 152 | + parameters: |
| 153 | + name: OpenSuse_42_3 |
| 154 | + osGroup: Linux |
| 155 | + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-42.3-3e800f1-20190501005344 |
| 156 | + dependsOn: CentOS_7 |
| 157 | + testOnly: true |
| 158 | + strategy: |
| 159 | + matrix: |
| 160 | + Build_Debug: |
| 161 | + _BuildConfig: Debug |
| 162 | + _BuildArch: x64 |
| 163 | + |
| 164 | +- template: /eng/build.yml |
| 165 | + parameters: |
| 166 | + name: Ubuntu_14_04 |
| 167 | + osGroup: Linux |
| 168 | + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-14.04-1735d26-20190521133852 |
| 169 | + dependsOn: CentOS_7 |
| 170 | + testOnly: true |
| 171 | + strategy: |
| 172 | + matrix: |
| 173 | + Build_Debug: |
| 174 | + _BuildConfig: Debug |
| 175 | + _BuildArch: x64 |
| 176 | + |
| 177 | +- template: /eng/build.yml |
| 178 | + parameters: |
| 179 | + name: Ubuntu_16_04 |
| 180 | + osGroup: Linux |
| 181 | + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-09ca40b-20190520220842 |
| 182 | + dependsOn: CentOS_7 |
| 183 | + testOnly: true |
| 184 | + strategy: |
| 185 | + matrix: |
| 186 | + Build_Debug: |
| 187 | + _BuildConfig: Debug |
| 188 | + _BuildArch: x64 |
| 189 | + |
| 190 | +- template: /eng/build.yml |
| 191 | + parameters: |
| 192 | + name: Ubuntu_18_04 |
| 193 | + osGroup: Linux |
| 194 | + dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-3e800f1-20190508143252 |
| 195 | + dependsOn: CentOS_7 |
| 196 | + testOnly: true |
| 197 | + strategy: |
| 198 | + matrix: |
| 199 | + Build_Debug: |
| 200 | + _BuildConfig: Debug |
| 201 | + _BuildArch: x64 |
| 202 | + |
| 203 | +# Download, sign, package and publish |
| 204 | + |
| 205 | +- template: /eng/common/templates/job/job.yml |
| 206 | + parameters: |
| 207 | + name: Sign_Package_Publish |
| 208 | + dependsOn: |
| 209 | + - Windows |
| 210 | + - CentOS_7 |
| 211 | + - Alpine3_6 |
| 212 | + - MacOS |
| 213 | + - Linux_cross |
| 214 | + - Linux_cross64 |
| 215 | + condition: ne(variables['Build.Reason'], 'Schedule') |
| 216 | + pool: |
| 217 | + name: NetCoreInternal-Pool |
| 218 | + queue: BuildPool.Windows.10.Amd64.VS2017 |
| 219 | + variables: |
| 220 | + - _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json |
| 221 | + - _TeamName: DotNetCore |
| 222 | + - _SignType: $(SignType) |
| 223 | + enableMicrobuild: true |
| 224 | + steps: |
| 225 | + |
| 226 | + # Windows x64 download. Everything under "bin" is published for the Windows x64 build. |
| 227 | + |
| 228 | + - task: DownloadPipelineArtifact@2 |
| 229 | + displayName: Download Windows x64 and Managed Artifacts |
| 230 | + inputs: |
| 231 | + artifactName: Windows_x64_Release |
| 232 | + targetPath: '$(Build.SourcesDirectory)/artifacts/bin' |
| 233 | + condition: succeeded() |
| 234 | + |
| 235 | + # Windows x86 download |
| 236 | + |
| 237 | + - task: DownloadPipelineArtifact@2 |
| 238 | + displayName: Download Windows x86 Artifacts |
| 239 | + inputs: |
| 240 | + artifactName: Windows_x86_Release |
| 241 | + targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Windows_NT.x86.Release' |
| 242 | + condition: succeeded() |
| 243 | + |
| 244 | + # Windows arm download |
| 245 | + |
| 246 | + - task: DownloadPipelineArtifact@2 |
| 247 | + displayName: Download Windows Arm Artifacts |
| 248 | + inputs: |
| 249 | + artifactName: Windows_arm_Release |
| 250 | + targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Windows_NT.arm.Release' |
| 251 | + condition: succeeded() |
| 252 | + |
| 253 | + # Linux x64 download |
| 254 | + |
| 255 | + - task: DownloadPipelineArtifact@2 |
| 256 | + displayName: Download Linux Artifacts |
| 257 | + inputs: |
| 258 | + artifactName: CentOS_7_x64_Release |
| 259 | + targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Linux.x64.Release' |
| 260 | + condition: succeeded() |
| 261 | + |
| 262 | + # Linux MUSL x64 download |
| 263 | + |
| 264 | + - task: DownloadPipelineArtifact@2 |
| 265 | + displayName: Download Linux Musl Artifacts |
| 266 | + inputs: |
| 267 | + artifactName: Alpine3_6_x64_Release |
| 268 | + targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Linux-musl.x64.Release' |
| 269 | + condition: succeeded() |
| 270 | + |
| 271 | + # Linux arm download |
| 272 | + |
| 273 | + - task: DownloadPipelineArtifact@2 |
| 274 | + displayName: Download Linux Arm Artifacts |
| 275 | + inputs: |
| 276 | + artifactName: Linux_cross_arm_Release |
| 277 | + targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Linux.arm.Release' |
| 278 | + condition: succeeded() |
| 279 | + |
| 280 | + # Linux arm64 download |
| 281 | + |
| 282 | + - task: DownloadPipelineArtifact@2 |
| 283 | + displayName: Download Linux Arm64 Artifacts |
| 284 | + inputs: |
| 285 | + artifactName: Linux_cross64_arm64_Release |
| 286 | + targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Linux.arm64.Release' |
| 287 | + condition: succeeded() |
| 288 | + |
| 289 | + # MacOS download |
| 290 | + |
| 291 | + - task: DownloadPipelineArtifact@2 |
| 292 | + displayName: Download MacOS Artifacts |
| 293 | + inputs: |
| 294 | + artifactName: MacOS_x64_Release |
| 295 | + targetPath: '$(Build.SourcesDirectory)/artifacts/bin/OSX.x64.Release' |
| 296 | + condition: succeeded() |
| 297 | + |
| 298 | + # Create nuget packages, sign binaries and publish to blob feed |
| 299 | + |
| 300 | + - script: $(Build.SourcesDirectory)\eng\cipack.cmd |
| 301 | + -configuration Release |
| 302 | + -prepareMachine |
| 303 | + -verbosity normal |
| 304 | + /p:TeamName=$(_TeamName) |
| 305 | + /p:DotNetSignType=$(SignType) |
| 306 | + /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) |
| 307 | + /p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl) |
| 308 | + /p:DotNetPublishToBlobFeed=$(PublishPackages) |
| 309 | + /p:OfficialBuildId=$(BUILD.BUILDNUMBER) |
| 310 | + displayName: Sign / Package |
| 311 | + continueOnError: true |
| 312 | + condition: succeeded() |
| 313 | + |
| 314 | + # Publish symbols |
| 315 | + |
| 316 | + - task: PowerShell@2 |
| 317 | + displayName: Publish Symbols |
| 318 | + inputs: |
| 319 | + filePath: eng\common\sdk-task.ps1 |
| 320 | + arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet -configuration Release -verbosity normal |
| 321 | + /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) |
| 322 | + /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) |
| 323 | + /p:PDBArtifactsDirectory='$(Build.SourcesDirectory)/artifacts/SymStore/**' |
| 324 | + /p:BlobBasePath='$(Build.SourcesDirectory)/artifacts/packages/Release/**' |
| 325 | + continueOnError: true |
| 326 | + condition: and(succeeded(), eq(variables['PublishSymbols'], 'true')) |
| 327 | + # Publish package and log build artifacts |
| 328 | + |
| 329 | + - task: PublishBuildArtifacts@1 |
| 330 | + displayName: Publish Package Artifacts |
| 331 | + inputs: |
| 332 | + publishLocation: Container |
| 333 | + pathtoPublish: '$(Build.SourcesDirectory)/artifacts/packages' |
| 334 | + artifactName: Packages |
| 335 | + continueOnError: true |
| 336 | + condition: always() |
| 337 | + |
| 338 | + - task: PublishBuildArtifacts@1 |
| 339 | + displayName: Publish Logs Artifacts |
| 340 | + inputs: |
| 341 | + publishLocation: Container |
| 342 | + pathtoPublish: '$(Build.SourcesDirectory)/artifacts/log' |
| 343 | + artifactName: Logs_Packaging_Signing |
| 344 | + continueOnError: true |
| 345 | + condition: always() |
0 commit comments