Skip to content

Commit

Permalink
🐳 [#4788] Disable setup_config command in upgrade tests
Browse files Browse the repository at this point in the history
to avoid having to bring up the Open Zaak and Objects/Objecttypes docker compose stacks for the CI tests to simulate upgrading Open Forms
  • Loading branch information
stevenbal committed Nov 15, 2024
1 parent 76d1487 commit a4fde34
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,8 @@ jobs:
needs:
- docker_build_setup
- docker_build

env:
RUN_SETUP_CONFIG: "False" # Disable running the setup_configuration
name: Simulate upgrading instances
runs-on: ubuntu-latest
strategy:
Expand Down
20 changes: 14 additions & 6 deletions bin/setup_configuration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@

set -e

# wait for required services
${SCRIPTPATH}/wait_for_db.sh
if [[ "${RUN_SETUP_CONFIG,,}" =~ ^(true|1|yes)$ ]]; then
# wait for required services
${SCRIPTPATH}/wait_for_db.sh

src/manage.py migrate
src/manage.py setup_configuration \
--yaml-file data/services.yaml \
--yaml-file data/objects_api.yaml
if [[ "${SKIP_SELFTEST,,}" =~ ^(true|1|yes)$ ]]; then
NO_SELFTEST_FLAG="--no-selftest"
else
NO_SELFTEST_FLAG=""
fi

src/manage.py migrate
src/manage.py setup_configuration $NO_SELFTEST_FLAG \
--yaml-file data/services.yaml \
--yaml-file data/objects_api.yaml
fi
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ services:
- ENVIRONMENT_LABEL=docker-compose
- ENVIRONMENT_BACKGROUND_COLOR=#1d63ed
- ENVIRONMENT_FOREGROUND_COLOR=white
# Django-setup-configuration
- RUN_SETUP_CONFIG=${RUN_SETUP_CONFIG:-True}
- SKIP_SELFTEST=${SKIP_SELFTEST:-False}
volumes: &web_volumes
- media:/app/media
- private_media:/app/private_media
Expand Down

0 comments on commit a4fde34

Please sign in to comment.