File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export class AtomicServer {
6969
7070 @func ( )
7171 async ci ( @argument ( ) netlifyAuthToken : Secret ) : Promise < string > {
72- await Promise . all ( [
72+ const results = await Promise . allSettled ( [
7373 this . docsPublish ( netlifyAuthToken ) ,
7474 this . typedocPublish ( netlifyAuthToken ) ,
7575 this . endToEnd ( netlifyAuthToken ) ,
@@ -80,6 +80,17 @@ export class AtomicServer {
8080 this . rustFmt ( ) ,
8181 ] ) ;
8282
83+ const failures = results . filter (
84+ ( r ) : r is PromiseRejectedResult => r . status === "rejected" ,
85+ ) ;
86+
87+ if ( failures . length > 0 ) {
88+ const errorMessages = failures . map ( ( f ) => f . reason ) . join ( "\n" ) ;
89+ throw new Error (
90+ `CI pipeline failed with ${ failures . length } errors:\n${ errorMessages } ` ,
91+ ) ;
92+ }
93+
8394 return "CI pipeline completed successfully" ;
8495 }
8596
You can’t perform that action at this time.
0 commit comments