@@ -32,6 +32,12 @@ parameters:
32
32
# Optional: 🌤️ or not the build has assets it wants to publish to BAR
33
33
isAssetlessBuild : false
34
34
35
+ # Optional, publishing version
36
+ publishingVersion : 3
37
+
38
+ # Optional: A minimatch pattern for the asset manifests to publish to BAR
39
+ assetManifestsPattern : ' */manifests/**/*.xml'
40
+
35
41
jobs :
36
42
- job : Asset_Registry_Publish
37
43
@@ -77,13 +83,31 @@ jobs:
77
83
clean : true
78
84
79
85
- ${{ if eq(parameters.isAssetlessBuild, 'false') }} :
80
- - task : DownloadPipelineArtifact@2
81
- displayName : Download Asset Manifests
82
- inputs :
83
- artifactName : AssetManifests
84
- targetPath : ' $(Build.StagingDirectory)/AssetManifests'
85
- condition : ${{ parameters.condition }}
86
- continueOnError : ${{ parameters.continueOnError }}
86
+ - ${{ if eq(parameters.publishingVersion, 3) }} :
87
+ - task : DownloadPipelineArtifact@2
88
+ displayName : Download Asset Manifests
89
+ inputs :
90
+ artifactName : AssetManifests
91
+ targetPath : ' $(Build.StagingDirectory)/AssetManifests'
92
+ condition : ${{ parameters.condition }}
93
+ continueOnError : ${{ parameters.continueOnError }}
94
+ - ${{ if eq(parameters.publishingVersion, 4) }} :
95
+ - task : DownloadPipelineArtifact@2
96
+ displayName : Download V4 asset manifests
97
+ inputs :
98
+ itemPattern : ' */manifests/**/*.xml'
99
+ targetPath : ' $(Build.StagingDirectory)/AllAssetManifests'
100
+ condition : ${{ parameters.condition }}
101
+ continueOnError : ${{ parameters.continueOnError }}
102
+ - task : CopyFiles@2
103
+ displayName : Copy V4 asset manifests to AssetManifests
104
+ inputs :
105
+ SourceFolder : ' $(Build.StagingDirectory)/AllAssetManifests'
106
+ Contents : ${{ parameters.assetManifestsPattern }}
107
+ TargetFolder : ' $(Build.StagingDirectory)/AssetManifests'
108
+ flattenFolders : true
109
+ condition : ${{ parameters.condition }}
110
+ continueOnError : ${{ parameters.continueOnError }}
87
111
88
112
- task : NuGetAuthenticate@1
89
113
@@ -120,6 +144,17 @@ jobs:
120
144
Copy-Item -Path $symbolExclusionfile -Destination "$(Build.StagingDirectory)/ReleaseConfigs"
121
145
}
122
146
147
+ - ${{ if eq(parameters.publishingVersion, 4) }} :
148
+ - template : /eng/common/core-templates/steps/publish-pipeline-artifacts.yml
149
+ parameters :
150
+ is1ESPipeline : ${{ parameters.is1ESPipeline }}
151
+ args :
152
+ targetPath : ' $(Build.ArtifactStagingDirectory)/MergedManifest.xml'
153
+ artifactName : AssetManifests
154
+ displayName : ' Publish Merged Manifest'
155
+ retryCountOnTaskFailure : 10 # for any logs being locked
156
+ sbomEnabled : false # we don't need SBOM for logs
157
+
123
158
- template : /eng/common/core-templates/steps/publish-build-artifacts.yml
124
159
parameters :
125
160
is1ESPipeline : ${{ parameters.is1ESPipeline }}
0 commit comments