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 7af79cf commit 205b1fc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ jobs:
docker_build_setup:
name: Set up docker build 'dynamic' env variables
runs-on: ubuntu-latest
env:
RUN_SETUP_CONFIG: False # Disable running the setup_configuration
outputs:
image-name: ${{ steps.set-output-defaults.outputs.image-name }}
version: ${{ steps.vars.outputs.version }}
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 205b1fc

Please sign in to comment.