You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

47 lines
2.0 KiB

# This is a simple wrapper for eng/ci.yml to get around the limitation of
# user-defined variables not being available in yaml template expressions.
# Parameters ARE available in template expressions, and parameters can have default values,
# so they can be used to control yaml flow.
variables:
# clean the local repo on the build agents
Build.Repository.Clean: true
# Set some variables based on build conditions
# TODO: Remove the Build.DefinitionName check once the github repo goes public
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest'), contains(variables['Build.DefinitionName'], 'github')) }}:
_HelixType: build/product
_HelixSource: pr/dotnet/winforms/$(Build.SourceBranch)
_PublishType: none
_SignType: test
_DotNetPublishToBlobFeed: false
# else
# TODO: Remove the Build.DefinitionName check once the github repo goes public
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), not(contains(variables['Build.DefinitionName'], 'github'))) }}:
_TeamName: DotNetCore
_HelixSource: official/dotnet/winforms/$(Build.SourceBranch)
_PublishType: blob
_SignType: real
_DotNetPublishToBlobFeed: true
# only trigger ci builds for the master branch
trigger:
- master
# To be added in the future when VSTS supports this feature
# only trigger pull request builds for the master branch
# pr:
# - master
# Call the ci.yml template, which does the real work
phases:
- template: /eng/ci.yml
parameters:
# TODO: Remove the Build.DefinitionName check once the github repo goes public
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), not(contains(variables['Build.DefinitionName'], 'github'))) }}:
# agent pool can't be read from a user-defined variable (Azure DevOps limitation)
agentPool: dotnet-internal-temp
# runAsPublic is used in expressions, which can't read from user-defined variables
runAsPublic: false