|
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 | +- task: CopyFiles@2 |
| 20 | + inputs: |
| 21 | + sourceFolder: $(Pipeline.Workspace)/vscode-powershell-vsix-* |
| 22 | + targetFolder: $(Pipeline.Workspace)/signed |
45 | 23 |
|
46 | 24 | - template: EsrpScan.yml@ComplianceRepo
|
47 | 25 | parameters:
|
48 |
| - scanPath: $(Build.ArtifactStagingDirectory)/Signed |
49 |
| - pattern: | |
50 |
| - *.vsix |
| 26 | + scanPath: $(Pipeline.Workspace)/signed |
| 27 | + pattern: powershell-*.vsix |
51 | 28 |
|
52 |
| -- publish: $(Build.ArtifactStagingDirectory)/Signed |
53 |
| - artifact: vscode-powershell |
54 |
| - displayName: 'Publish signed (and unsigned) artifacts' |
| 29 | +- checkout: self |
55 | 30 |
|
56 | 31 | - template: script-module-compliance.yml@ComplianceRepo
|
57 | 32 | parameters:
|
58 | 33 | # component-governance
|
59 |
| - sourceScanPath: '$(Build.SourcesDirectory)/vscode-powershell' |
| 34 | + sourceScanPath: $(Build.SourcesDirectory)/vscode-powershell |
60 | 35 | # credscan
|
61 |
| - suppressionsFile: '$(Build.SourcesDirectory)/vscode-powershell/tools/credScan/suppress.json' |
| 36 | + suppressionsFile: $(Build.SourcesDirectory)/vscode-powershell/tools/credScan/suppress.json |
62 | 37 | # TermCheck AKA PoliCheck
|
63 |
| - targetArgument: '$(Build.SourcesDirectory)/vscode-powershell' |
64 |
| - optionsUEPATH: '$(Build.SourcesDirectory)/vscode-powershell/tools/terms/UserExclusions.xml' |
| 38 | + targetArgument: $(Build.SourcesDirectory)/vscode-powershell |
| 39 | + optionsUEPATH: $(Build.SourcesDirectory)/vscode-powershell/tools/terms/UserExclusions.xml |
65 | 40 | optionsRulesDBPath: ''
|
66 |
| - optionsFTPath: '$(Build.SourcesDirectory)/vscode-powershell/tools/terms/FileTypeSet.xml' |
| 41 | + optionsFTPath: $(Build.SourcesDirectory)/vscode-powershell/tools/terms/FileTypeSet.xml |
67 | 42 | # tsa-upload
|
68 |
| - codeBaseName: 'PowerShell_PowerShellEditorServices_20210201' |
| 43 | + codeBaseName: PowerShell_PowerShellEditorServices_20210201 |
69 | 44 | # We don't use any Windows APIs directly, so we don't need API scan
|
70 | 45 | APIScan: false
|
| 46 | + |
| 47 | +- publish: $(Pipeline.Workspace)/signed |
| 48 | + artifact: vscode-powershell |
| 49 | + displayName: Publish signed artifacts |
0 commit comments