diff --git a/Tasks/DownloadBuildArtifactsV0/main.ts b/Tasks/DownloadBuildArtifactsV0/main.ts index 73baeeb26905..cb8004861856 100644 --- a/Tasks/DownloadBuildArtifactsV0/main.ts +++ b/Tasks/DownloadBuildArtifactsV0/main.ts @@ -87,7 +87,10 @@ async function main(): Promise { var retryLimit = parseInt(tl.getVariable("VSTS_HTTP_RETRY")) ? parseInt(tl.getVariable("VSTS_HTTP_RETRY")) : 4; var templatePath: string = path.join(__dirname, 'vsts.handlebars.txt'); - var buildApi: IBuildApi = await webApi.getBuildApi(); + var buildApi: IBuildApi = await executeWithRetries("getBuildApi", () => webApi.getBuildApi(), retryLimit).catch((reason) => { + reject(reason); + return; + }); var artifacts = []; if (isCurrentBuild) { diff --git a/Tasks/DownloadBuildArtifactsV0/task.json b/Tasks/DownloadBuildArtifactsV0/task.json index 04bdc4f44a79..1215445e0870 100644 --- a/Tasks/DownloadBuildArtifactsV0/task.json +++ b/Tasks/DownloadBuildArtifactsV0/task.json @@ -10,7 +10,7 @@ "version": { "Major": 0, "Minor": 153, - "Patch": 2 + "Patch": 3 }, "groups": [ { diff --git a/Tasks/DownloadBuildArtifactsV0/task.loc.json b/Tasks/DownloadBuildArtifactsV0/task.loc.json index 7967b9114994..a303526bd8d9 100644 --- a/Tasks/DownloadBuildArtifactsV0/task.loc.json +++ b/Tasks/DownloadBuildArtifactsV0/task.loc.json @@ -10,7 +10,7 @@ "version": { "Major": 0, "Minor": 153, - "Patch": 2 + "Patch": 3 }, "groups": [ {