razor-tooling/azure-pipelines.yml

173 строки
6.6 KiB
YAML
Исходник Обычный вид История

variables:
- name: Build.Repository.Clean
value: true
- name: _TeamName
value: AspNetCore
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: true
- name: _PublishUsingPipelines
value: true
- name: _DotNetArtifactsCategory
value: ASPNETCORETOOLING
resources:
containers:
- container: LinuxContainer
image: mcr.microsoft.com/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.
trigger:
- master
2018-12-12 03:25:04 +03:00
- release/*
pr:
- "*"
jobs:
# This job checks for code quality
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enablePublishBuildArtifacts: false
enablePublishTestResults: false
enablePublishUsingPipelines: 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')) }}:
name: NetCorePublic-Int-Pool
queue: BuildPool.Windows.10.Amd64.VS2019.BT.Open
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
name: NetCoreInternal-Int-Pool
queue: BuildPool.Windows.10.Amd64.VS2019.BT
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
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enablePublishBuildArtifacts: true
enablePublishTestResults: true
enablePublishUsingPipelines: $(_PublishUsingPipelines)
enableTelemetry: true
helixRepo: aspnet/AspNetCore-Tooling
helixType: build.product/
# enableMicrobuild can't be read from a user-defined variable (Azure DevOps limitation)
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
enableMicrobuild: true
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')) }}:
name: dotnet-external-vs2019-preview
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
name: dotnet-internal-vs2019-preview
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:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
/p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl)
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
variables:
- _DotNetPublishToBlobFeed : false
- _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json
- _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()
- 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
inputs:
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')
- job: macOS
pool:
vmImage: macOS-10.13
strategy:
matrix:
debug:
_BuildConfig: Debug
release:
_BuildConfig: Release
steps:
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
name: Build
displayName: Build
condition: succeeded()
- job: Linux
pool:
container: LinuxContainer
vmImage: ubuntu-16.04
strategy:
matrix:
debug:
_BuildConfig: Debug
release:
_BuildConfig: Release
steps:
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
name: Build
displayName: Build
condition: succeeded()