Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Commit

Permalink
Update pipeline to jobs schema
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSimons committed Jun 9, 2021
1 parent f7e1cb9 commit c1331a2
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 56 deletions.
37 changes: 14 additions & 23 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,19 @@ variables:
_DotNetPublishToBlobFeed: true
_PublishUsingPipelines: true

phases:
jobs:
- template: /eng/build.yml
parameters:
agentOs: Windows_NT
queue:
pool:
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
name: Hosted VS2017
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
name: DotNetCore-Windows
name: NetCoreInternal-Pool
queue: BuildPool.Server.Amd64.VS2017
demands:
- agent.os -equals Windows_NT
parallel: 2
strategy:
matrix:
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
Build_Debug:
Expand All @@ -42,28 +43,19 @@ phases:
_PublishType: blob
_SignType: real

- template: /eng/common/templates/jobs/jobs.yml
- template: /eng/common/templates/job/source-build.yml
parameters:
agentOs: Linux_Source_Build
queue:
name: DotNetCore-Linux
parallel: 2
matrix:
Build_Release:
_BuildConfig: Release
_PublishType: none
_SignType: real
variables:
_PREVIEW_VSTS_DOCKER_IMAGE: microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-0cd4667-20170319080304
enableSourceBuild: true
platform:
name: Managed
container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343

- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- template: /eng/build.yml
parameters:
agentOs: Linux
queue:
name: DotNetCore-Linux
parallel: 2
strategy:
matrix:
Build_Debug:
_BuildConfig: Debug
Expand All @@ -73,15 +65,14 @@ phases:
_BuildConfig: Release
_PublishType: none
_SignType: test
variables:
_PREVIEW_VSTS_DOCKER_IMAGE: microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-0cd4667-20170319080304
_PREVIEW_VSTS_DOCKER_IMAGE: microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-0cd4667-20170319080304

- template: /eng/build.yml
parameters:
agentOs: Darwin
queue:
name: Hosted macOS
parallel: 2
strategy:
matrix:
Build_Debug:
_BuildConfig: Debug
Expand All @@ -93,11 +84,11 @@ phases:
_SignType: test

- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates/phases/publish-build-assets.yml
- template: /eng/common/templates/job/publish-build-assets.yml
parameters:
publishUsingPipelines: true
dependsOn:
- Windows_NT
- Source_Build_Managed
queue:
pool:
name: Hosted VS2017
63 changes: 30 additions & 33 deletions eng/build.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
parameters:
agentOs: ''
queue: {}
variables: {}
pool: {}
strategy: ''
_PREVIEW_VSTS_DOCKER_IMAGE: ''

phases:
- template: /eng/common/templates/phases/base.yml
jobs:
- template: /eng/common/templates/job/job.yml
parameters:
name: ${{ parameters.agentOs }}
enableTelemetry: true
enableMicrobuild: true
publicBuildReasons: PullRequest
queue: ${{ parameters.queue }}
pool: ${{ parameters.pool }}
strategy: ${{ parameters.strategy }}
variables:
${{ insert }}: ${{ parameters.variables }}
_HelixType: build/product
_HelixBuildConfig: $(_BuildConfig)
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
_HelixSource: pr/dotnet/CliCommandLineParser/$(Build.SourceBranch)
_OfficialBuildIdArgs: ''
_PublishArgs: ''
_SignArgs: ''
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
_HelixSource: official/dotnet/CliCommandLineParser/$(Build.SourceBranch)
_OfficialBuildIdArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
_PublishArgs: /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
/p:DotNetPublishBlobFeedUrl=$(PB_PublishBlobFeedUrl)
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
/p:PB_PublishType=$(_PublishType)
_SignArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName)
- _PREVIEW_VSTS_DOCKER_IMAGE: ${{ parameters._PREVIEW_VSTS_DOCKER_IMAGE }}
- _HelixType: build/product
- _HelixBuildConfig: $(_BuildConfig)
- _WindowsAssestManifestName: Windows_NT-AnyCPU.xml
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- _HelixSource: pr/dotnet/CliCommandLineParser/$(Build.SourceBranch)
- _OfficialBuildIdArgs: ''
- _PublishArgs: ''
- _SignArgs: ''
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- _HelixSource: official/dotnet/CliCommandLineParser/$(Build.SourceBranch)
- _OfficialBuildIdArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
- _PublishArgs: /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
/p:DotNetPublishBlobFeedUrl=$(PB_PublishBlobFeedUrl)
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
/p:PB_PublishType=$(_PublishType)
- _SignArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName)

steps:
- checkout: self
clean: true
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- task: AzureKeyVault@1
inputs:
Expand All @@ -49,13 +53,6 @@ phases:
condition: succeeded()

- ${{ if eq(parameters.agentOs, 'Windows_NT') }}:
# workaround for https://github.com/dotnet/arcade/issues/7493
- powershell: echo "##vso[task.setvariable variable=BUILD_REPOSITORY_URI]https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-cliCommandLineParser"
displayName: Fixup BUILD_REPOSITORY_URI
- powershell: echo "##vso[task.setvariable variable=SYSTEM_TEAMFOUNDATIONCOLLECTIONURI]https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-cliCommandLineParser"
displayName: Fixup BUILD_REPOSITORY_URI
- script: echo %BUILD_REPOSITORY_URI%
- script: echo %SYSTEM_TEAMFOUNDATIONCOLLECTIONURI%
- script: eng\CIBuild.cmd
-configuration %BuildConfig%
$(_PublishArgs)
Expand Down

0 comments on commit c1331a2

Please sign in to comment.