|
1 | 1 | parameters:
|
| 2 | +- name: artifactName |
| 3 | + type: string |
| 4 | + |
2 | 5 | - name: continueOnError
|
3 | 6 | type: boolean
|
4 | 7 | default: false
|
5 | 8 |
|
| 9 | +- name: OS |
| 10 | + type: string |
| 11 | + values: |
| 12 | + - Windows_NT |
| 13 | + - Linux |
| 14 | + - Darwin |
| 15 | + |
6 | 16 | steps:
|
7 | 17 | - task: DownloadBuildArtifacts@1
|
8 | 18 | inputs:
|
9 |
| - artifactName: 'PackageArtifacts' |
| 19 | + artifactName: ${{ parameters.artifactName }} |
10 | 20 | downloadPath: $(Build.ArtifactStagingDirectory)
|
11 | 21 | checkDownloadedFiles: true
|
12 |
| - displayName: Download Package Artifacts |
| 22 | + displayName: Download Artifacts |
13 | 23 |
|
14 | 24 | # This is necessary whenever we want to publish/restore to an AzDO private feed
|
15 | 25 | # Since sdk-task.ps1 tries to restore packages we need to do this authentication here
|
16 | 26 | # otherwise it'll complain about accessing a private feed.
|
17 | 27 | - task: NuGetAuthenticate@1
|
18 | 28 | displayName: 'Authenticate to AzDO Feeds'
|
19 | 29 |
|
20 |
| -- task: PowerShell@2 |
21 |
| - inputs: |
22 |
| - filePath: eng\common\sdk-task.ps1 |
23 |
| - arguments: -task SigningValidation -restore -msbuildEngine vs |
24 |
| - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' |
25 |
| - displayName: Validate Signing of Packages |
26 |
| - continueOnError: ${{ parameters.continueOnError }} |
| 30 | +- ${{ if eq(parameters.OS, 'Windows_NT') }}: |
| 31 | + - task: PowerShell@2 |
| 32 | + inputs: |
| 33 | + filePath: eng\common\sdk-task.ps1 |
| 34 | + arguments: -task SigningValidation -restore -msbuildEngine vs |
| 35 | + /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/${{ parameters.artifactName }}' |
| 36 | + displayName: Validate Signing of Packages |
| 37 | + continueOnError: ${{ parameters.continueOnError }} |
| 38 | + |
| 39 | +- ${{ else }}: |
| 40 | + - task: Bash@3 |
| 41 | + inputs: |
| 42 | + filePath: eng/common/sdk-task.sh |
| 43 | + arguments: --task SigningValidation --restore |
| 44 | + /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/${{ parameters.artifactName }}' |
| 45 | + displayName: Validate - ${{ parameters.OS }} |
| 46 | + continueOnError: ${{ parameters.continueOnError }} |
0 commit comments