the two volume-fill steps are block scalars, so their comments are comments
This commit is contained in:
@@ -217,9 +217,18 @@ jobs:
|
||||
- name: Put the upstream config where the host daemon can see it
|
||||
env:
|
||||
COMPOSE_PROJECT_NAME: openwafci-image
|
||||
run:
|
||||
run: |
|
||||
set -eu
|
||||
VOL="${COMPOSE_PROJECT_NAME}_openwaf-upstream-conf"
|
||||
# A run that died mid-scene leaves its bans in the stack's data volume:
|
||||
# `compose down` keeps named volumes, and the runner reuses the same
|
||||
# project name every push. Measured on run 2361, where the 502-upstream
|
||||
# scene opened with the source already banned (expected 502, got 403)
|
||||
# because runs 2350 and 2355 left state behind. The gate's own scenes
|
||||
# rely on data outliving `compose down`, so the clean has to happen
|
||||
# before the stack starts, not in its teardown.
|
||||
docker volume rm "${COMPOSE_PROJECT_NAME}_openwaf-data" \
|
||||
"${COMPOSE_PROJECT_NAME}_openwaf-geoip" >/dev/null 2>&1 || true
|
||||
docker volume create "$VOL" >/dev/null
|
||||
docker run --rm -i -v "$VOL:/conf" busybox:1.37 sh -c 'cat > /conf/default.conf' < deploy/upstream.conf
|
||||
docker run --rm -v "$VOL:/conf" busybox:1.37 sh -c 'wc -c /conf/default.conf'
|
||||
@@ -349,9 +358,18 @@ jobs:
|
||||
- name: Put the upstream config where the host daemon can see it
|
||||
env:
|
||||
COMPOSE_PROJECT_NAME: openwafci-console
|
||||
run:
|
||||
run: |
|
||||
set -eu
|
||||
VOL="${COMPOSE_PROJECT_NAME}_openwaf-upstream-conf"
|
||||
# A run that died mid-scene leaves its bans in the stack's data volume:
|
||||
# `compose down` keeps named volumes, and the runner reuses the same
|
||||
# project name every push. Measured on run 2361, where the 502-upstream
|
||||
# scene opened with the source already banned (expected 502, got 403)
|
||||
# because runs 2350 and 2355 left state behind. The gate's own scenes
|
||||
# rely on data outliving `compose down`, so the clean has to happen
|
||||
# before the stack starts, not in its teardown.
|
||||
docker volume rm "${COMPOSE_PROJECT_NAME}_openwaf-data" \
|
||||
"${COMPOSE_PROJECT_NAME}_openwaf-geoip" >/dev/null 2>&1 || true
|
||||
docker volume create "$VOL" >/dev/null
|
||||
docker run --rm -i -v "$VOL:/conf" busybox:1.37 sh -c 'cat > /conf/default.conf' < deploy/upstream.conf
|
||||
docker run --rm -v "$VOL:/conf" busybox:1.37 sh -c 'wc -c /conf/default.conf'
|
||||
|
||||
Reference in New Issue
Block a user