Skip to content

Commit 9731eee

Browse files
committed
test
1 parent 892ca7c commit 9731eee

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-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: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ 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) {
@@ -40,13 +40,19 @@ export async function main(...args: string[]): Promise<void> {
4040
}
4141

4242
if (checkMonitors) {
43+
// 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
4344
command`node ./scripts/deploy/check-monitors.ts ${datacenters.join(',')}`.withLogs().run()
4445
}
4546

4647
const uploadPathTypes = toDatacenterUploadPathType(datacenters).join(',')
4748

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()
49+
console.log('[DRY_RUN] node ./scripts/deploy/deploy.ts prod', version, uploadPathTypes)
50+
console.log('[DRY_RUN] node ./scripts/deploy/upload-source-maps.ts', version, uploadPathTypes)
51+
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'}`
52+
.withLogs()
53+
.run()
54+
// command`node ./scripts/deploy/deploy.ts prod ${version} ${uploadPathTypes}`.withLogs().run()
55+
// command`node ./scripts/deploy/upload-source-maps.ts ${version} ${uploadPathTypes}`.withLogs().run()
5056

5157
if (checkMonitors) {
5258
await gateMonitors(datacenters)

0 commit comments

Comments
 (0)