Skip to content

Commit

Permalink
Add retires while getting build API. (#10714) (#10744)
Browse files Browse the repository at this point in the history
  • Loading branch information
omeshp authored Jun 25, 2019
1 parent 0cf1b4c commit 6afcef2
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 @@ -10,7 +10,7 @@
"version": {
"Major": 0,
"Minor": 154,
"Patch": 0
"Patch": 1
},
"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 @@ -10,7 +10,7 @@
"version": {
"Major": 0,
"Minor": 154,
"Patch": 0
"Patch": 1
},
"groups": [
{
Expand Down

0 comments on commit 6afcef2

Please sign in to comment.