Skip to content

Commit 0630f65

Browse files
committed
use publish template
1 parent acb0379 commit 0630f65

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

script/vsts/platforms/templates/bootstrap.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ steps:
3737
artifacts:
3838
- path: '.'
3939
condition: succeeded()
40+
archiveFileName: bootstrapped_repository_$(AGENT_OS)_$(buildArch).7z
41+
archiveDir: $(Build.ArtifactStagingDirectory)

script/vsts/platforms/templates/zip-upload.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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

1512
steps:
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

Comments
 (0)