@@ -3,14 +3,11 @@ parameters:
33 # props:
44 # - path
55 # - condition
6+ # - archiveFileName
7+ # - archiveDir
68 - name : artifacts
79 type : object
810 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
1411
1512steps :
1613 - ${{ each artifact in parameters.artifacts }} :
@@ -19,16 +16,16 @@ steps:
1916 rootFolderOrFile : ${{artifact.path}}
2017 archiveType : 7z
2118 sevenZipCompression : ultra
22- archiveFile : ${{parameters.uploadPath }}
19+ archiveFile : ${{artifact.archiveDir}}/${{artifact.archiveFileName }}
2320 replaceExistingArchive : true
2421 displayName : Compress ${{artifact.path}}
2522 ${{ if artifact.condition }} :
2623 condition : ${{artifact.condition}}
2724
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}}
25+ - template : ./publish.yml
26+ parameters :
27+ artifacts :
28+ - filename : ${{artifact.archiveFileName }}
29+ dir : ${{artifact.archiveDir }}
30+ ${{ if artifact.condition }} :
31+ condition : ${{artifact.condition}}
0 commit comments