|
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 |
|
34 | 7 | - template: EsrpSign.yml@ComplianceRepo |
35 | 8 | 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 |
| 9 | + buildOutputPath: $(Pipeline.Workspace)/vscode-powershell-unsigned-script-* |
| 10 | + signOutputPath: $(Pipeline.Workspace)/signed |
| 11 | + alwaysCopy: true |
| 12 | + certificateId: CP-230012 # Authenticode certificate |
41 | 13 | shouldSign: true # We always want to sign |
42 | 14 | # NOTE: Code AKA *.vsix files are not signed |
43 | | - pattern: | |
44 | | - Install-VSCode.ps1 |
| 15 | + pattern: Install-VSCode.ps1 |
| 16 | + |
| 17 | +# NOTE: Because the scan template doesn't copy (unlike the sign template), we do |
| 18 | +# it ourselves so that we can publish one finished artifact. |
| 19 | +- pwsh: Copy-Item -Path $(Pipeline.Workspace)/vscode-powershell-vsix-*/*.vsix -Destination $(Pipeline.Workspace)/signed -Verbose |
| 20 | + displayName: Copy extension to signed folder |
45 | 21 |
|
46 | 22 | - template: EsrpScan.yml@ComplianceRepo |
47 | 23 | parameters: |
48 | | - scanPath: $(Build.ArtifactStagingDirectory)/Signed |
49 | | - pattern: | |
50 | | - *.vsix |
| 24 | + scanPath: $(Pipeline.Workspace)/signed |
| 25 | + pattern: powershell-*.vsix |
51 | 26 |
|
52 | | -- publish: $(Build.ArtifactStagingDirectory)/Signed |
53 | | - artifact: vscode-powershell |
54 | | - displayName: 'Publish signed (and unsigned) artifacts' |
| 27 | +- checkout: self |
55 | 28 |
|
56 | 29 | - template: script-module-compliance.yml@ComplianceRepo |
57 | 30 | parameters: |
58 | 31 | # component-governance |
59 | | - sourceScanPath: '$(Build.SourcesDirectory)/vscode-powershell' |
| 32 | + sourceScanPath: $(Build.SourcesDirectory)/vscode-powershell |
60 | 33 | # credscan |
61 | | - suppressionsFile: '$(Build.SourcesDirectory)/vscode-powershell/tools/credScan/suppress.json' |
| 34 | + suppressionsFile: $(Build.SourcesDirectory)/vscode-powershell/tools/credScan/suppress.json |
62 | 35 | # TermCheck AKA PoliCheck |
63 | | - targetArgument: '$(Build.SourcesDirectory)/vscode-powershell' |
64 | | - optionsUEPATH: '$(Build.SourcesDirectory)/vscode-powershell/tools/terms/UserExclusions.xml' |
| 36 | + targetArgument: $(Build.SourcesDirectory)/vscode-powershell |
| 37 | + optionsUEPATH: $(Build.SourcesDirectory)/vscode-powershell/tools/terms/UserExclusions.xml |
65 | 38 | optionsRulesDBPath: '' |
66 | | - optionsFTPath: '$(Build.SourcesDirectory)/vscode-powershell/tools/terms/FileTypeSet.xml' |
| 39 | + optionsFTPath: $(Build.SourcesDirectory)/vscode-powershell/tools/terms/FileTypeSet.xml |
67 | 40 | # tsa-upload |
68 | | - codeBaseName: 'PowerShell_PowerShellEditorServices_20210201' |
| 41 | + codeBaseName: PowerShell_PowerShellEditorServices_20210201 |
69 | 42 | # We don't use any Windows APIs directly, so we don't need API scan |
70 | 43 | APIScan: false |
| 44 | + |
| 45 | +- publish: $(Pipeline.Workspace)/signed |
| 46 | + artifact: vscode-powershell |
| 47 | + displayName: Publish signed artifacts |
0 commit comments