File tree Expand file tree Collapse file tree 4 files changed +16
-10
lines changed
Tasks/DownloadBuildArtifactsV0
Strings/resources.resjson/en-US Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 4242 "loc.messages.ArtifactNameDirectoryNotFound": "Directory '%s' does not exist. Falling back to parent directory: %s",
4343 "loc.messages.LatestBuildFound": "Latest build found: %s",
4444 "loc.messages.LatestBuildNotFound": "Latest build not found",
45- "loc.messages.LatestBuildFromBranchNotFound": "Latest build from branch %s not found"
45+ "loc.messages.LatestBuildFromBranchNotFound": "Latest build from branch %s not found",
46+ "loc.messages.DownloadingContainerResource": "Downloading items from container resource %s"
4647}
Original file line number Diff line number Diff line change @@ -225,13 +225,16 @@ async function main(): Promise<void> {
225225
226226 if ( artifact . resource . type . toLowerCase ( ) === "container" ) {
227227 let downloader = new engine . ArtifactEngine ( ) ;
228- var containerParts : string [ ] = artifact . resource . data . split ( '/' , 3 ) ;
229- if ( containerParts . length !== 3 ) {
228+
229+ console . log ( tl . loc ( "DownloadingContainerResource" , artifact . resource . data ) ) ;
230+ var containerParts = artifact . resource . data . split ( '/' ) ;
231+
232+ if ( containerParts . length < 3 ) {
230233 throw new Error ( tl . loc ( "FileContainerInvalidArtifactData" ) ) ;
231234 }
232-
233- var containerId : number = parseInt ( containerParts [ 1 ] ) ;
234- var containerPath : string = containerParts [ 2 ] ;
235+
236+ var containerId = parseInt ( containerParts [ 1 ] ) ;
237+ var containerPath = containerParts . slice ( 2 , containerParts . length ) . join ( '/' ) ;
235238
236239 var itemsUrl = endpointUrl + "/_apis/resources/Containers/" + containerId + "?itemPath=" + encodeURIComponent ( containerPath ) + "&isShallow=true&api-version=4.1-preview.4" ;
237240 console . log ( tl . loc ( "DownloadArtifacts" , artifact . name , itemsUrl ) ) ;
Original file line number Diff line number Diff line change 99 "version" : {
1010 "Major" : 0 ,
1111 "Minor" : 136 ,
12- "Patch" : 4
12+ "Patch" : 5
1313 },
1414 "groups" : [
1515 {
228228 "ArtifactNameDirectoryNotFound" : " Directory '%s' does not exist. Falling back to parent directory: %s" ,
229229 "LatestBuildFound" : " Latest build found: %s" ,
230230 "LatestBuildNotFound" :" Latest build not found" ,
231- "LatestBuildFromBranchNotFound" :" Latest build from branch %s not found"
231+ "LatestBuildFromBranchNotFound" :" Latest build from branch %s not found" ,
232+ "DownloadingContainerResource" : " Downloading items from container resource %s"
232233 }
233234}
Original file line number Diff line number Diff line change 99 "version" : {
1010 "Major" : 0 ,
1111 "Minor" : 136 ,
12- "Patch" : 4
12+ "Patch" : 5
1313 },
1414 "groups" : [
1515 {
228228 "ArtifactNameDirectoryNotFound" : " ms-resource:loc.messages.ArtifactNameDirectoryNotFound" ,
229229 "LatestBuildFound" : " ms-resource:loc.messages.LatestBuildFound" ,
230230 "LatestBuildNotFound" : " ms-resource:loc.messages.LatestBuildNotFound" ,
231- "LatestBuildFromBranchNotFound" : " ms-resource:loc.messages.LatestBuildFromBranchNotFound"
231+ "LatestBuildFromBranchNotFound" : " ms-resource:loc.messages.LatestBuildFromBranchNotFound" ,
232+ "DownloadingContainerResource" : " ms-resource:loc.messages.DownloadingContainerResource"
232233 }
233234}
You can’t perform that action at this time.
0 commit comments