azure-pipelines.yml 3.2 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
    # 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
M
Matt Mitchell 已提交
18 19
  - name: PostBuildSign
    value: true
20 21 22
  
  - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
    - group: DotNet-Wpf-SDLValidation-Params
S
Steven Kirbach 已提交
23

S
Steven Kirbach 已提交
24

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

V
Vatsan Madhavan 已提交
30 31 32 33
# 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
#
34
# only trigger ci builds for the master and release branches
S
Steven Kirbach 已提交
35
trigger:
V
Vatsan Madhavan 已提交
36 37 38
  batch: true 
  branches:
    include: 
39
    - main
M
Matt Mitchell 已提交
40 41
    - release/3.*
    - release/5.*
42
    - release/6.*
43
    - internal/release/5.*
44
    - internal/release/6.*
45
    - experimental/*
V
Vatsan Madhavan 已提交
46 47
  paths:
    exclude:
V
Vatsan Madhavan 已提交
48
    - Documentation/*
V
Vatsan Madhavan 已提交
49 50 51 52 53

pr:
  autoCancel: true
  branches:
    include:
54
    - main
M
Matt Mitchell 已提交
55
    - release/3.* 
56
    - internal/release/3.*
M
Matt Mitchell 已提交
57
    - release/5.*
58
    - release/6.*
59
    - experimental/*
60
  paths:
V
Vatsan Madhavan 已提交
61 62
    exclude:
    - Documentation/*
D
dotnet-maestro[bot] 已提交
63

S
Steven Kirbach 已提交
64
# Call the pipeline.yml template, which does the real work
65 66 67 68 69 70 71 72 73 74
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:
J
Jon Fortescue 已提交
75
          name: NetCore1ESPool-Internal
76
          demands: ImageOverride -equals Build.Windows.Amd64.VS2022.Pre
77 78
        # runAsPublic is used in expressions, which can't read from user-defined variables
        runAsPublic: false
79

80 81 82
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
  - template: eng\common\templates\post-build\post-build.yml
    parameters:
M
Matt Mitchell 已提交
83
      publishingInfraVersion: 3
84
      enableSymbolValidation: false
85 86
      enableSigningValidation: false
      enableNugetValidation: false
87 88 89
      enableSourceLinkValidation: false
      # This is to enable SDL runs part of Post-Build Validation Stage
      SDLValidationParameters:
90
        enable: false
91 92 93 94 95 96 97 98 99 100
        params: ' -SourceToolsList @("policheck","credscan")
        -TsaInstanceURL $(_TsaInstanceURL)
        -TsaProjectName $(_TsaProjectName)
        -TsaNotificationEmail $(_TsaNotificationEmail)
        -TsaCodebaseAdmin $(_TsaCodebaseAdmin)
        -TsaBugAreaPath $(_TsaBugAreaPath)
        -TsaIterationPath $(_TsaIterationPath)
        -TsaRepositoryName "wpf"
        -TsaCodebaseName "wpf"
        -TsaPublish $True'