Skip to content

Commit fd91473

Browse files
committed
test
1 parent 892ca7c commit fd91473

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

.gitlab-ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,17 @@ ci-image:
128128
# Tests
129129
########################################################################################################################
130130

131+
dry-run-deploy:
132+
extends:
133+
- .base-configuration
134+
- .test-allowed-branches
135+
interruptible: true
136+
script:
137+
- yarn
138+
- node ./scripts/deploy/deploy-prod-dc.ts v6 minor-dcs --no-check-monitors
139+
- node ./scripts/deploy/deploy-prod-dc.ts v6 private-regions --no-check-monitors
140+
- node ./scripts/deploy/deploy-prod-dc.ts v6 eu1 --no-check-monitors
141+
131142
format:
132143
extends:
133144
- .base-configuration

scripts/deploy/deploy-prod-dc.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,18 @@ import { getAllMinorDcs, getAllPrivateDcs } from '../lib/datacenter.ts'
99
* node deploy-prod-dc.ts vXXX us1,eu1,... true|false
1010
*/
1111
const ONE_MINUTE_IN_SECOND = 60
12-
const GATE_DURATION = 30 * ONE_MINUTE_IN_SECOND
12+
const GATE_DURATION = 1 * ONE_MINUTE_IN_SECOND
1313
const GATE_INTERVAL = ONE_MINUTE_IN_SECOND
1414

1515
if (!process.env.NODE_TEST_CONTEXT) {
1616
runMain(() => main(...process.argv.slice(2)))
1717
}
1818

1919
export 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

Comments
 (0)