azure-pipelines.yml 3.3 KB
Newer Older
1
# This is a simple wrapper for eng/pipeline.yml to get around the limitation of
S
Steven Kirbach 已提交
2 3 4 5
# 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.
6
#
S
Steven Kirbach 已提交
7

D
dotnet-maestro[bot] 已提交
8
variables:
9 10 11 12 13 14 15 16 17 18 19 20
    # clean the local repo on the build agents
  - name: Build.Repository.Clean
    value: true
  - name: _PublishUsingPipelines
    value: true
  - name: _DotNetArtifactsCategory
    value: WINDOWSDESKTOP
  - name: _DotNetValidationArtifactsCategory
    value: WINDOWSDESKTOP
  
  - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
    - group: DotNet-Wpf-SDLValidation-Params
S
Steven Kirbach 已提交
21

S
Steven Kirbach 已提交
22

23 24 25
# This is set in the pipeline directly 
# When set to false, CI tests will not be enabled in builds. 
#
26
# _ContinuousIntegrationTestsEnabled: false
27

V
Vatsan Madhavan 已提交
28 29 30 31
# Setting batch to true, triggers one build at a time.
# if there is a push while a build in progress, it will wait,
# until the running build finishes, and produce a build with all the changes
#
32
# only trigger ci builds for the master and release branches
S
Steven Kirbach 已提交
33
trigger:
V
Vatsan Madhavan 已提交
34 35 36 37
  batch: true 
  branches:
    include: 
    - master
38
    - release/3.0
39
    - release/3.0-preview9
40
    - release/3.1
V
Vatsan Madhavan 已提交
41 42 43
    # - arcade
  paths:
    exclude:
V
Vatsan Madhavan 已提交
44
    - Documentation/*
V
Vatsan Madhavan 已提交
45 46 47 48 49 50

pr:
  autoCancel: true
  branches:
    include:
    - master
51
    - release/3.0
52
    - release/3.0-preview9 
53
    - release/3.1
54
  paths:
V
Vatsan Madhavan 已提交
55 56
    exclude:
    - Documentation/*
D
dotnet-maestro[bot] 已提交
57

S
Steven Kirbach 已提交
58
# Call the pipeline.yml template, which does the real work
59 60 61 62 63 64 65 66 67 68 69 70 71 72
stages:
- stage: build
  displayName: Build 
  jobs:
  - template: /eng/pipeline.yml
    parameters:
      enablePublishUsingPipelines: $(_PublishUsingPipelines)
      ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
        # agent pool can't be read from a user-defined variable (Azure DevOps limitation)
        pool:
          name: NetCoreInternal-Pool
          queue: buildpool.windows.10.amd64.vs2019.pre
        # runAsPublic is used in expressions, which can't read from user-defined variables
        runAsPublic: false
73

74 75 76 77 78 79 80 81 82 83 84
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
  - template: eng\common\templates\post-build\post-build.yml
    parameters:
      # Symbol validation isn't being very reliable lately. This should be enabled back
      # once this issue is resolved: https://github.com/dotnet/arcade/issues/2871
      enableSymbolValidation: false
      # Sourcelink validation isn't passing for Arcade due to some regressions. This should be
      # enabled back once this issue is resolved: https://github.com/dotnet/arcade/issues/2912
      enableSourceLinkValidation: false
      # This is to enable SDL runs part of Post-Build Validation Stage
      SDLValidationParameters:
85
        enable: true
86 87 88 89 90 91 92 93 94 95
        params: ' -SourceToolsList @("policheck","credscan")
        -TsaInstanceURL $(_TsaInstanceURL)
        -TsaProjectName $(_TsaProjectName)
        -TsaNotificationEmail $(_TsaNotificationEmail)
        -TsaCodebaseAdmin $(_TsaCodebaseAdmin)
        -TsaBugAreaPath $(_TsaBugAreaPath)
        -TsaIterationPath $(_TsaIterationPath)
        -TsaRepositoryName "wpf"
        -TsaCodebaseName "wpf"
        -TsaPublish $True'