From 7f27aa3f5e98be1ce228ec263a4202c82287f612 Mon Sep 17 00:00:00 2001 From: Steven Bal Date: Thu, 16 Jan 2025 11:08:27 +0100 Subject: [PATCH] Test --- .github/workflows/quick-start.yml | 33 ++++++++++------------------ bin/setup_configuration.sh | 7 ++++-- docker/setup_configuration/data.yaml | 11 +++++----- 3 files changed, 23 insertions(+), 28 deletions(-) diff --git a/.github/workflows/quick-start.yml b/.github/workflows/quick-start.yml index 00d21a38..5033a45b 100644 --- a/.github/workflows/quick-start.yml +++ b/.github/workflows/quick-start.yml @@ -1,25 +1,16 @@ name: quick-start -on: [push] +on: + push: + branches: + - master + pull_request: + branches: + - '**' + workflow_dispatch: jobs: - run: - runs-on: ubuntu-latest - steps: - - name: Download docker-compose file - # todo replace branch name with master after the change is merge - run: wget https://raw.githubusercontent.com/maykinmedia/objects-api/deps/oaf-0.8.0/docker-compose.yml - - name: Start docker containers - run: docker compose up -d --no-build - - name: Load fixtures - run: docker compose exec -T web src/manage.py loaddata demodata - - name: Create superuser - run: docker compose exec -T web src/manage.py createsuperuser --username admin --email admin@admin.nl --no-input - - name: Check main page - run: | - curl_status=$(curl -w '%{http_code}' -o /dev/null -s http://localhost:8000/) - if [[ $curl_status != 200 ]]; then - printf "Index page responds with ${curl_status} status.\r\n\r\n" >&2 - curl -i http://localhost:8000 - exit 1 - fi + open-api-workflow-quick-start: + uses: maykinmedia/open-api-workflows/.github/workflows/quick-start.yml@feature/add-quick-start + with: + fixtures: 'demodata' diff --git a/bin/setup_configuration.sh b/bin/setup_configuration.sh index a133e964..8292b984 100755 --- a/bin/setup_configuration.sh +++ b/bin/setup_configuration.sh @@ -4,11 +4,14 @@ # Run this script from the root of the repository set -e - +echo "ENTRATO" if [[ "${RUN_SETUP_CONFIG,,}" =~ ^(true|1|yes)$ ]]; then + echo "ENTRATO 1" # wait for required services /wait_for_db.sh - + src/manage.py migrate src/manage.py setup_configuration --yaml-file setup_configuration/data.yaml + echo "USCITO 1" fi +echo "USCITO " diff --git a/docker/setup_configuration/data.yaml b/docker/setup_configuration/data.yaml index b96ed6ef..dd5b2c4c 100644 --- a/docker/setup_configuration/data.yaml +++ b/docker/setup_configuration/data.yaml @@ -4,7 +4,7 @@ sites_config: - domain: example.com name: Example site - + zgw_consumers_config_enable: true zgw_consumers: services: @@ -58,8 +58,6 @@ tokenauth: application: Application 1 administration: Administration 1 permissions: - - object_type: b427ef84-189d-43aa-9efd-7bb2c459e281 - mode: read_and_write - object_type: b0e8553f-8b1a-4d55-ab90-6d02f1bcf2c2 mode: read_only use_fields: true @@ -67,8 +65,11 @@ tokenauth: '1': - record__data__leeftijd - record__data__kiemjaar - - + # additional permissions can be added like this: + # - object_type: b427ef84-189d-43aa-9efd-7bb2c459e281 + # mode: read_and_write + + oidc_db_config_enable: true oidc_db_config_admin_auth: items: