1+ # This is a simple wrapper for eng/ci.yml to get around the limitation of
2+ # user-defined variables not being available in yaml template expressions.
3+
4+ # Parameters ARE available in template expressions, and parameters can have default values,
5+ # so they can be used to control yaml flow.
6+
17variables :
2- _HelixType : build/product
3- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }} :
4- _HelixSource : pr/dotnet/arcade/$(Build.SourceBranch)
5- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
6- _TeamName : DotNetCore
7- _HelixSource : official/dotnet/arcade/$(Build.SourceBranch)
88
9- resources :
10- containers :
11- - container : LinuxContainer
12- image : microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-0cd4667-20170319080304
9+ # clean the local repo on the build agents
10+ Build.Repository.Clean : true
11+
12+ # Set some variables based on build conditions
13+ # TODO: Remove the Build.DefinitionName check once the github repo goes public
14+ ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.DefinitionName'], 'github')) }} :
15+ _HelixType : build/product
16+ _HelixSource : pr/dotnet/winforms/$(Build.SourceBranch)
17+ _PublishType : none
18+ _SignType : test
19+ _DotNetPublishToBlobFeed : false
20+ # else
21+ # TODO: Remove the Build.DefinitionName check once the github repo goes public
22+ ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), not(contains(variables['Build.DefinitionName'], 'github'))) }} :
23+ _TeamName : DotNetCore
24+ _HelixSource : official/dotnet/winforms/$(Build.SourceBranch)
25+ _PublishType : blob
26+ _SignType : real
27+ _DotNetPublishToBlobFeed : true
1328
14- phases :
15- - template : /eng/build.yml
16- parameters :
17- name : Windows_NT
18- queue :
19- # For public or PR jobs, use the hosted pool. For internal jobs use the internal pool.
20- # Will eventually change this to two BYOC pools.
21- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }} :
22- name : dotnet-external-temp
23- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
24- name : dotnet-internal-temp
25- parallel : 2
26- matrix :
27- Build_Debug :
28- _BuildConfig : Debug
29- _PublishType : none
30- _SignType : test
31- _DotNetPublishToBlobFeed : false
32- Build_Release :
33- _BuildConfig : Release
34- # PRs or external builds are not signed.
35- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }} :
36- _PublishType : none
37- _SignType : test
38- _DotNetPublishToBlobFeed : false
39- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
40- _PublishType : blob
41- _SignType : real
42- _DotNetPublishToBlobFeed : true
29+ # only trigger ci builds for the master branch
30+ trigger :
31+ - master
4332
44- - template : /eng/build.yml
45- parameters :
46- name : Linux
47- queue :
48- container : LinuxContainer
49- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }} :
50- name : dnceng-linux-external-temp
51- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
52- name : dnceng-linux-internal-temp
53- parallel : 2
54- matrix :
55- Build_Debug :
56- _BuildConfig : Debug
57- _PublishType : none
58- _SignType : none
59- _DotNetPublishToBlobFeed : false
60- Build_Release :
61- _BuildConfig : Release
62- _PublishType : none
63- _SignType : none
64- _DotNetPublishToBlobFeed : false
33+ # To be added in the future when VSTS supports this feature
34+ # only trigger pull request builds for the master branch
35+ # pr:
36+ # - master
6537
66- - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
67- - template : /eng/common/templates/phases/publish-build-assets.yml
68- parameters :
69- dependsOn :
70- - Windows_NT
71- - Linux
72- queue :
73- name : Hosted VS2017
38+ # Call the pipeline.yml template, which does the real work
39+ phases :
40+ - template : /eng/pipeline.yml
41+ parameters :
42+ # TODO: Remove the Build.DefinitionName check once the github repo goes public
43+ ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), not(contains(variables['Build.DefinitionName'], 'github'))) }} :
44+ # agent pool can't be read from a user-defined variable (Azure DevOps limitation)
45+ agentPool : dotnet-internal-temp
46+ # runAsPublic is used in expressions, which can't read from user-defined variables
47+ runAsPublic : false
0 commit comments