fix(deploy): bind development ports to loopback
This commit is contained in:
@@ -12,6 +12,10 @@ const ciMavenSettings = (await readFile(new URL('../deploy/maven/settings-ci.xml
|
||||
.replaceAll('\r\n', '\n')
|
||||
const serviceDockerfile = (await readFile(new URL('../deploy/docker/Dockerfile', import.meta.url), 'utf8'))
|
||||
.replaceAll('\r\n', '\n')
|
||||
const serviceCompose = (await readFile(new URL('../deploy/docker-compose.yml', import.meta.url), 'utf8'))
|
||||
.replaceAll('\r\n', '\n')
|
||||
const overseasCompose = (await readFile(new URL('../deploy/docker-compose.overseas.yml', import.meta.url), 'utf8'))
|
||||
.replaceAll('\r\n', '\n')
|
||||
|
||||
test('service pipeline keeps boolean operators on parseable Groovy continuation lines', () => {
|
||||
assert.doesNotMatch(pipeline, /^\s*(?:&&|\|\|)/m)
|
||||
@@ -77,6 +81,12 @@ test('development and test deployment locks are acquired before target executors
|
||||
assert.ok(lockIndex < nodeIndex, 'deployment lock must be acquired before target node allocation')
|
||||
})
|
||||
|
||||
test('development publishes service ports on loopback without changing test defaults', () => {
|
||||
assert.match(serviceCompose, /\$\{PUBLISHED_BIND_ADDRESS:-0\.0\.0\.0\}:\$\{GATEWAY_PORT:-9000\}:9000/)
|
||||
assert.match(overseasCompose, /\$\{PUBLISHED_BIND_ADDRESS:-0\.0\.0\.0\}:\$\{GATEWAY_OVERSEAS_PORT:-9300\}:9300/)
|
||||
assert.match(directDeployScript, /if \[ "\$DEPLOY_ENV" = "development" \]; then[\s\S]*?PUBLISHED_BIND_ADDRESS=127\.0\.0\.1/)
|
||||
})
|
||||
|
||||
test('parallel image publications isolate registry credentials per Jenkins job', () => {
|
||||
const imageStage = pipeline.slice(
|
||||
pipeline.indexOf("stage('构建并发布单服务镜像')"),
|
||||
|
||||
Reference in New Issue
Block a user