summaryrefslogtreecommitdiff
path: root/eng/common/templates/post-build/post-build.yml
blob: 3d7e6776e621938cdf7177bbbada3937da44c3b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
parameters:
  enableSourceLinkValidation: true
  enableSigningValidation: true
  enableSymbolValidation: true
  SDLValidationParameters:
    enable: false
    params: ''

stages:
- stage: validate
  dependsOn: build
  displayName: Validate
  jobs:
  - ${{ if eq(parameters.enableSigningValidation, 'true') }}:
    - job:
      displayName: Signing Validation
      pool:
        vmImage: 'windows-2019'
      steps:
        - task: DownloadBuildArtifacts@0
          displayName: Download Package Artifacts
          inputs:
            buildType: current
            artifactName: PackageArtifacts

        - task: PowerShell@2
          displayName: Validate
          inputs:
            filePath: eng\common\sdk-task.ps1
            arguments: -task SigningValidation -restore -msbuildEngine dotnet
              /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts'
              /p:Configuration=Release

  - ${{ if eq(parameters.enableSourceLinkValidation, 'true') }}:
    - job:
      displayName: SourceLink Validation
      variables:
        - template: common-variables.yml
      pool:
        vmImage: 'windows-2019'
      steps:
        - task: DownloadBuildArtifacts@0
          displayName: Download Blob Artifacts
          inputs:
            buildType: current
            artifactName: BlobArtifacts

        - task: PowerShell@2
          displayName: Validate
          inputs:
            filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1
            arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ 
              -ExtractPath $(Agent.BuildDirectory)/Extract/ 
              -GHRepoName $(Build.Repository.Name) 
              -GHCommit $(Build.SourceVersion)
              -SourcelinkCliVersion $(SourceLinkCLIVersion)

  - ${{ if eq(parameters.SDLValidationParameters.enable, 'true') }}:
    - template: /eng/common/templates/job/execute-sdl.yml
      parameters:
        additionalParameters: ${{ parameters.SDLValidationParameters.params }}

- template: \eng\common\templates\post-build\channels\public-dev-release.yml
  parameters:
    enableSymbolValidation: ${{ parameters.enableSymbolValidation }}

- template: \eng\common\templates\post-build\channels\public-validation-release.yml

- template: \eng\common\templates\post-build\channels\public-release.yml

- template: \eng\common\templates\post-build\channels\internal-servicing.yml