aspnetcore-tooling/azure-pipelines.yml

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

variables:
Build.Repository.Clean: true
2018-12-05 00:48:23 +03:00
_TeamName: AspNetCore
_DotNetPublishToBlobFeed : false
_PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
2018-12-19 01:42:01 +03:00
_PublishArgs: '/p:PublishToSymbolServer=false /p:PublishToAzure=false'
_TimeoutInMinutes: 120 #increase timeout since BAR publishing might wait a long time
# 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/aspnet/AspNetCore-Tooling/$(Build.SourceBranch)
# These are needed to suppress a warning in the cibuild invocation since AzDO leaves the `$(_SignArgs)` in place and it fails to resolve.
_SignArgs: ''
_OfficialBuildIdArgs: ''
# 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/aspnet/AspNetCore-Tooling/$(Build.SourceBranch)
2018-12-05 00:48:23 +03:00
_SignType: real
_SignArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName)
_OfficialBuildIdArgs: /p:OfficialBuildId=$(Build.BuildNumber)
2018-12-06 09:05:14 +03:00
/p:ManifestBuildBranch=$(Build.SourceBranchName)
/p:ManifestBuildNumber=$(Build.BuildNumber)
/p:VisualStudioDropName=Products/AspNet/AspNetCore-Tooling/$(Build.SourceBranchName)/$(Build.BuildNumber)
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.
trigger:
- master
2018-12-12 03:25:04 +03:00
- release/*
pr:
- "*"
# Three phases for each of the three OSes we want to run on
phases:
- template: /eng/common/templates/phases/base.yml
parameters:
name: Windows
timeoutInMinutes: $(_TimeoutInMinutes)
enableTelemetry: true
# 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'), contains(variables['Build.DefinitionName'], 'official')) }}:
enableMicrobuild: 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
matrix:
debug:
_BuildConfig: Debug
release:
_BuildConfig: Release
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.DefinitionName'], 'official')) }}:
_DotNetPublishToBlobFeed: true
_PublishArgs: /p:PublishToSymbolServer=true
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
2018-12-19 01:42:01 +03:00
/p:PublishToAzure=true
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
/p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl)
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
steps:
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.DefinitionName'], 'official')) }}:
- task: AzureKeyVault@1
inputs:
azureSubscription: 'DotNet-Engineering-Services_KeyVault'
KeyVaultName: EngKeyVault
SecretsFilter: 'dotnetfeed-storage-access-key-1,microsoft-symbol-server-pat,symweb-symbol-server-pat'
- script: eng\common\cibuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
$(_SignArgs)
$(_OfficialBuildIdArgs)
2018-12-02 04:56:38 +03:00
$(_PublishArgs)
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 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')
- 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: macOS
timeoutInMinutes: $(_TimeoutInMinutes)
enableTelemetry: true
queue:
name: Hosted macOS
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)
- template: /eng/common/templates/phases/base.yml
parameters:
name: Linux
timeoutInMinutes: $(_TimeoutInMinutes)
enableTelemetry: true
queue:
name: Hosted Ubuntu 1604
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)