File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+ const request = require ( 'request' ) ,
3
+ config = require ( '../config' ) ,
4
+ utils = require ( '../utils' ) ,
5
+ logger = require ( "../logger" ) . syncCliLogger ;
6
+
7
+ let printSpecsStatus = ( bsConfig , buildId ) => {
8
+ new Promise ( ( resolve , reject ) => {
9
+ let backOffFactor = 3 ; // 3 seconds
10
+ let options = {
11
+ url : `${ config . buildUrl } ${ buildId } ` ,
12
+ auth : {
13
+ user : bsConfig . auth . username ,
14
+ password : bsConfig . auth . access_key
15
+ } ,
16
+ headers : {
17
+ 'Content-Type' : 'application/json' ,
18
+ "User-Agent" : utils . getUserAgent ( ) ,
19
+ }
20
+ }
21
+ } ) ;
22
+ }
23
+
24
+ exports . printSpecsStatus = printSpecsStatus ;
Original file line number Diff line number Diff line change @@ -4,13 +4,14 @@ const Config = require("./config"),
4
4
Constants = require ( "./constants" ) ,
5
5
utils = require ( "./utils" ) ,
6
6
request = require ( 'request' ) ,
7
+ syncSpecsLogs = require ( './sync/syncSpecsLogs' ) ,
7
8
specDetails = require ( './sync/failedSpecsDetails' ) ,
8
9
{ table, getBorderCharacters } = require ( 'table' ) ,
9
10
chalk = require ( 'chalk' ) ;
10
11
11
12
exports . pollBuildStatus = ( bsConfig , buildId ) => {
12
13
logBuildDetails ( ) . then ( ( data ) => {
13
- printSpecsStatus ( ) ;
14
+ return syncSpecsLogs . printSpecsStatus ( bsConfig , buildId ) ;
14
15
} ) . then ( ( data ) => {
15
16
printSpecsRunSummary ( ) ;
16
17
} ) . then ( ( data ) => {
You can’t perform that action at this time.
0 commit comments