@@ -9,14 +9,18 @@ import { getAllMinorDcs, getAllPrivateDcs } from '../lib/datacenter.ts'
99 * node deploy-prod-dc.ts vXXX us1,eu1,... true|false
1010 */
1111const ONE_MINUTE_IN_SECOND = 60
12- const GATE_DURATION = 30 * ONE_MINUTE_IN_SECOND
12+ const GATE_DURATION = 1 * ONE_MINUTE_IN_SECOND
1313const GATE_INTERVAL = ONE_MINUTE_IN_SECOND
1414
1515if ( ! process . env . NODE_TEST_CONTEXT ) {
1616 runMain ( ( ) => main ( ...process . argv . slice ( 2 ) ) )
1717}
1818
1919export async function main ( ...args : string [ ] ) : Promise < void > {
20+ command `curl -X GET https://runtime-metadata-service.us1.ddbuild.io/v2/datacenters?selector=datacenter.environment=prod&datacenter.flavor=site --silent -H ${ 'accept: application/json' } `
21+ . withLogs ( )
22+ . run ( )
23+
2024 const {
2125 values : { 'check-monitors' : checkMonitors } ,
2226 positionals,
@@ -40,13 +44,16 @@ export async function main(...args: string[]): Promise<void> {
4044 }
4145
4246 if ( checkMonitors ) {
47+ // TODO: do we need to check monitors before, it won't trigger if it's not already deployed as there can't have errors yet
4348 command `node ./scripts/deploy/check-monitors.ts ${ datacenters . join ( ',' ) } ` . withLogs ( ) . run ( )
4449 }
4550
4651 const uploadPathTypes = toDatacenterUploadPathType ( datacenters ) . join ( ',' )
4752
48- command `node ./scripts/deploy/deploy.ts prod ${ version } ${ uploadPathTypes } ` . withLogs ( ) . run ( )
49- command `node ./scripts/deploy/upload-source-maps.ts ${ version } ${ uploadPathTypes } ` . withLogs ( ) . run ( )
53+ console . log ( '[DRY_RUN] node ./scripts/deploy/deploy.ts prod' , version , uploadPathTypes )
54+ console . log ( '[DRY_RUN] node ./scripts/deploy/upload-source-maps.ts' , version , uploadPathTypes )
55+ // command`node ./scripts/deploy/deploy.ts prod ${version} ${uploadPathTypes}`.withLogs().run()
56+ // command`node ./scripts/deploy/upload-source-maps.ts ${version} ${uploadPathTypes}`.withLogs().run()
5057
5158 if ( checkMonitors ) {
5259 await gateMonitors ( datacenters )
0 commit comments