|
| 1 | +# This is a simple wrapper for eng/pipeline.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 | +# |
| 7 | + |
| 8 | +variables: |
| 9 | + # clean the local repo on the build agents |
| 10 | + - name: Build.Repository.Clean |
| 11 | + value: true |
| 12 | + - name: _PublishUsingPipelines |
| 13 | + value: true |
| 14 | + - name: _DotNetArtifactsCategory |
| 15 | + value: WINDOWSDESKTOP |
| 16 | + - name: _DotNetValidationArtifactsCategory |
| 17 | + value: WINDOWSDESKTOP |
| 18 | + - name: PostBuildSign |
| 19 | + value: true |
| 20 | + |
| 21 | + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: |
| 22 | + - group: DotNet-Wpf-SDLValidation-Params |
| 23 | + |
| 24 | + |
| 25 | +# This is set in the pipeline directly |
| 26 | +# When set to false, CI tests will not be enabled in builds. |
| 27 | +# |
| 28 | +# _ContinuousIntegrationTestsEnabled: false |
| 29 | + |
| 30 | +# Setting batch to true, triggers one build at a time. |
| 31 | +# if there is a push while a build in progress, it will wait, |
| 32 | +# until the running build finishes, and produce a build with all the changes |
| 33 | +# |
| 34 | +# only trigger ci builds for the master and release branches |
| 35 | +trigger: |
| 36 | + batch: true |
| 37 | + branches: |
| 38 | + include: |
| 39 | + - main |
| 40 | + - release/3.* |
| 41 | + - release/5.* |
| 42 | + - release/6.* |
| 43 | + - internal/release/5.* |
| 44 | + - internal/release/6.* |
| 45 | + - experimental/* |
| 46 | + paths: |
| 47 | + exclude: |
| 48 | + - Documentation/* |
| 49 | + |
| 50 | +pr: |
| 51 | + autoCancel: true |
| 52 | + branches: |
| 53 | + include: |
| 54 | + - main |
| 55 | + - release/3.* |
| 56 | + - internal/release/3.* |
| 57 | + - release/5.* |
| 58 | + - release/6.* |
| 59 | + - experimental/* |
| 60 | + paths: |
| 61 | + exclude: |
| 62 | + - Documentation/* |
| 63 | + |
| 64 | +# Call the pipeline.yml template, which does the real work |
| 65 | +stages: |
| 66 | +- stage: build |
| 67 | + displayName: Build |
| 68 | + jobs: |
| 69 | + - template: /eng/pipeline.yml |
| 70 | + parameters: |
| 71 | + enablePublishUsingPipelines: $(_PublishUsingPipelines) |
| 72 | + ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: |
| 73 | + # agent pool can't be read from a user-defined variable (Azure DevOps limitation) |
| 74 | + pool: |
| 75 | + name: NetCore1ESPool-Svc-Internal |
| 76 | + demands: ImageOverride -equals windows.vs2019.amd64 |
| 77 | + # runAsPublic is used in expressions, which can't read from user-defined variables |
| 78 | + runAsPublic: false |
| 79 | + |
| 80 | +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: |
| 81 | + - template: eng\common\templates\post-build\post-build.yml |
| 82 | + parameters: |
| 83 | + publishingInfraVersion: 3 |
| 84 | + enableSymbolValidation: false |
| 85 | + enableSigningValidation: false |
| 86 | + enableNugetValidation: false |
| 87 | + enableSourceLinkValidation: false |
| 88 | + # This is to enable SDL runs part of Post-Build Validation Stage |
| 89 | + SDLValidationParameters: |
| 90 | + enable: false |
| 91 | + params: ' -SourceToolsList @("policheck","credscan") |
| 92 | + -TsaInstanceURL $(_TsaInstanceURL) |
| 93 | + -TsaProjectName $(_TsaProjectName) |
| 94 | + -TsaNotificationEmail $(_TsaNotificationEmail) |
| 95 | + -TsaCodebaseAdmin $(_TsaCodebaseAdmin) |
| 96 | + -TsaBugAreaPath $(_TsaBugAreaPath) |
| 97 | + -TsaIterationPath $(_TsaIterationPath) |
| 98 | + -TsaRepositoryName "wpf" |
| 99 | + -TsaCodebaseName "wpf" |
| 100 | + -TsaPublish $True' |
0 commit comments