2018-12-02 03:25:55 +03:00
|
|
|
variables:
|
|
|
|
Build.Repository.Clean: true
|
2018-12-05 00:48:23 +03:00
|
|
|
_TeamName: AspNetCore
|
2018-12-05 04:20:11 +03:00
|
|
|
_DotNetPublishToBlobFeed : false
|
2018-12-04 23:48:11 +03:00
|
|
|
_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'
|
2018-12-21 04:21:06 +03:00
|
|
|
|
|
|
|
_TimeoutInMinutes: 120 #increase timeout since BAR publishing might wait a long time
|
2018-12-02 03:25:55 +03:00
|
|
|
|
|
|
|
# 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
|
2018-12-02 03:25:55 +03:00
|
|
|
_SignArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName)
|
2018-12-06 03:58:50 +03:00
|
|
|
_OfficialBuildIdArgs: /p:OfficialBuildId=$(Build.BuildNumber)
|
2018-12-06 09:05:14 +03:00
|
|
|
/p:ManifestBuildBranch=$(Build.SourceBranchName)
|
2018-12-06 03:58:50 +03:00
|
|
|
/p:ManifestBuildNumber=$(Build.BuildNumber)
|
2019-01-15 21:15:28 +03:00
|
|
|
/p:VisualStudioDropName=Products/AspNet/AspNetCore-Tooling/$(Build.SourceBranchName)/$(Build.BuildNumber)
|
2019-01-15 07:18:52 +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:
|
|
|
|
- "*"
|
|
|
|
|
|
|
|
# Three phases for each of the three OSes we want to run on
|
|
|
|
phases:
|
|
|
|
- template: /eng/common/templates/phases/base.yml
|
|
|
|
parameters:
|
|
|
|
name: Windows
|
2018-12-21 04:21:06 +03:00
|
|
|
timeoutInMinutes: $(_TimeoutInMinutes)
|
2018-12-02 03:25:55 +03:00
|
|
|
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
|
2018-12-15 00:57:44 +03:00
|
|
|
${{ 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
|
2018-12-15 00:57:44 +03:00
|
|
|
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
|
|
|
|
/p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl)
|
|
|
|
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
|
2018-12-02 03:25:55 +03:00
|
|
|
steps:
|
2018-12-04 23:48:11 +03:00
|
|
|
- ${{ 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'
|
2018-12-06 06:15:44 +03:00
|
|
|
- script: eng\common\cibuild.cmd
|
2018-12-02 03:25:55 +03:00
|
|
|
-configuration $(_BuildConfig)
|
|
|
|
-prepareMachine
|
|
|
|
$(_SignArgs)
|
|
|
|
$(_OfficialBuildIdArgs)
|
2018-12-02 04:56:38 +03:00
|
|
|
$(_PublishArgs)
|
2018-12-02 03:25:55 +03:00
|
|
|
name: Build
|
|
|
|
displayName: Build
|
|
|
|
condition: succeeded()
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
displayName: Publish xUnit Test Results
|
|
|
|
condition: always()
|
|
|
|
continueOnError: true
|
|
|
|
inputs:
|
|
|
|
testRunner: xunit
|
2018-12-15 00:57:44 +03:00
|
|
|
testResultsFiles: 'artifacts/TestResults/$(_BuildConfig)/*.xml'
|
2018-12-04 22:40: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
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/MPack/$(_BuildConfig)'
|
|
|
|
PublishLocation: Container
|
|
|
|
ArtifactName: MPack_$(Agent.Os)_$(Agent.JobName)
|
|
|
|
continueOnError: true
|
|
|
|
condition: eq(variables['_BuildConfig'], 'Release')
|
2018-12-19 01:54:00 +03:00
|
|
|
- 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
|
|
|
- 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
|
2018-12-21 04:21:06 +03:00
|
|
|
timeoutInMinutes: $(_TimeoutInMinutes)
|
2018-12-02 03:25:55 +03:00
|
|
|
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
|
2018-12-21 04:21:06 +03:00
|
|
|
timeoutInMinutes: $(_TimeoutInMinutes)
|
2018-12-02 03:25:55 +03:00
|
|
|
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:
|
2018-12-07 01:42:46 +03:00
|
|
|
_HelixBuildConfig: $(_BuildConfig)
|