2018-12-02 03:25:55 +03:00
|
|
|
variables:
|
2019-01-16 02:56:11 +03:00
|
|
|
- name: Build.Repository.Clean
|
|
|
|
value: true
|
|
|
|
- name: _TeamName
|
|
|
|
value: AspNetCore
|
2018-12-21 04:21:06 +03:00
|
|
|
|
2018-12-02 03:25:55 +03:00
|
|
|
resources:
|
|
|
|
containers:
|
|
|
|
- container: LinuxContainer
|
|
|
|
image: microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-0cd4667-20170319080304
|
2019-01-09 22:39:02 +03:00
|
|
|
options: --init # This ensures all the stray defunct processes are reaped.
|
2018-12-02 03:25:55 +03:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
- master
|
2018-12-12 03:25:04 +03:00
|
|
|
- release/*
|
2018-12-02 03:25:55 +03:00
|
|
|
|
|
|
|
pr:
|
|
|
|
- "*"
|
|
|
|
|
2019-01-16 02:56:11 +03:00
|
|
|
jobs:
|
2019-02-19 20:17:05 +03:00
|
|
|
# This job checks for code quality
|
|
|
|
- template: /eng/common/templates/jobs/jobs.yml
|
|
|
|
parameters:
|
|
|
|
enablePublishBuildArtifacts: false
|
|
|
|
enablePublishTestResults: false
|
|
|
|
jobs:
|
|
|
|
- job: Code_check
|
|
|
|
displayName: Code check
|
|
|
|
pool:
|
|
|
|
# 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')) }}:
|
2019-02-20 21:44:17 +03:00
|
|
|
name: dotnet-external-vs2019-preview
|
2019-02-19 20:17:05 +03:00
|
|
|
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
2019-02-20 21:44:17 +03:00
|
|
|
name: dotnet-internal-vs2019-preview
|
2019-02-19 20:17:05 +03:00
|
|
|
steps:
|
|
|
|
- powershell: ./restore.cmd -ci; ./eng/scripts/CodeCheck.ps1 -ci
|
|
|
|
displayName: Run eng/scripts/CodeCheck.ps1
|
|
|
|
|
|
|
|
# Three jobs for each of the three OSes we want to run on
|
2019-01-16 02:56:11 +03:00
|
|
|
- template: /eng/common/templates/jobs/jobs.yml
|
2018-12-02 03:25:55 +03:00
|
|
|
parameters:
|
2019-01-16 02:56:11 +03:00
|
|
|
enablePublishBuildArtifacts: true
|
|
|
|
enablePublishTestResults: true
|
2018-12-02 03:25:55 +03:00
|
|
|
enableTelemetry: true
|
2019-01-16 02:56:11 +03:00
|
|
|
helixRepo: aspnet/AspNetCore-Tooling
|
|
|
|
helixType: build.product/
|
2018-12-02 03:25:55 +03:00
|
|
|
# enableMicrobuild can't be read from a user-defined variable (Azure DevOps limitation)
|
2019-01-16 02:56:11 +03:00
|
|
|
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
2018-12-02 03:25:55 +03:00
|
|
|
enableMicrobuild: true
|
2019-01-16 02:56:11 +03:00
|
|
|
enablePublishBuildAssets: true
|
|
|
|
jobs:
|
|
|
|
- job: Windows
|
|
|
|
pool:
|
|
|
|
# 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')) }}:
|
2019-02-20 21:44:17 +03:00
|
|
|
name: dotnet-external-vs2019-preview
|
2019-01-16 02:56:11 +03:00
|
|
|
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
2019-02-20 21:44:17 +03:00
|
|
|
name: dotnet-internal-vs2019-preview
|
2019-01-16 02:56:11 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
debug:
|
|
|
|
_BuildConfig: Debug
|
|
|
|
release:
|
|
|
|
_BuildConfig: Release
|
|
|
|
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
|
|
|
_DotNetPublishToBlobFeed: true
|
|
|
|
_PublishArgs: /p:PublishToSymbolServer=true
|
|
|
|
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
|
|
|
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
|
|
|
/p:PublishToAzure=true
|
|
|
|
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
|
|
|
|
/p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl)
|
|
|
|
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
|
|
|
|
variables:
|
|
|
|
- _DotNetPublishToBlobFeed : false
|
2019-02-23 02:15:24 +03:00
|
|
|
- _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json
|
2019-01-16 02:56:11 +03:00
|
|
|
- _PublishArgs: '/p:PublishToSymbolServer=false /p:PublishToAzure=false'
|
|
|
|
- _BuildArgs: ''
|
|
|
|
- _OfficialBuildIdArgs: ''
|
|
|
|
|
|
|
|
# Variables for internal Official builds
|
|
|
|
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
|
|
|
- _SignType: real
|
|
|
|
- _BuildArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName)
|
|
|
|
/p:OfficialBuildId=$(Build.BuildNumber)
|
|
|
|
/p:ManifestBuildBranch=$(Build.SourceBranchName)
|
|
|
|
/p:ManifestBuildNumber=$(Build.BuildNumber)
|
|
|
|
/p:VisualStudioDropName=Products/AspNet/AspNetCore-Tooling/$(Build.SourceBranchName)/$(Build.BuildNumber)
|
|
|
|
|
|
|
|
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
|
|
|
- group: DotNet-Blob-Feed
|
|
|
|
- group: DotNet-Symbol-Server-Pats
|
|
|
|
steps:
|
|
|
|
- script: eng\common\cibuild.cmd
|
|
|
|
-configuration $(_BuildConfig)
|
|
|
|
-prepareMachine
|
|
|
|
$(_BuildArgs)
|
|
|
|
$(_PublishArgs)
|
|
|
|
name: Build
|
|
|
|
displayName: Build
|
|
|
|
condition: succeeded()
|
2019-02-13 20:40:15 +03:00
|
|
|
# Detect OSS Components in use in the product. Only needs to run on one OS in the matrix.
|
|
|
|
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
|
|
|
displayName: Detect components
|
|
|
|
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
|
2019-01-16 02:56:11 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish VSIX Artifacts
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/VSSetup/$(_BuildConfig)'
|
|
|
|
PublishLocation: Container
|
|
|
|
ArtifactName: VSIX_$(Agent.Os)_$(Agent.JobName)
|
|
|
|
continueOnError: true
|
|
|
|
condition: eq(variables['_BuildConfig'], 'Release')
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish VS for Mac Artifacts
|
2018-12-04 23:48:11 +03:00
|
|
|
inputs:
|
2019-01-16 02:56:11 +03:00
|
|
|
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/MPack/$(_BuildConfig)'
|
|
|
|
PublishLocation: Container
|
|
|
|
ArtifactName: MPack_$(Agent.Os)_$(Agent.JobName)
|
|
|
|
continueOnError: true
|
|
|
|
condition: eq(variables['_BuildConfig'], 'Release')
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish package artifacts
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)
|
|
|
|
PublishLocation: Container
|
|
|
|
ArtifactName: Packages_$(Agent.Os)_$(Agent.JobName)
|
|
|
|
continueOnError: true
|
|
|
|
condition: eq(variables['_BuildConfig'], 'Release')
|
2018-12-02 03:25:55 +03:00
|
|
|
|
2019-01-16 02:56:11 +03:00
|
|
|
- job: macOS
|
|
|
|
pool:
|
|
|
|
name: Hosted macOS
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
debug:
|
|
|
|
_BuildConfig: Debug
|
|
|
|
release:
|
|
|
|
_BuildConfig: Release
|
|
|
|
steps:
|
|
|
|
- script: eng/common/cibuild.sh
|
|
|
|
--configuration $(_BuildConfig)
|
|
|
|
--prepareMachine
|
|
|
|
name: Build
|
|
|
|
displayName: Build
|
|
|
|
condition: succeeded()
|
2018-12-02 03:25:55 +03:00
|
|
|
|
2019-01-16 02:56:11 +03:00
|
|
|
- job: Linux
|
|
|
|
pool:
|
|
|
|
name: Hosted Ubuntu 1604
|
|
|
|
container: LinuxContainer
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
debug:
|
|
|
|
_BuildConfig: Debug
|
|
|
|
release:
|
|
|
|
_BuildConfig: Release
|
|
|
|
steps:
|
|
|
|
- script: eng/common/cibuild.sh
|
|
|
|
--configuration $(_BuildConfig)
|
|
|
|
--prepareMachine
|
|
|
|
name: Build
|
|
|
|
displayName: Build
|
|
|
|
condition: succeeded()
|