|
1 | 1 | steps: |
2 | | -- checkout: self |
3 | | - |
4 | | -- pwsh: | |
5 | | - Get-ChildItem -Path env: |
6 | | - displayName: Capture environment |
7 | | - condition: succeededOrFailed() |
8 | | - |
9 | | -- task: DownloadPipelineArtifact@2 |
10 | | - displayName: 'Download Artifacts from PowerShellEditorServices' |
11 | | - inputs: |
12 | | - source: specific |
13 | | - project: 'PowerShellEditorServices' |
14 | | - pipeline: 36 |
15 | | - preferTriggeringPipeline: true |
16 | | - allowPartiallySucceededBuilds: true |
17 | | - artifact: 'PowerShellEditorServices' |
18 | | - path: '$(Build.SourcesDirectory)/PowerShellEditorServices/module/' |
19 | | - |
20 | | -- pwsh: | |
21 | | - New-Item -ItemType Directory $(Build.ArtifactStagingDirectory)/vscode-powershell |
22 | | - Install-Module InvokeBuild -Force |
23 | | - Invoke-Build Release |
24 | | - workingDirectory: '$(Build.SourcesDirectory)/vscode-powershell' |
25 | | - |
26 | | -- task: PublishTestResults@2 |
27 | | - inputs: |
28 | | - testRunner: JUnit |
29 | | - testResultsFiles: '**/test-results.xml' |
30 | | - condition: succeededOrFailed() |
| 2 | +- download: current |
| 3 | + displayName: Download pipeline artifacts |
31 | 4 |
|
32 | 5 | - checkout: ComplianceRepo |
33 | 6 |
|
| 7 | +# NOTE: The signing templates explicitly copy everything along as they run, so |
| 8 | +# the last output path has every signed (and intentionally unsigned) file. |
34 | 9 | - template: EsrpSign.yml@ComplianceRepo |
35 | 10 | parameters: |
36 | | - buildOutputPath: '$(Build.ArtifactStagingDirectory)/vscode-powershell' |
37 | | - signOutputPath: '$(Build.ArtifactStagingDirectory)/Signed' |
38 | | - alwaysCopy: true # So publishing works |
39 | | - certificateId: 'CP-230012' # Authenticode certificate |
40 | | - useMinimatch: true # This enables the use of globbing |
| 11 | + buildOutputPath: $(Pipeline.Workspace)/vscode-powershell-unsigned-script |
| 12 | + signOutputPath: $(Pipeline.Workspace)/signed |
| 13 | + alwaysCopy: true |
| 14 | + certificateId: CP-230012 # Authenticode certificate |
41 | 15 | shouldSign: true # We always want to sign |
42 | 16 | # NOTE: Code AKA *.vsix files are not signed |
43 | | - pattern: | |
44 | | - Install-VSCode.ps1 |
| 17 | + pattern: Install-VSCode.ps1 |
| 18 | + |
| 19 | +# NOTE: Because the scan template doesn't copy (unlike the sign template), we do |
| 20 | +# it ourselves so that we can publish one finished artifact. |
| 21 | +- task: CopyFiles@2 |
| 22 | + inputs: |
| 23 | + sourceFolder: $(Pipeline.Workspace)/vscode-powershell-vsix |
| 24 | + targetFolder: $(Pipeline.Workspace)/signed |
45 | 25 |
|
46 | 26 | - template: EsrpScan.yml@ComplianceRepo |
47 | 27 | parameters: |
48 | | - scanPath: $(Build.ArtifactStagingDirectory)/Signed |
49 | | - pattern: | |
50 | | - *.vsix |
| 28 | + scanPath: $(Pipeline.Workspace)/signed |
| 29 | + pattern: powershell-*.vsix |
51 | 30 |
|
52 | | -- publish: $(Build.ArtifactStagingDirectory)/Signed |
53 | | - artifact: vscode-powershell |
54 | | - displayName: 'Publish signed (and unsigned) artifacts' |
| 31 | +- checkout: self |
55 | 32 |
|
56 | 33 | - template: script-module-compliance.yml@ComplianceRepo |
57 | 34 | parameters: |
58 | 35 | # component-governance |
59 | | - sourceScanPath: '$(Build.SourcesDirectory)/vscode-powershell' |
| 36 | + sourceScanPath: $(Build.SourcesDirectory)/vscode-powershell |
60 | 37 | # credscan |
61 | | - suppressionsFile: '$(Build.SourcesDirectory)/vscode-powershell/tools/credScan/suppress.json' |
| 38 | + suppressionsFile: $(Build.SourcesDirectory)/vscode-powershell/tools/credScan/suppress.json |
62 | 39 | # TermCheck AKA PoliCheck |
63 | | - targetArgument: '$(Build.SourcesDirectory)/vscode-powershell' |
64 | | - optionsUEPATH: '$(Build.SourcesDirectory)/vscode-powershell/tools/terms/UserExclusions.xml' |
| 40 | + targetArgument: $(Build.SourcesDirectory)/vscode-powershell |
| 41 | + optionsUEPATH: $(Build.SourcesDirectory)/vscode-powershell/tools/terms/UserExclusions.xml |
65 | 42 | optionsRulesDBPath: '' |
66 | | - optionsFTPath: '$(Build.SourcesDirectory)/vscode-powershell/tools/terms/FileTypeSet.xml' |
| 43 | + optionsFTPath: $(Build.SourcesDirectory)/vscode-powershell/tools/terms/FileTypeSet.xml |
67 | 44 | # tsa-upload |
68 | | - codeBaseName: 'PowerShell_PowerShellEditorServices_20210201' |
| 45 | + codeBaseName: PowerShell_PowerShellEditorServices_20210201 |
69 | 46 | # We don't use any Windows APIs directly, so we don't need API scan |
70 | 47 | APIScan: false |
| 48 | + |
| 49 | +- publish: $(Pipeline.Workspace)/signed |
| 50 | + artifact: vscode-powershell |
| 51 | + displayName: Publish signed artifacts |
0 commit comments