Skip to content

Commit

Permalink
Add retires while getting build API. (#10714) (#10743)
Browse files Browse the repository at this point in the history
  • Loading branch information
omeshp authored Jun 25, 2019
1 parent cfa6ac6 commit d61a6fb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Tasks/DownloadBuildArtifactsV0/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ async function main(): Promise<void> {
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) {
Expand Down
2 changes: 1 addition & 1 deletion Tasks/DownloadBuildArtifactsV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 154,
"Minor": 155,
"Patch": 0
},
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/DownloadBuildArtifactsV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 154,
"Minor": 155,
"Patch": 0
},
"groups": [
Expand Down

0 comments on commit d61a6fb

Please sign in to comment.