Skip to content

Commit 48f3966

Browse files
committed
Zip artifacts before publishing
We apparently have very limited artifact storage on Azure DevOps, and since these artifacts to compress from ~300 MB to ~20 MB, this is a decent workaround. The only cost is that zip files instead of navigable folders will show up in the artifact viewer.
1 parent b227de3 commit 48f3966

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

.vsts-ci/templates/ci-general.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,18 @@ steps:
1313
filePath: tools/azurePipelinesBuild.ps1
1414
pwsh: ${{ parameters.pwsh }}
1515

16-
- publish: module
16+
# NOTE: We zip the artifacts because they're ~20 MB compressed, but ~300 MB raw,
17+
# and we have limited pipeline artifact storage space.
18+
- task: ArchiveFiles@2
19+
displayName: Zip pipeline artifacts
20+
inputs:
21+
rootFolderOrFile: module
22+
includeRootFolder: false
23+
archiveType: zip
24+
archiveFile: PowerShellEditorServices-Build.zip
25+
verbose: true
26+
27+
- publish: PowerShellEditorServices-Build.zip
1728
artifact: PowerShellEditorServices-Build-$(System.JobId)
1829
displayName: Publish unsigned pipeline artifacts
1930
condition: succeededOrFailed()

.vsts-ci/templates/release-general.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@ steps:
22
- download: current
33
displayName: Download unsigned pipeline artifacts
44

5+
- task: ExtractFiles@1
6+
displayName: Extract unsigned artifacts
7+
inputs:
8+
archiveFilePatterns: $(Pipeline.Workspace)/PowerShellEditorServices-Build-*/PowerShellEditorServices-Build.zip
9+
destinationFolder: $(Pipeline.Workspace)/Unsigned
10+
cleanDestinationFolder: true
11+
512
- checkout: ComplianceRepo
613

714
# NOTE: The signing templates explicitly copy everything along as they run, so
815
# the last output path has every signed (and intentionally unsigned) file.
916
- template: EsrpSign.yml@ComplianceRepo
1017
parameters:
11-
buildOutputPath: $(Pipeline.Workspace)/PowerShellEditorServices-Build-*
18+
buildOutputPath: $(Pipeline.Workspace)/Unsigned
1219
signOutputPath: $(Pipeline.Workspace)/FirstPartySigned
1320
alwaysCopy: true
1421
certificateId: CP-230012 # Authenticode certificate
@@ -42,7 +49,7 @@ steps:
4249
**/UnixConsoleEcho.dll
4350
4451
- task: ArchiveFiles@2
45-
displayName: Zip finished assets
52+
displayName: Zip signed artifacts
4653
inputs:
4754
rootFolderOrFile: $(Pipeline.Workspace)/ThirdPartySigned
4855
includeRootFolder: false

0 commit comments

Comments
 (0)