Skip to content

Commit 51cb7ea

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 f43a656 commit 51cb7ea

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

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

+12-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,20 @@ 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
19-
condition: succeededOrFailed()
2030

2131
- task: PublishTestResults@2
2232
displayName: Publish test results

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

+9-2
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)