@@ -80,7 +80,7 @@ module.exports = function run(args, rawArgs) {
80
80
// accept the access key from command line or env variable if provided
81
81
utils . setAccessKey ( bsConfig , args ) ;
82
82
83
- let buildReportData = ! isBrowserstackInfra ? null : await getInitialDetails ( bsConfig , args , rawArgs ) ;
83
+ let buildReportData = ( turboScaleSession || ! isBrowserstackInfra ) ? null : await getInitialDetails ( bsConfig , args , rawArgs ) ;
84
84
85
85
// accept the build name from command line if provided
86
86
utils . setBuildName ( bsConfig , args ) ;
@@ -158,11 +158,6 @@ module.exports = function run(args, rawArgs) {
158
158
159
159
if ( gridDetails && Object . keys ( gridDetails ) . length > 0 ) {
160
160
Constants . turboScaleObj . gridDetails = gridDetails ;
161
-
162
- if ( gridDetails . isTrialGrid ) {
163
- logger . info ( 'Will be running the build on Trial Grid. Ensure you are using connect-grid command if using a private website' ) ;
164
- }
165
-
166
161
Constants . turboScaleObj . gridUrl = gridDetails . cypressUrl ;
167
162
Constants . turboScaleObj . uploadUrl = gridDetails . cypressUrl + '/upload' ;
168
163
Constants . turboScaleObj . buildUrl = gridDetails . cypressUrl + '/build' ;
@@ -212,7 +207,7 @@ module.exports = function run(args, rawArgs) {
212
207
213
208
//get the number of spec files
214
209
markBlockStart ( 'getNumberOfSpecFiles' ) ;
215
- let specFiles = utils . getNumberOfSpecFiles ( bsConfig , args , cypressConfigFile ) ;
210
+ let specFiles = utils . getNumberOfSpecFiles ( bsConfig , args , cypressConfigFile , turboScaleSession ) ;
216
211
markBlockEnd ( 'getNumberOfSpecFiles' ) ;
217
212
218
213
bsConfig [ 'run_settings' ] [ 'video_config' ] = utils . getVideoConfig ( cypressConfigFile ) ;
@@ -325,13 +320,13 @@ module.exports = function run(args, rawArgs) {
325
320
logger . debug ( "Completed polling of build status" ) ;
326
321
327
322
// stop the Local instance
328
- await utils . stopLocalBinary ( bsConfig , bs_local , args , rawArgs , buildReportData ) ;
323
+ if ( ! turboScaleSession ) await utils . stopLocalBinary ( bsConfig , bs_local , args , rawArgs , buildReportData ) ;
329
324
330
325
// waiting for 5 secs for upload to complete (as a safety measure)
331
326
await new Promise ( resolve => setTimeout ( resolve , 5000 ) ) ;
332
327
333
328
// download build artifacts
334
- if ( exitCode != Constants . BUILD_FAILED_EXIT_CODE ) {
329
+ if ( exitCode != Constants . BUILD_FAILED_EXIT_CODE && ! turboScaleSession ) {
335
330
if ( utils . nonEmptyArray ( bsConfig . run_settings . downloads ) ) {
336
331
logger . debug ( "Downloading build artifacts" ) ;
337
332
await downloadBuildArtifacts ( bsConfig , data . build_id , args , rawArgs , buildReportData ) ;
@@ -343,7 +338,7 @@ module.exports = function run(args, rawArgs) {
343
338
markBlockEnd ( 'postBuild' ) ;
344
339
utils . handleSyncExit ( exitCode , data . dashboard_url ) ;
345
340
} ) ;
346
- } else {
341
+ } else if ( ! turboScaleSession ) {
347
342
let stacktraceUrl = getStackTraceUrl ( ) ;
348
343
downloadBuildStacktrace ( stacktraceUrl ) . then ( ( message ) => {
349
344
utils . sendUsageReport ( bsConfig , args , message , Constants . messageTypes . SUCCESS , null , buildReportData , rawArgs ) ;
@@ -359,7 +354,7 @@ module.exports = function run(args, rawArgs) {
359
354
} ) ;
360
355
}
361
356
} ) ;
362
- } else if ( utils . nonEmptyArray ( bsConfig . run_settings . downloads ) ) {
357
+ } else if ( utils . nonEmptyArray ( bsConfig . run_settings . downloads && ! turboScaleSession ) ) {
363
358
logger . info ( Constants . userMessages . ASYNC_DOWNLOADS . replace ( '<build-id>' , data . build_id ) ) ;
364
359
}
365
360
0 commit comments