2018-10-17 22:17:40 +00:00
|
|
|
parameters:
|
2019-01-24 19:21:51 +00:00
|
|
|
# Agent OS identifier and used as job name
|
2018-10-17 22:17:40 +00:00
|
|
|
agentOs: ''
|
2019-01-24 19:21:51 +00:00
|
|
|
|
|
|
|
# Agent pool
|
|
|
|
pool: {}
|
|
|
|
|
|
|
|
# Additional variables
|
2018-10-17 22:17:40 +00:00
|
|
|
variables: {}
|
|
|
|
|
2019-01-24 19:21:51 +00:00
|
|
|
# Build strategy - matrix
|
|
|
|
strategy: {}
|
|
|
|
|
|
|
|
# Job timeout
|
|
|
|
timeoutInMinutes: 180
|
|
|
|
|
2018-10-17 22:17:40 +00:00
|
|
|
phases:
|
2019-01-24 19:21:51 +00:00
|
|
|
- template: /eng/common/templates/job/job.yml
|
2018-10-17 22:17:40 +00:00
|
|
|
parameters:
|
|
|
|
name: ${{ parameters.agentOs }}
|
2019-01-24 19:21:51 +00:00
|
|
|
${{ if eq(parameters.agentOs, 'Windows_NT') }}:
|
|
|
|
enableMicrobuild: true
|
|
|
|
enablePublishBuildArtifacts: true
|
|
|
|
enablePublishBuildAssets: true
|
|
|
|
enablePublishTestResults: true
|
2018-10-17 22:17:40 +00:00
|
|
|
enableTelemetry: true
|
2019-01-24 19:21:51 +00:00
|
|
|
helixRepo: dotnet/core-sdk
|
|
|
|
pool: ${{ parameters.pool }}
|
|
|
|
${{ if ne(parameters.strategy, '') }}:
|
|
|
|
strategy: ${{ parameters.strategy }}
|
|
|
|
|
2018-10-17 22:17:40 +00:00
|
|
|
variables:
|
2019-01-24 19:21:51 +00:00
|
|
|
- _TeamName: Roslyn-Project-System
|
|
|
|
- _BuildArgs: ''
|
2019-01-26 01:39:42 +00:00
|
|
|
- _SignType: test
|
2019-01-24 19:21:51 +00:00
|
|
|
|
|
|
|
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
|
|
|
- group: DotNet-Symbol-Server-PATs
|
|
|
|
- group: DotNet-HelixApi-Access
|
|
|
|
- _DotNetPublishToBlobFeed: true
|
2019-01-26 01:39:42 +00:00
|
|
|
- _SignType: real
|
2019-01-24 19:21:51 +00:00
|
|
|
- _BuildArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
|
|
|
|
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
|
|
|
|
/p:DotnetPublishSdkAssetsBlobFeedUrl=$(_PublishBlobFeedUrl)
|
2018-12-21 22:58:11 +00:00
|
|
|
/p:DotNetPublishSdkAssetsBlobFeedKey=$(dotnetcli-storage-key)
|
2018-12-19 20:53:08 +00:00
|
|
|
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
|
|
|
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
2019-01-24 19:21:51 +00:00
|
|
|
/p:PB_PublishType=blob
|
|
|
|
/p:DotnetPublishChecksumsBlobFeedUrl=$(_PublishChecksumsBlobFeedUrl)
|
2018-12-21 22:58:11 +00:00
|
|
|
/p:DotNetPublishChecksumsBlobFeedKey=$(dotnetclichecksums-storage-key)
|
2019-01-24 19:21:51 +00:00
|
|
|
/p:DotNetSignType=real
|
|
|
|
/p:TeamName=$(_TeamName)
|
2018-10-17 22:17:40 +00:00
|
|
|
|
|
|
|
steps:
|
2019-01-24 19:21:51 +00:00
|
|
|
- checkout: self
|
|
|
|
clean: true
|
2018-10-17 22:17:40 +00:00
|
|
|
- ${{ if eq(parameters.agentOs, 'Windows_NT') }}:
|
2019-01-24 19:21:51 +00:00
|
|
|
- script: 'eng\setbuildinfo.bat $(_BuildArchitecture) $(_BuildConfig)'
|
|
|
|
displayName: Set test info (Windows)
|
2018-10-17 22:17:40 +00:00
|
|
|
- script: build.cmd
|
2018-11-28 02:48:13 +00:00
|
|
|
$(TestParameter)
|
2018-12-20 21:52:32 +00:00
|
|
|
-pack -publish -ci
|
2019-01-24 19:21:51 +00:00
|
|
|
-Configuration $(_BuildConfig)
|
|
|
|
-Architecture $(_BuildArchitecture)
|
|
|
|
$(_BuildArgs)
|
2019-01-26 00:22:21 +00:00
|
|
|
$(SignBuildParameters)
|
2019-01-24 19:21:51 +00:00
|
|
|
$(_AdditionalBuildParameters)
|
2018-10-17 22:17:40 +00:00
|
|
|
displayName: Build
|
|
|
|
env:
|
|
|
|
DOTNET_CLI_UI_LANGUAGE: $(_DOTNET_CLI_UI_LANGUAGE)
|
|
|
|
DropSuffix: $(_DropSuffix)
|
|
|
|
|
2019-01-24 19:21:51 +00:00
|
|
|
- ${{ if ne(parameters.agentOs, 'Windows_NT') }}:
|
|
|
|
- script: 'eng/setbuildinfo.sh $(_BuildArchitecture) $(_BuildConfig)'
|
|
|
|
displayName: Set test info (Non-Windows)
|
2018-10-17 22:17:40 +00:00
|
|
|
- ${{ if eq(parameters.agentOs, 'Linux') }}:
|
|
|
|
- script: ./build.sh
|
2018-11-28 02:48:13 +00:00
|
|
|
$(TestParameter)
|
2018-12-20 21:52:32 +00:00
|
|
|
--pack --publish --ci
|
2018-11-08 07:20:01 +00:00
|
|
|
--noprettyprint
|
2019-01-24 19:21:51 +00:00
|
|
|
--configuration $(_BuildConfig)
|
|
|
|
$(_DockerParameter)
|
|
|
|
--architecture $(_BuildArchitecture)
|
|
|
|
$(_LinuxPortable)
|
|
|
|
$(_RuntimeIdentifier)
|
|
|
|
$(_BuildArgs)
|
|
|
|
$(_AdditionalBuildParameters)
|
2018-10-17 22:17:40 +00:00
|
|
|
displayName: Build
|
|
|
|
env:
|
|
|
|
DropSuffix: $(_DropSuffix)
|
|
|
|
|
2018-12-28 21:13:52 +00:00
|
|
|
- ${{ if or(eq(parameters.agentOs, 'Darwin'), eq(parameters.agentOs, 'FreeBSD')) }}:
|
2018-10-17 22:17:40 +00:00
|
|
|
- script: ./build.sh
|
2018-11-28 02:48:13 +00:00
|
|
|
$(TestParameter)
|
2018-12-20 21:52:32 +00:00
|
|
|
--pack --publish --ci
|
2018-11-08 07:20:01 +00:00
|
|
|
--noprettyprint
|
2019-01-24 19:21:51 +00:00
|
|
|
--configuration $(_BuildConfig)
|
|
|
|
$(_BuildArgs)
|
|
|
|
$(_AdditionalBuildParameters)
|
2018-10-17 22:17:40 +00:00
|
|
|
displayName: Build
|
|
|
|
|
2019-01-24 19:21:51 +00:00
|
|
|
- ${{ if and(eq(parameters.enablePublishBuildAssets, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: Gather Asset Manifests
|
|
|
|
inputs:
|
|
|
|
SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest'
|
|
|
|
TargetFolder: '$(Build.StagingDirectory)/AssetManifests'
|
|
|
|
continueOnError: ${{ parameters.continueOnError }}
|
|
|
|
condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'), eq(variables['_PublishBuildAssetManifest'], 'true'))
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Push Asset Manifests
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: '$(Build.StagingDirectory)/AssetManifests'
|
|
|
|
PublishLocation: Container
|
|
|
|
ArtifactName: AssetManifests
|
|
|
|
continueOnError: ${{ parameters.continueOnError }}
|
|
|
|
condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'), eq(variables['_PublishBuildAssetManifest'], 'true'))
|