fix: keep development gateways reachable
This commit is contained in:
@@ -37,7 +37,10 @@ case "$DEPLOY_ENV" in
|
||||
esac
|
||||
|
||||
if [ "$DEPLOY_ENV" = "development" ]; then
|
||||
PUBLISHED_BIND_ADDRESS=127.0.0.1
|
||||
case "$SERVICE" in
|
||||
gateway|gateway-overseas) PUBLISHED_BIND_ADDRESS=0.0.0.0 ;;
|
||||
*) PUBLISHED_BIND_ADDRESS=127.0.0.1 ;;
|
||||
esac
|
||||
else
|
||||
PUBLISHED_BIND_ADDRESS="${PUBLISHED_BIND_ADDRESS:-0.0.0.0}"
|
||||
fi
|
||||
@@ -405,7 +408,10 @@ export DEPLOY_ENV="$deploy_env"
|
||||
export IMAGE_REPOSITORY="$image_repository"
|
||||
export IMAGE_TAG="$image_tag"
|
||||
if [ "$deploy_env" = "development" ]; then
|
||||
export PUBLISHED_BIND_ADDRESS=127.0.0.1
|
||||
case "$service" in
|
||||
gateway|gateway-overseas) export PUBLISHED_BIND_ADDRESS=0.0.0.0 ;;
|
||||
*) export PUBLISHED_BIND_ADDRESS=127.0.0.1 ;;
|
||||
esac
|
||||
else
|
||||
export PUBLISHED_BIND_ADDRESS="${PUBLISHED_BIND_ADDRESS:-0.0.0.0}"
|
||||
fi
|
||||
|
||||
@@ -81,10 +81,13 @@ 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', () => {
|
||||
test('development exposes gateways for remote acceptance and keeps internal services on loopback', () => {
|
||||
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/)
|
||||
assert.match(directDeployScript, /gateway\|gateway-overseas\) PUBLISHED_BIND_ADDRESS=0\.0\.0\.0/)
|
||||
assert.match(directDeployScript, /\*\) PUBLISHED_BIND_ADDRESS=127\.0\.0\.1/)
|
||||
assert.match(directDeployScript, /gateway\|gateway-overseas\) export PUBLISHED_BIND_ADDRESS=0\.0\.0\.0/)
|
||||
assert.match(directDeployScript, /\*\) export PUBLISHED_BIND_ADDRESS=127\.0\.0\.1/)
|
||||
})
|
||||
|
||||
test('parallel image publications isolate registry credentials per Jenkins job', () => {
|
||||
|
||||
Reference in New Issue
Block a user