File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
script/vsts/platforms/templates Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ parameters :
2
+ # artifacts files or directory
3
+ # props:
4
+ # - path
5
+ # - condition
6
+ - name : artifacts
7
+ type : object
8
+ default : {}
9
+ # the path to store the 7z file
10
+ # the file is overwritten for each artifact
11
+ - name : uploadPath
12
+ type : string
13
+ default : $(Build.ArtifactStagingDirectory)/artifact_zip_upload.7z
14
+
15
+ steps :
16
+ - ${{ each artifact in parameters.artifacts }} :
17
+ - task : ArchiveFiles@2
18
+ inputs :
19
+ rootFolderOrFile : ${{artifact.path}}
20
+ archiveType : 7z
21
+ sevenZipCompression : ultra
22
+ archiveFile : ${{parameters.uploadPath}}
23
+ replaceExistingArchive : true
24
+ displayName : Compress ${{artifact.path}}
25
+ ${{ if artifact.condition }} :
26
+ condition : ${{artifact.condition}}
27
+
28
+ - task : PublishBuildArtifacts@1
29
+ inputs :
30
+ PathtoPublish : ${{parameters.uploadPath}}
31
+ ArtifactName : ${{artifact.path}}
32
+ displayName : Upload ${{artifact.path}}
33
+ ${{ if artifact.condition }} :
34
+ condition : ${{artifact.condition}}
You can’t perform that action at this time.
0 commit comments