From a0e7e047ca959166d4b6e62001dbce2ee5624c40 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Sat, 24 Aug 2024 14:53:50 +0100 Subject: [PATCH 01/90] Update .gitmodules Use main branch of ifc-gherkin-rules --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 2f6008c3..16051f0d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "backend/apps/ifc_validation/checks/ifc_gherkin_rules"] path = backend/apps/ifc_validation/checks/ifc_gherkin_rules url = https://github.com/buildingSMART/ifc-gherkin-rules - branch = development + branch = main [submodule "backend/apps/ifc_validation/checks/step_file_parser"] path = backend/apps/ifc_validation/checks/step_file_parser url = https://github.com/IfcOpenShell/step-file-parser From 1654b186053cc7b427600ab54151c585af02a760 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:09:44 +0100 Subject: [PATCH 02/90] Create dispatch.yml --- .github/workflows/dispatch.yml | 102 +++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 .github/workflows/dispatch.yml diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml new file mode 100644 index 00000000..f73eec52 --- /dev/null +++ b/.github/workflows/dispatch.yml @@ -0,0 +1,102 @@ +name: Sync Submodules (CI/CD) + +# Checks, aligns and updates all submodules for development and main branches. +# +# Changes are triggered via repository_dispatch events in the submodule repositories: +# +# - ifc-gherkin-rules +# - ifc-validation-data-model + +on: repository_dispatch + +jobs: + + on_dispatch: + name: On Dispatch + runs-on: ubuntu-latest + + steps: + - name: Log received event + run: ${{ tojson(github.event) }} + shell: cat {0} + + - name: Dispatch from ifc-gherkin-rules (development) + run: echo "ifc-gherkin-rules (development branch)" + if: ${{ github.event.client_payload.repo == 'ifc-gherkin-rules' && github.event.client_payload.branch == 'development' }} + + - name: Dispatch from ifc-validation-data-model (development) + run: echo "ifc-validation-data-model (development branch)" + if: ${{ github.event.client_payload.repo == 'ifc-validation-data-model' && github.event.client_payload.branch == 'development' }} + + - name: Dispatch from ifc-gherkin-rules (main) + run: echo "ifc-gherkin-rules (main branch)" + if: ${{ github.event.client_payload.repo == 'ifc-gherkin-rules' && github.event.client_payload.branch == 'main' }} + + - name: Dispatch from ifc-validation-data-model (main) + run: echo "ifc-validation-data-model (main branch)" + if: ${{ github.event.client_payload.repo == 'ifc-validation-data-model' && github.event.client_payload.branch == 'main' }} + + - name: Checkout sources & submodules + run: | + cd ${{ github.workspace }} + git clone ${{ github.event.repository.clone_url }} . + git fetch && git pull + git checkout -q --track origin/${{ github.event.client_payload.branch }} + git submodule update --init --recursive + git submodule update --remote + + - name: Fetch latest submodule - ifc_gherkin_rules + run: | + cd ${{ github.workspace }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules + git checkout -q --track origin/${{ github.event.client_payload.branch }} + + - name: Fetch latest submodule - step_file_parser + run: | + cd ${{ github.workspace }}/backend/apps/ifc_validation/checks/step_file_parser + git checkout -B master # note: only using master branch for now + + - name: Fetch latest submodule - ifc-validation-models + run: | + cd ${{ github.workspace }}/backend/apps/ifc_validation_models + git checkout -q --track origin/${{ github.event.client_payload.branch }} + + - name: Show submodule status + run: | + cd ${{ github.workspace }} + git submodule foreach --recursive "git remote get-url origin && git rev-parse --abbrev-ref HEAD && git rev-parse --short HEAD && echo $''" + + - name: Show repo status + run: | + cd ${{ github.workspace }} + echo "Validate repository" + git remote get-url origin && git rev-parse --abbrev-ref HEAD && git rev-parse --short HEAD + + - name: Add changes + run: | + cd ${{ github.workspace }} + git add backend/apps/ifc_validation/checks/ifc_gherkin_rules + git add backend/apps/ifc_validation/checks/step_file_parser + git add backend/apps/ifc_validation_models + + - name: Show git status (pre) + run: | + cd ${{ github.workspace }} + git status + + - name: Commit changes (if any) + run: | + cd ${{ github.workspace }} + if [ -n "$(git status --porcelain)" ]; then + git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.event.repository.owner.login }}/${{ github.event.repository.name }} + git config --local user.name 'github-actions[bot]' + git config --local user.email 'github-actions[bot]@users.noreply.github.com' + git commit -am "Update of submodules (bSI-Bot via GH action)" + git push origin ${{ github.event.client_payload.branch }} + else + echo 'No changes to commit' + fi + + - name: Show git status (post) + run: | + cd ${{ github.workspace }} + git status From d7618686256b89debb01d936e4a73d1bbdd488b7 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Wed, 4 Sep 2024 21:58:39 +0100 Subject: [PATCH 03/90] Update dispatch.yml --- .github/workflows/dispatch.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml index f73eec52..450abb33 100644 --- a/.github/workflows/dispatch.yml +++ b/.github/workflows/dispatch.yml @@ -41,24 +41,24 @@ jobs: cd ${{ github.workspace }} git clone ${{ github.event.repository.clone_url }} . git fetch && git pull - git checkout -q --track origin/${{ github.event.client_payload.branch }} + git checkout -q ${{ github.event.client_payload.branch }} git submodule update --init --recursive git submodule update --remote - name: Fetch latest submodule - ifc_gherkin_rules run: | cd ${{ github.workspace }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules - git checkout -q --track origin/${{ github.event.client_payload.branch }} + git checkout -q ${{ github.event.client_payload.branch }} - name: Fetch latest submodule - step_file_parser run: | cd ${{ github.workspace }}/backend/apps/ifc_validation/checks/step_file_parser - git checkout -B master # note: only using master branch for now + git checkout -B master # note: only using master branch for now - name: Fetch latest submodule - ifc-validation-models run: | cd ${{ github.workspace }}/backend/apps/ifc_validation_models - git checkout -q --track origin/${{ github.event.client_payload.branch }} + git checkout -q ${{ github.event.client_payload.branch }} - name: Show submodule status run: | From f6af953c5dff73a567665184829e3dfbf56dd292 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Fri, 6 Sep 2024 11:47:43 +0100 Subject: [PATCH 04/90] Create build_deploy.yml --- .github/workflows/build_deploy.yml | 251 +++++++++++++++++++++++++++++ 1 file changed, 251 insertions(+) create mode 100644 .github/workflows/build_deploy.yml diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml new file mode 100644 index 00000000..2191b16b --- /dev/null +++ b/.github/workflows/build_deploy.yml @@ -0,0 +1,251 @@ +name: Build & Deploy (manually) + +on: + workflow_dispatch: + inputs: + + branch: + description: 'Branch to (re)deploy from' + required: true + default: 'development' + type: choice + options: + - main + - development + + environment: + description: 'Environment to (re)deploy to' + type: environment + default: 'development' + required: true + +jobs: + + build_frontend: + + name: build frontend + runs-on: ubuntu-latest + + steps: + - name: Checkout sources + uses: actions/checkout@v4 + with: + ref: ${{ inputs.branch }} + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Install npm packages + run: | + cd frontend + npm install + + - name: Build & bundle + run: | + cd frontend + unset CI # ignore React warnings + npm run build + + build_backend: + + name: build backend + runs-on: ubuntu-latest + + steps: + - name: Checkout sources + uses: actions/checkout@v4 + with: + ref: ${{ inputs.branch }} + + - name: Fetch submodules + run: | + cd backend + cd apps + git submodule update --init --recursive + git submodule update --remote + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.11 + + - name: Create venv + run: | + cd backend + python3.11 -m venv venv + + - name: Install packages + run: | + cd backend + source venv/bin/activate + pip install --upgrade pip + pip install -r requirements.txt + pip install ifcopenshell # TEMP workaround + + - name: Check Django config + run: | + cd backend + source venv/bin/activate + python3 manage.py check + + - name: Run tests + run: | + cd backend + source venv/bin/activate + python3 manage.py test + + # note: duplicate deploy tasks per environment (else unable to access environment secrets) + deploy_dev: + + if: ${{ inputs.environment == 'development' }} + name: deploy to server (dev) + needs: [build_frontend, build_backend] + runs-on: ubuntu-latest + environment: + name: development + + steps: + - name: Set up SSH key + run: | + mkdir -p ~/.ssh + echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts + + - name: Install sshpass + run: sudo apt-get install sshpass + + - name: Stop Docker containers + run: | + sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' + cd ${{ vars.REPO_CLONE_PATH }} + sudo make stop + ENDSSH + + - name: Fetch sources & submodules + run: | + sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' + cd ${{ vars.REPO_CLONE_PATH }} + git checkout -q ${{ inputs.branch }} && git pull + sudo make fetch-modules + cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ inputs.branch }} && git pull + cd ./ifc_validation_models && git checkout -q ${{ inputs.branch }} && git pull + cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/step_file_parser && git checkout -q master && git pull + cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ inputs.branch }} && git pull + cd ${{ vars.REPO_CLONE_PATH }} + ./check-submodules.sh + ENDSSH + + - name: Show repo & git status + run: | + sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' + cd ${{ vars.REPO_CLONE_PATH }} + echo "*** Validate repository" + git remote get-url origin && git rev-parse --abbrev-ref HEAD && git rev-parse --short HEAD + echo "*** git status" + git status + ENDSSH + + - name: Set VERSION + run: | + sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' + cd ${{ vars.REPO_CLONE_PATH }} + COMMIT_HASH=$(git rev-parse --short HEAD) + VERSION="${{ vars.VERSION }}" + echo "Set VERSION to ${VERSION}" + echo "Commit hash ${COMMIT_HASH}" + echo "${VERSION}" > .VERSION + ENDSSH + + - name: Build Docker images + run: | + sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' + cd ${{ vars.REPO_CLONE_PATH }} + sudo make rebuild + ENDSSH + + - name: Start Docker containers + run: | + sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' + cd ${{ vars.REPO_CLONE_PATH }} + sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d + ENDSSH + + # note: duplicate deploy tasks per environment (else unable to access environment secrets) + deploy_prod: + + if: ${{ inputs.environment == 'production' }} + name: deploy to server (prd) + needs: [build_frontend, build_backend] + runs-on: ubuntu-latest + environment: + name: production + + steps: + - name: Set up SSH key + run: | + mkdir -p ~/.ssh + echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts + + - name: Install sshpass + run: sudo apt-get install sshpass + + - name: Stop Docker containers + run: | + sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' + cd ${{ vars.REPO_CLONE_PATH }} + sudo make stop + ENDSSH + + - name: Fetch sources & submodules + run: | + sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' + cd ${{ vars.REPO_CLONE_PATH }} + git checkout -q ${{ inputs.branch }} && git pull + sudo make fetch-modules + cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ inputs.branch }} && git pull + cd ./ifc_validation_models && git checkout -q ${{ inputs.branch }} && git pull + cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/step_file_parser && git checkout -q master && git pull + cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ inputs.branch }} && git pull + cd ${{ vars.REPO_CLONE_PATH }} + ./check-submodules.sh + ENDSSH + + - name: Show repo & git status + run: | + sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' + cd ${{ vars.REPO_CLONE_PATH }} + echo "*** Validate repository" + git remote get-url origin && git rev-parse --abbrev-ref HEAD && git rev-parse --short HEAD + echo "*** git status" + git status + ENDSSH + + - name: Set VERSION + run: | + sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' + cd ${{ vars.REPO_CLONE_PATH }} + COMMIT_HASH=$(git rev-parse --short HEAD) + VERSION="${{ vars.VERSION }}" + echo "Set VERSION to ${VERSION}" + echo "Commit hash ${COMMIT_HASH}" + echo "${VERSION}" > .VERSION + ENDSSH + + - name: Build Docker images + run: | + sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' + cd ${{ vars.REPO_CLONE_PATH }} + sudo make rebuild + ENDSSH + + - name: Start Docker containers + run: | + sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' + cd ${{ vars.REPO_CLONE_PATH }} + sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d + ENDSSH From ececad9884b752d0492355f3b85b0e71558d99e8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Sep 2024 14:30:25 +0000 Subject: [PATCH 05/90] Update of submodules (bSI-Bot via GH action) --- backend/apps/ifc_validation/checks/ifc_gherkin_rules | 2 +- backend/apps/ifc_validation_models | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/apps/ifc_validation/checks/ifc_gherkin_rules b/backend/apps/ifc_validation/checks/ifc_gherkin_rules index b8442214..e049f834 160000 --- a/backend/apps/ifc_validation/checks/ifc_gherkin_rules +++ b/backend/apps/ifc_validation/checks/ifc_gherkin_rules @@ -1 +1 @@ -Subproject commit b84422143af4e077d8be670d1710c95563d7ea7d +Subproject commit e049f834960fe8e66d3a12fcfecfa2fa464716ea diff --git a/backend/apps/ifc_validation_models b/backend/apps/ifc_validation_models index b29efda2..af954769 160000 --- a/backend/apps/ifc_validation_models +++ b/backend/apps/ifc_validation_models @@ -1 +1 @@ -Subproject commit b29efda228a1b019e21b9761fbedbdba0a40f81e +Subproject commit af954769560f2ef9b813387e65f2eb951aff0803 From bbaef6de1ecdecc450eec9a71c1845a93aa02d76 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Tue, 10 Sep 2024 23:56:51 +0100 Subject: [PATCH 06/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 169 +++++++++-------------------- 1 file changed, 53 insertions(+), 116 deletions(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 2191b16b..321623ab 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -82,8 +82,13 @@ jobs: source venv/bin/activate pip install --upgrade pip pip install -r requirements.txt - pip install ifcopenshell # TEMP workaround - + # use version of ifcopenshell with desired schema parsing + # TODO: revert to pyPI when schema parsing is published in the future + wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.7.9-c18e4ea-linux64.zip" + mkdir -p $(VIRTUAL_ENV)/lib/python3.11/site-packages + unzip -f -d $(VIRTUAL_ENV)/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip + rm /tmp/ifcopenshell_python.zip + - name: Check Django config run: | cd backend @@ -96,38 +101,40 @@ jobs: source venv/bin/activate python3 manage.py test - # note: duplicate deploy tasks per environment (else unable to access environment secrets) - deploy_dev: + deploy: - if: ${{ inputs.environment == 'development' }} - name: deploy to server (dev) + name: deploy to server (${{ inputs.environment }}) needs: [build_frontend, build_backend] runs-on: ubuntu-latest environment: - name: development + name: ${{ inputs.environment }} steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts + - name: Configure SSH + run: | + mkdir -p ~/.ssh/ + echo "$SSH_KEY" > ~/.ssh/ssh_host.key + chmod 600 ~/.ssh/ssh_host.key + cat >>~/.ssh/config < .VERSION - ENDSSH - - - name: Build Docker images + - name: Show submodule status run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH - - - name: Start Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH - - # note: duplicate deploy tasks per environment (else unable to access environment secrets) - deploy_prod: - - if: ${{ inputs.environment == 'production' }} - name: deploy to server (prd) - needs: [build_frontend, build_backend] - runs-on: ubuntu-latest - environment: - name: production - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - - name: Install sshpass - run: sudo apt-get install sshpass - - - name: Stop Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make stop - ENDSSH - - - name: Fetch sources & submodules - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ inputs.branch }} && git pull - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ inputs.branch }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ inputs.branch }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/step_file_parser && git checkout -q master && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ inputs.branch }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh - ENDSSH - - - name: Show repo & git status - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - echo "*** Validate repository" - git remote get-url origin && git rev-parse --abbrev-ref HEAD && git rev-parse --short HEAD - echo "*** git status" - git status - ENDSSH + ssh ssh_host 'cd ${{ vars.REPO_CLONE_PATH }} && \ + ./check-submodules.sh' - name: Set VERSION run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} + ssh ssh_host 'cd ${{ vars.REPO_CLONE_PATH }} COMMIT_HASH=$(git rev-parse --short HEAD) VERSION="${{ vars.VERSION }}" echo "Set VERSION to ${VERSION}" - echo "Commit hash ${COMMIT_HASH}" - echo "${VERSION}" > .VERSION - ENDSSH + echo "Set COMMIT_HASH to ${COMMIT_HASH}" + echo "${VERSION}" > .VERSION' - name: Build Docker images run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH + ssh ssh_host 'cd ${{ vars.REPO_CLONE_PATH }} + sudo make rebuild' - name: Start Docker containers run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH + ssh ssh_host 'cd ${{ vars.REPO_CLONE_PATH }} + sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d' From d06d88cf048d5c83d993c54441188091cd822671 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Tue, 10 Sep 2024 23:57:31 +0100 Subject: [PATCH 07/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 321623ab..23264283 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -87,7 +87,7 @@ jobs: wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.7.9-c18e4ea-linux64.zip" mkdir -p $(VIRTUAL_ENV)/lib/python3.11/site-packages unzip -f -d $(VIRTUAL_ENV)/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - rm /tmp/ifcopenshell_python.zip + rm /tmp/ifcopenshell_python.zip - name: Check Django config run: | From 87e87d71576d4a7f0acc1d8f018e201d6df7c5d4 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Wed, 11 Sep 2024 00:01:54 +0100 Subject: [PATCH 08/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 23264283..94793d4f 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -82,12 +82,16 @@ jobs: source venv/bin/activate pip install --upgrade pip pip install -r requirements.txt + + - name: Install ifcopenshell package (temp) + run: | + cd backend + source venv/bin/activate # use version of ifcopenshell with desired schema parsing # TODO: revert to pyPI when schema parsing is published in the future wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.7.9-c18e4ea-linux64.zip" - mkdir -p $(VIRTUAL_ENV)/lib/python3.11/site-packages - unzip -f -d $(VIRTUAL_ENV)/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - rm /tmp/ifcopenshell_python.zip + mkdir -p /opt/venv/lib/python3.11/site-packages + unzip -d /opt/venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - name: Check Django config run: | From eef795c73dd6355598ad36a6d2d6c73a01a78e19 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Wed, 11 Sep 2024 00:06:52 +0100 Subject: [PATCH 09/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 94793d4f..b34e9da5 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -90,8 +90,8 @@ jobs: # use version of ifcopenshell with desired schema parsing # TODO: revert to pyPI when schema parsing is published in the future wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.7.9-c18e4ea-linux64.zip" - mkdir -p /opt/venv/lib/python3.11/site-packages - unzip -d /opt/venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip + mkdir -p venv/lib/python3.11/site-packages + unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - name: Check Django config run: | From 1642c8e1eaf731e3bffe963cbdf17c90a1a1f9be Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Wed, 11 Sep 2024 00:16:54 +0100 Subject: [PATCH 10/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index b34e9da5..e53f82b3 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -140,13 +140,7 @@ jobs: run: | ssh ssh_host 'cd ${{ vars.REPO_CLONE_PATH }} git checkout -q ${{ inputs.branch }} && git pull - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ inputs.branch }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ inputs.branch }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/step_file_parser && git checkout -q master && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ inputs.branch }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh' + sudo make fetch-modules' - name: Check local changes run: | @@ -159,6 +153,16 @@ jobs: exit -1 fi' + - name: Checkout correct branches + run: | + ssh ssh_host 'cd ${{ vars.REPO_CLONE_PATH }} + cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ inputs.branch }} && git pull + cd ./ifc_validation_models && git checkout -q ${{ inputs.branch }} && git pull + cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/step_file_parser && git checkout -q master && git pull + cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ inputs.branch }} && git pull + cd ${{ vars.REPO_CLONE_PATH }} + ./check-submodules.sh' + - name: Show repo & git status run: | ssh ssh_host 'cd ${{ vars.REPO_CLONE_PATH }} From cb3736ddabda069a01f42d0b96aeea6454ba9ff6 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Wed, 11 Sep 2024 21:31:20 +0100 Subject: [PATCH 11/90] Update build_deploy.yml added 'release/0.6.6' branch --- .github/workflows/build_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index e53f82b3..531ac6e6 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -12,6 +12,7 @@ on: options: - main - development + - release/0.6.6 environment: description: 'Environment to (re)deploy to' From 0c588b80982f839806682317173c447216c39cfe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 11 Sep 2024 21:42:20 +0000 Subject: [PATCH 12/90] Update of submodules (bSI-Bot via GH action) --- backend/apps/ifc_validation/checks/ifc_gherkin_rules | 2 +- backend/apps/ifc_validation_models | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/apps/ifc_validation/checks/ifc_gherkin_rules b/backend/apps/ifc_validation/checks/ifc_gherkin_rules index e049f834..54477086 160000 --- a/backend/apps/ifc_validation/checks/ifc_gherkin_rules +++ b/backend/apps/ifc_validation/checks/ifc_gherkin_rules @@ -1 +1 @@ -Subproject commit e049f834960fe8e66d3a12fcfecfa2fa464716ea +Subproject commit 544770867e4393f99fe53fbcc6180ee150a7fda7 diff --git a/backend/apps/ifc_validation_models b/backend/apps/ifc_validation_models index af954769..6dc5e001 160000 --- a/backend/apps/ifc_validation_models +++ b/backend/apps/ifc_validation_models @@ -1 +1 @@ -Subproject commit af954769560f2ef9b813387e65f2eb951aff0803 +Subproject commit 6dc5e001bfd5dd9a92abf23e5ba2bf186067e4e3 From a11022a0a81d108da8b3619eb0556bb45190b1d2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 12 Sep 2024 18:08:09 +0000 Subject: [PATCH 13/90] Update of submodules (bSI-Bot via GH action) --- backend/apps/ifc_validation/checks/ifc_gherkin_rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/apps/ifc_validation/checks/ifc_gherkin_rules b/backend/apps/ifc_validation/checks/ifc_gherkin_rules index 54477086..31df6539 160000 --- a/backend/apps/ifc_validation/checks/ifc_gherkin_rules +++ b/backend/apps/ifc_validation/checks/ifc_gherkin_rules @@ -1 +1 @@ -Subproject commit 544770867e4393f99fe53fbcc6180ee150a7fda7 +Subproject commit 31df6539adce05ed9a5b4966ac3ee804b2895791 From 0c9190576836958a1295f2c3845228f0d1e716fc Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Wed, 25 Sep 2024 21:23:23 +0100 Subject: [PATCH 14/90] Restore dispatch.yml --- .github/workflows/dispatch.yml | 102 +++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 .github/workflows/dispatch.yml diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml new file mode 100644 index 00000000..450abb33 --- /dev/null +++ b/.github/workflows/dispatch.yml @@ -0,0 +1,102 @@ +name: Sync Submodules (CI/CD) + +# Checks, aligns and updates all submodules for development and main branches. +# +# Changes are triggered via repository_dispatch events in the submodule repositories: +# +# - ifc-gherkin-rules +# - ifc-validation-data-model + +on: repository_dispatch + +jobs: + + on_dispatch: + name: On Dispatch + runs-on: ubuntu-latest + + steps: + - name: Log received event + run: ${{ tojson(github.event) }} + shell: cat {0} + + - name: Dispatch from ifc-gherkin-rules (development) + run: echo "ifc-gherkin-rules (development branch)" + if: ${{ github.event.client_payload.repo == 'ifc-gherkin-rules' && github.event.client_payload.branch == 'development' }} + + - name: Dispatch from ifc-validation-data-model (development) + run: echo "ifc-validation-data-model (development branch)" + if: ${{ github.event.client_payload.repo == 'ifc-validation-data-model' && github.event.client_payload.branch == 'development' }} + + - name: Dispatch from ifc-gherkin-rules (main) + run: echo "ifc-gherkin-rules (main branch)" + if: ${{ github.event.client_payload.repo == 'ifc-gherkin-rules' && github.event.client_payload.branch == 'main' }} + + - name: Dispatch from ifc-validation-data-model (main) + run: echo "ifc-validation-data-model (main branch)" + if: ${{ github.event.client_payload.repo == 'ifc-validation-data-model' && github.event.client_payload.branch == 'main' }} + + - name: Checkout sources & submodules + run: | + cd ${{ github.workspace }} + git clone ${{ github.event.repository.clone_url }} . + git fetch && git pull + git checkout -q ${{ github.event.client_payload.branch }} + git submodule update --init --recursive + git submodule update --remote + + - name: Fetch latest submodule - ifc_gherkin_rules + run: | + cd ${{ github.workspace }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules + git checkout -q ${{ github.event.client_payload.branch }} + + - name: Fetch latest submodule - step_file_parser + run: | + cd ${{ github.workspace }}/backend/apps/ifc_validation/checks/step_file_parser + git checkout -B master # note: only using master branch for now + + - name: Fetch latest submodule - ifc-validation-models + run: | + cd ${{ github.workspace }}/backend/apps/ifc_validation_models + git checkout -q ${{ github.event.client_payload.branch }} + + - name: Show submodule status + run: | + cd ${{ github.workspace }} + git submodule foreach --recursive "git remote get-url origin && git rev-parse --abbrev-ref HEAD && git rev-parse --short HEAD && echo $''" + + - name: Show repo status + run: | + cd ${{ github.workspace }} + echo "Validate repository" + git remote get-url origin && git rev-parse --abbrev-ref HEAD && git rev-parse --short HEAD + + - name: Add changes + run: | + cd ${{ github.workspace }} + git add backend/apps/ifc_validation/checks/ifc_gherkin_rules + git add backend/apps/ifc_validation/checks/step_file_parser + git add backend/apps/ifc_validation_models + + - name: Show git status (pre) + run: | + cd ${{ github.workspace }} + git status + + - name: Commit changes (if any) + run: | + cd ${{ github.workspace }} + if [ -n "$(git status --porcelain)" ]; then + git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.event.repository.owner.login }}/${{ github.event.repository.name }} + git config --local user.name 'github-actions[bot]' + git config --local user.email 'github-actions[bot]@users.noreply.github.com' + git commit -am "Update of submodules (bSI-Bot via GH action)" + git push origin ${{ github.event.client_payload.branch }} + else + echo 'No changes to commit' + fi + + - name: Show git status (post) + run: | + cd ${{ github.workspace }} + git status From afcac00eade0a86eace1055a047e227ec7faa31f Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Thu, 17 Oct 2024 18:11:30 +0100 Subject: [PATCH 15/90] Delete .github/workflows/ci_cd.yml --- .github/workflows/ci_cd.yml | 160 ------------------------------------ 1 file changed, 160 deletions(-) delete mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml deleted file mode 100644 index 7a3fad07..00000000 --- a/.github/workflows/ci_cd.yml +++ /dev/null @@ -1,160 +0,0 @@ -name: Build & Deploy (CI/CD - DEV) - -concurrency: - group: development - cancel-in-progress: true - -on: - push: - branches: - - development - paths-ignore: - - 'README.md' - - '.github/**' - pull_request: - branches: - - development - workflow_dispatch: - -jobs: - - build_frontend: - - name: build frontend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install npm packages - run: | - cd frontend - npm install - - - name: Build & bundle - run: | - cd frontend - unset CI # ignore React warnings - npm run build - - build_backend: - - name: build backend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Fetch submodules - run: | - cd backend - cd apps - git submodule update --init --recursive - git submodule update --remote - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Create venv - run: | - cd backend - python3.11 -m venv venv - - - name: Install packages - run: | - cd backend - source venv/bin/activate - pip install --upgrade pip - pip install -r requirements.txt - pip install ifcopenshell # TEMP workaround - - - name: Check Django config - run: | - cd backend - source venv/bin/activate - python3 manage.py check - - - name: Run tests - run: | - cd backend - source venv/bin/activate - python3 manage.py test - - deploy: - - name: deploy to server - needs: [build_frontend, build_backend] - if: github.event_name == 'push' - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - - name: Install sshpass - run: sudo apt-get install sshpass - - - name: Stop Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make stop - ENDSSH - - - name: Fetch sources & submodules - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ vars.BRANCH_NAME }} && git pull - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/step_file_parser && git checkout -q master && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh - ENDSSH - - - name: Set VERSION - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - COMMIT_HASH=$(git rev-parse --short HEAD) - VERSION="${{ vars.VERSION }}" - echo "Set VERSION to ${VERSION}" - echo "Commit hash ${COMMIT_HASH}" - echo "${VERSION}" > .VERSION - ENDSSH - - - name: Build Docker images - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH - - - name: Start Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH From d7bbca7e47eb5783e26bd294363c7b1705d44089 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Thu, 17 Oct 2024 18:12:05 +0100 Subject: [PATCH 16/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 531ac6e6..dfe236f0 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -13,6 +13,7 @@ on: - main - development - release/0.6.6 + - release/0.6.7 environment: description: 'Environment to (re)deploy to' From 8a3a07b8414bcb757c0475eed356130b68d0b2b9 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Thu, 17 Oct 2024 18:14:23 +0100 Subject: [PATCH 17/90] Update .gitmodules --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 4706ccfb..763bc8d4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "backend/apps/ifc_validation/checks/ifc_gherkin_rules"] path = backend/apps/ifc_validation/checks/ifc_gherkin_rules url = https://github.com/buildingSMART/ifc-gherkin-rules - branch = development + branch = release/0.6.7 [submodule "backend/apps/ifc_validation/checks/step_file_parser"] path = backend/apps/ifc_validation/checks/step_file_parser url = https://github.com/IfcOpenShell/step-file-parser @@ -9,4 +9,4 @@ [submodule "backend/apps/ifc_validation_models"] path = backend/apps/ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model - branch = development + branch = release/0.6.7 From ae90dcca0e80ee06d0a8b21cf18636bcdf8ed808 Mon Sep 17 00:00:00 2001 From: bSI-Bot Date: Thu, 17 Oct 2024 18:19:15 +0100 Subject: [PATCH 18/90] prepare for release/0.6.7 --- backend/apps/ifc_validation/checks/ifc_gherkin_rules | 2 +- backend/apps/ifc_validation_models | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/apps/ifc_validation/checks/ifc_gherkin_rules b/backend/apps/ifc_validation/checks/ifc_gherkin_rules index c1e2bc51..4581f26a 160000 --- a/backend/apps/ifc_validation/checks/ifc_gherkin_rules +++ b/backend/apps/ifc_validation/checks/ifc_gherkin_rules @@ -1 +1 @@ -Subproject commit c1e2bc51a899c5912ba13dfc88bde88b46aadc65 +Subproject commit 4581f26ac16b39f2a5cc798746e3268ae690ef36 diff --git a/backend/apps/ifc_validation_models b/backend/apps/ifc_validation_models index d3cc8fa3..94fac81c 160000 --- a/backend/apps/ifc_validation_models +++ b/backend/apps/ifc_validation_models @@ -1 +1 @@ -Subproject commit d3cc8fa305ef568d6cc1a716337306a3b0b9f90b +Subproject commit 94fac81ca0afda58cb072c749eeaa9c8ee5af52d From 661498ee4c5ef3450ff1d7504cb0a1ab90fe91af Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 22 Oct 2024 23:31:43 +0000 Subject: [PATCH 19/90] Update of submodules (bSI-Bot via GH action) --- backend/apps/ifc_validation/checks/ifc_gherkin_rules | 2 +- backend/apps/ifc_validation_models | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/apps/ifc_validation/checks/ifc_gherkin_rules b/backend/apps/ifc_validation/checks/ifc_gherkin_rules index 31df6539..adddc691 160000 --- a/backend/apps/ifc_validation/checks/ifc_gherkin_rules +++ b/backend/apps/ifc_validation/checks/ifc_gherkin_rules @@ -1 +1 @@ -Subproject commit 31df6539adce05ed9a5b4966ac3ee804b2895791 +Subproject commit adddc691816b99120d0aeefd46c6f31f8b7ee523 diff --git a/backend/apps/ifc_validation_models b/backend/apps/ifc_validation_models index 6dc5e001..f32164ab 160000 --- a/backend/apps/ifc_validation_models +++ b/backend/apps/ifc_validation_models @@ -1 +1 @@ -Subproject commit 6dc5e001bfd5dd9a92abf23e5ba2bf186067e4e3 +Subproject commit f32164ab762fc695690d380e12e87c815b641912 From 607880d898f6b402dc352fbe801422817479f6b5 Mon Sep 17 00:00:00 2001 From: bSI-Bot Date: Wed, 23 Oct 2024 00:33:21 +0100 Subject: [PATCH 20/90] Revert "Update .gitmodules" This reverts commit 8a3a07b8414bcb757c0475eed356130b68d0b2b9. --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 763bc8d4..4706ccfb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "backend/apps/ifc_validation/checks/ifc_gherkin_rules"] path = backend/apps/ifc_validation/checks/ifc_gherkin_rules url = https://github.com/buildingSMART/ifc-gherkin-rules - branch = release/0.6.7 + branch = development [submodule "backend/apps/ifc_validation/checks/step_file_parser"] path = backend/apps/ifc_validation/checks/step_file_parser url = https://github.com/IfcOpenShell/step-file-parser @@ -9,4 +9,4 @@ [submodule "backend/apps/ifc_validation_models"] path = backend/apps/ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model - branch = release/0.6.7 + branch = development From c1c9e48e2633d7a86fbac6d972f03bcd9b0da5b3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 30 Oct 2024 11:27:26 +0000 Subject: [PATCH 21/90] Update of submodules (bSI-Bot via GH action) --- backend/apps/ifc_validation/checks/ifc_gherkin_rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/apps/ifc_validation/checks/ifc_gherkin_rules b/backend/apps/ifc_validation/checks/ifc_gherkin_rules index adddc691..b3630414 160000 --- a/backend/apps/ifc_validation/checks/ifc_gherkin_rules +++ b/backend/apps/ifc_validation/checks/ifc_gherkin_rules @@ -1 +1 @@ -Subproject commit adddc691816b99120d0aeefd46c6f31f8b7ee523 +Subproject commit b363041433f252fc1b9e043ee3aac0bd6fcfad3d From 888fe129b52557145e2219401fb682a24f6352a2 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Thu, 7 Nov 2024 14:09:24 +0100 Subject: [PATCH 22/90] Update Makefile --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dc65941d..01236f8a 100644 --- a/Makefile +++ b/Makefile @@ -71,4 +71,5 @@ clean-all: fetch-modules: git submodule update --init --recursive - git submodule update --remote \ No newline at end of file + git submodule foreach git clean -f . + git submodule update --remote --recursive From 8ac0de8db850e78c80df892ee2a413b92e444c2a Mon Sep 17 00:00:00 2001 From: Geert Hesselink <54070862+Ghesselink@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:46:14 +0100 Subject: [PATCH 23/90] Update ci_cd.yml --- .github/workflows/ci_cd.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 7a3fad07..90811199 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -61,7 +61,8 @@ jobs: cd backend cd apps git submodule update --init --recursive - git submodule update --remote + git submodule foreach git clean -f . + git submodule update --remote --recursive - name: Set up Python uses: actions/setup-python@v5 From 211b3cef643af0c95895339c92075c6d7ebd2378 Mon Sep 17 00:00:00 2001 From: Geert Hesselink <54070862+Ghesselink@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:55:04 +0100 Subject: [PATCH 24/90] Update ci_cd.yml - spacing & fetch-depth:0 --- .github/workflows/ci_cd.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 90811199..29877482 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -55,14 +55,17 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Fetch submodules run: | - cd backend - cd apps + cd backend/apps git submodule update --init --recursive - git submodule foreach git clean -f . - git submodule update --remote --recursive + git submodule foreach 'git clean -f -d' + git submodule update --remote --recursive + - name: Set up Python uses: actions/setup-python@v5 From 02f7d79de19bfe48f2db4b0951c6cacb5891312a Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Sat, 9 Nov 2024 14:47:09 +0000 Subject: [PATCH 25/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index dfe236f0..00401658 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -14,6 +14,7 @@ on: - development - release/0.6.6 - release/0.6.7 + - release/0.6.8 environment: description: 'Environment to (re)deploy to' @@ -91,7 +92,7 @@ jobs: source venv/bin/activate # use version of ifcopenshell with desired schema parsing # TODO: revert to pyPI when schema parsing is published in the future - wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.7.9-c18e4ea-linux64.zip" + wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.1-92b63a0-linux64.zip" mkdir -p venv/lib/python3.11/site-packages unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip From 36cf9290c9b5d3b4137ccf4492f26fd90a927738 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Sat, 9 Nov 2024 14:47:43 +0000 Subject: [PATCH 26/90] Rename ci_cd.yml to ci_cd.yml_OBSOLETE --- .github/workflows/{ci_cd.yml => ci_cd.yml_OBSOLETE} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{ci_cd.yml => ci_cd.yml_OBSOLETE} (100%) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml_OBSOLETE similarity index 100% rename from .github/workflows/ci_cd.yml rename to .github/workflows/ci_cd.yml_OBSOLETE From b73b870c2e2723f99a7e9e9fd7a5b755125c1e8b Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Sat, 9 Nov 2024 15:22:47 +0000 Subject: [PATCH 27/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 00401658..638ae9b1 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -145,17 +145,6 @@ jobs: git checkout -q ${{ inputs.branch }} && git pull sudo make fetch-modules' - - name: Check local changes - run: | - ssh ssh_host 'cd ${{ vars.REPO_CLONE_PATH }} - if [ -z "$(git status --porcelain)" ]; then - echo "No local changes" - else - echo "ERROR: There are local changes in ${{ inputs.environment }}" - git status --porcelain - exit -1 - fi' - - name: Checkout correct branches run: | ssh ssh_host 'cd ${{ vars.REPO_CLONE_PATH }} From ce5ce6a1160e4fe17b2f24d6bdc0b0a1f9c852c6 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Mon, 11 Nov 2024 11:13:02 +0100 Subject: [PATCH 28/90] Mark success when validate statuscode < 0 --- backend/apps/ifc_validation/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/apps/ifc_validation/tasks.py b/backend/apps/ifc_validation/tasks.py index 81f64e00..7a5e3486 100644 --- a/backend/apps/ifc_validation/tasks.py +++ b/backend/apps/ifc_validation/tasks.py @@ -581,7 +581,7 @@ def is_schema_error(line): # tfk: if we mark this task as failed we don't do the instance population either. # marking as failed should probably be reserved for blocking errors (prerequisites) # and internal errors and differentiate between valid and task_success. - success = proc.returncode == 0 + success = proc.returncode >= 0 valid = (len(output) == 0) with transaction.atomic(): From f13deb673c8b603eb3f2b04c1df20cadb5370591 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 12 Nov 2024 01:56:34 +0000 Subject: [PATCH 29/90] Update of submodules (bSI-Bot via GH action) --- backend/apps/ifc_validation_models | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/apps/ifc_validation_models b/backend/apps/ifc_validation_models index f32164ab..1738d92e 160000 --- a/backend/apps/ifc_validation_models +++ b/backend/apps/ifc_validation_models @@ -1 +1 @@ -Subproject commit f32164ab762fc695690d380e12e87c815b641912 +Subproject commit 1738d92e8f3dd497f78c12dba5d07b0796422f0a From 8e3ab1df130ef8d32ac1613ab4499adc5c4410a1 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Wed, 13 Nov 2024 17:29:54 +0100 Subject: [PATCH 30/90] update gitmodules & delete ci_cd workflow --- .github/workflows/ci_cd.yml | 169 ------------------------------------ .gitmodules | 4 +- 2 files changed, 2 insertions(+), 171 deletions(-) delete mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml deleted file mode 100644 index 1b537b09..00000000 --- a/.github/workflows/ci_cd.yml +++ /dev/null @@ -1,169 +0,0 @@ -name: Build & Deploy (CI/CD - DEV) - -concurrency: - group: development - cancel-in-progress: true - -on: - push: - branches: - - development - paths-ignore: - - 'README.md' - - '.github/**' - pull_request: - branches: - - development - workflow_dispatch: - -jobs: - - build_frontend: - - name: build frontend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install npm packages - run: | - cd frontend - npm install - - - name: Build & bundle - run: | - cd frontend - unset CI # ignore React warnings - npm run build - - build_backend: - - name: build backend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Fetch submodules - run: | - cd backend - cd apps - git submodule update --init --recursive - git submodule update --remote - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Create venv - run: | - cd backend - python3.11 -m venv venv - - - name: Install packages - run: | - cd backend - source venv/bin/activate - pip install --upgrade pip - pip install -r requirements.txt - - - name: Install ifcopenshell package (temp) - run: | - cd backend - source venv/bin/activate - # use version of ifcopenshell with desired schema parsing - # TODO: revert to pyPI when schema parsing is published in the future - wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.1-088bc20-linux64.zip" - mkdir -p venv/lib/python3.11/site-packages - unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - - - name: Check Django config - run: | - cd backend - source venv/bin/activate - python3 manage.py check - - - name: Run tests - run: | - cd backend - source venv/bin/activate - python3 manage.py test - - deploy: - - name: deploy to server - needs: [build_frontend, build_backend] - if: github.event_name == 'push' - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - - name: Install sshpass - run: sudo apt-get install sshpass - - - name: Stop Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make stop - ENDSSH - - - name: Fetch sources & submodules - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ vars.BRANCH_NAME }} && git pull - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/step_file_parser && git checkout -q master && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh - ENDSSH - - - name: Set VERSION - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - COMMIT_HASH=$(git rev-parse --short HEAD) - VERSION="${{ vars.VERSION }}" - echo "Set VERSION to ${VERSION}" - echo "Commit hash ${COMMIT_HASH}" - echo "${VERSION}" > .VERSION - ENDSSH - - - name: Build Docker images - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH - - - name: Start Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH diff --git a/.gitmodules b/.gitmodules index 4706ccfb..763bc8d4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "backend/apps/ifc_validation/checks/ifc_gherkin_rules"] path = backend/apps/ifc_validation/checks/ifc_gherkin_rules url = https://github.com/buildingSMART/ifc-gherkin-rules - branch = development + branch = release/0.6.7 [submodule "backend/apps/ifc_validation/checks/step_file_parser"] path = backend/apps/ifc_validation/checks/step_file_parser url = https://github.com/IfcOpenShell/step-file-parser @@ -9,4 +9,4 @@ [submodule "backend/apps/ifc_validation_models"] path = backend/apps/ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model - branch = development + branch = release/0.6.7 From 6ac5a5cf546c91a64f586d4284e5a079abd86a0f Mon Sep 17 00:00:00 2001 From: Geert Hesselink <54070862+Ghesselink@users.noreply.github.com> Date: Wed, 13 Nov 2024 20:01:56 +0100 Subject: [PATCH 31/90] reverse pull & checkout validate branch --- .github/workflows/build_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 638ae9b1..4c7ed50e 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -142,7 +142,7 @@ jobs: - name: Fetch sources & submodules run: | ssh ssh_host 'cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ inputs.branch }} && git pull + git pull && checkout -q ${{ inputs.branch }} && git pull sudo make fetch-modules' - name: Checkout correct branches From 13723b5afb6ae2dbda563ac24fcf296d75841430 Mon Sep 17 00:00:00 2001 From: Geert Hesselink <54070862+Ghesselink@users.noreply.github.com> Date: Wed, 13 Nov 2024 20:09:35 +0100 Subject: [PATCH 32/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 4c7ed50e..51eb9228 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -142,7 +142,7 @@ jobs: - name: Fetch sources & submodules run: | ssh ssh_host 'cd ${{ vars.REPO_CLONE_PATH }} - git pull && checkout -q ${{ inputs.branch }} && git pull + git pull && git checkout -q ${{ inputs.branch }} && git pull sudo make fetch-modules' - name: Checkout correct branches From 12e040d139a15ae5b4f5a98ada9606a148162bb0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 19 Nov 2024 19:37:36 +0000 Subject: [PATCH 33/90] Update of submodules (bSI-Bot via GH action) --- backend/apps/ifc_validation/checks/ifc_gherkin_rules | 2 +- backend/apps/ifc_validation/checks/step_file_parser | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/apps/ifc_validation/checks/ifc_gherkin_rules b/backend/apps/ifc_validation/checks/ifc_gherkin_rules index b3630414..729ff951 160000 --- a/backend/apps/ifc_validation/checks/ifc_gherkin_rules +++ b/backend/apps/ifc_validation/checks/ifc_gherkin_rules @@ -1 +1 @@ -Subproject commit b363041433f252fc1b9e043ee3aac0bd6fcfad3d +Subproject commit 729ff95152bdfa62708522f743db15862784165d diff --git a/backend/apps/ifc_validation/checks/step_file_parser b/backend/apps/ifc_validation/checks/step_file_parser index db8ec7c0..8a5349f5 160000 --- a/backend/apps/ifc_validation/checks/step_file_parser +++ b/backend/apps/ifc_validation/checks/step_file_parser @@ -1 +1 @@ -Subproject commit db8ec7c064f39bde5fba62ce6f86152bef5f4782 +Subproject commit 8a5349f57eadcbc280f8578cf5f6a1c006189533 From c1021e5796e7f471032f437a4156f1b4ca23de9f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 19 Nov 2024 19:48:55 +0000 Subject: [PATCH 34/90] Update of submodules (bSI-Bot via GH action) --- backend/apps/ifc_validation/checks/ifc_gherkin_rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/apps/ifc_validation/checks/ifc_gherkin_rules b/backend/apps/ifc_validation/checks/ifc_gherkin_rules index 729ff951..bb96f10a 160000 --- a/backend/apps/ifc_validation/checks/ifc_gherkin_rules +++ b/backend/apps/ifc_validation/checks/ifc_gherkin_rules @@ -1 +1 @@ -Subproject commit 729ff95152bdfa62708522f743db15862784165d +Subproject commit bb96f10a2ce752b134fc03f0e1e6b2dc77f5b18a From 2c7eb4115996a5ec8865d6c9b064d3e551344a01 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 19 Nov 2024 20:31:53 +0000 Subject: [PATCH 35/90] Update of submodules (bSI-Bot via GH action) --- backend/apps/ifc_validation/checks/ifc_gherkin_rules | 2 +- backend/apps/ifc_validation_models | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/apps/ifc_validation/checks/ifc_gherkin_rules b/backend/apps/ifc_validation/checks/ifc_gherkin_rules index bb96f10a..347333d8 160000 --- a/backend/apps/ifc_validation/checks/ifc_gherkin_rules +++ b/backend/apps/ifc_validation/checks/ifc_gherkin_rules @@ -1 +1 @@ -Subproject commit bb96f10a2ce752b134fc03f0e1e6b2dc77f5b18a +Subproject commit 347333d8095ddb7f7a6a26ff33dac4e74add42a7 diff --git a/backend/apps/ifc_validation_models b/backend/apps/ifc_validation_models index 1738d92e..25109ee3 160000 --- a/backend/apps/ifc_validation_models +++ b/backend/apps/ifc_validation_models @@ -1 +1 @@ -Subproject commit 1738d92e8f3dd497f78c12dba5d07b0796422f0a +Subproject commit 25109ee30a816fd54c1b127a2258c5d039f2113c From 5fb3c5efbce74f4aaea48845fda87f57741b7558 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Sun, 24 Nov 2024 14:00:23 +0000 Subject: [PATCH 36/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 51eb9228..40769af7 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -150,7 +150,6 @@ jobs: ssh ssh_host 'cd ${{ vars.REPO_CLONE_PATH }} cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ inputs.branch }} && git pull cd ./ifc_validation_models && git checkout -q ${{ inputs.branch }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/step_file_parser && git checkout -q master && git pull cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ inputs.branch }} && git pull cd ${{ vars.REPO_CLONE_PATH }} ./check-submodules.sh' From 8d3c50f62febbedc3362dd50b214e48593a5c30b Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Sun, 24 Nov 2024 14:01:41 +0000 Subject: [PATCH 37/90] Delete .github/workflows/ci_cd.yml_OBSOLETE --- .github/workflows/ci_cd.yml_OBSOLETE | 164 --------------------------- 1 file changed, 164 deletions(-) delete mode 100644 .github/workflows/ci_cd.yml_OBSOLETE diff --git a/.github/workflows/ci_cd.yml_OBSOLETE b/.github/workflows/ci_cd.yml_OBSOLETE deleted file mode 100644 index 29877482..00000000 --- a/.github/workflows/ci_cd.yml_OBSOLETE +++ /dev/null @@ -1,164 +0,0 @@ -name: Build & Deploy (CI/CD - DEV) - -concurrency: - group: development - cancel-in-progress: true - -on: - push: - branches: - - development - paths-ignore: - - 'README.md' - - '.github/**' - pull_request: - branches: - - development - workflow_dispatch: - -jobs: - - build_frontend: - - name: build frontend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install npm packages - run: | - cd frontend - npm install - - - name: Build & bundle - run: | - cd frontend - unset CI # ignore React warnings - npm run build - - build_backend: - - name: build backend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - - name: Fetch submodules - run: | - cd backend/apps - git submodule update --init --recursive - git submodule foreach 'git clean -f -d' - git submodule update --remote --recursive - - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Create venv - run: | - cd backend - python3.11 -m venv venv - - - name: Install packages - run: | - cd backend - source venv/bin/activate - pip install --upgrade pip - pip install -r requirements.txt - pip install ifcopenshell # TEMP workaround - - - name: Check Django config - run: | - cd backend - source venv/bin/activate - python3 manage.py check - - - name: Run tests - run: | - cd backend - source venv/bin/activate - python3 manage.py test - - deploy: - - name: deploy to server - needs: [build_frontend, build_backend] - if: github.event_name == 'push' - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - - name: Install sshpass - run: sudo apt-get install sshpass - - - name: Stop Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make stop - ENDSSH - - - name: Fetch sources & submodules - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ vars.BRANCH_NAME }} && git pull - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/step_file_parser && git checkout -q master && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh - ENDSSH - - - name: Set VERSION - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - COMMIT_HASH=$(git rev-parse --short HEAD) - VERSION="${{ vars.VERSION }}" - echo "Set VERSION to ${VERSION}" - echo "Commit hash ${COMMIT_HASH}" - echo "${VERSION}" > .VERSION - ENDSSH - - - name: Build Docker images - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH - - - name: Start Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH From ccd7584dede207af32b385e2a1edb0af1c711a96 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Wed, 27 Nov 2024 22:51:06 +0000 Subject: [PATCH 38/90] remove step_file_parser --- .github/workflows/dispatch.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml index 450abb33..07831762 100644 --- a/.github/workflows/dispatch.yml +++ b/.github/workflows/dispatch.yml @@ -50,11 +50,6 @@ jobs: cd ${{ github.workspace }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules git checkout -q ${{ github.event.client_payload.branch }} - - name: Fetch latest submodule - step_file_parser - run: | - cd ${{ github.workspace }}/backend/apps/ifc_validation/checks/step_file_parser - git checkout -B master # note: only using master branch for now - - name: Fetch latest submodule - ifc-validation-models run: | cd ${{ github.workspace }}/backend/apps/ifc_validation_models From 26667ba1f04f778066762786f627295936365e62 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Wed, 27 Nov 2024 23:00:13 +0000 Subject: [PATCH 39/90] Update dispatch.yml --- .github/workflows/dispatch.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml index 07831762..c7b9c243 100644 --- a/.github/workflows/dispatch.yml +++ b/.github/workflows/dispatch.yml @@ -70,7 +70,6 @@ jobs: run: | cd ${{ github.workspace }} git add backend/apps/ifc_validation/checks/ifc_gherkin_rules - git add backend/apps/ifc_validation/checks/step_file_parser git add backend/apps/ifc_validation_models - name: Show git status (pre) From 67c29fe3cab92be901545067019ad259e58c7dff Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Thu, 28 Nov 2024 00:13:30 +0000 Subject: [PATCH 40/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 40769af7..bd0bff33 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -15,6 +15,7 @@ on: - release/0.6.6 - release/0.6.7 - release/0.6.8 + - release/0.6.9 environment: description: 'Environment to (re)deploy to' From 192fe61f3f9a5fe4ebe55e32441e6449e360af4d Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Mon, 10 Feb 2025 13:29:42 +0000 Subject: [PATCH 41/90] Update build_deploy.yml updated release branch names --- .github/workflows/build_deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index bd0bff33..35d0fb1b 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -16,6 +16,8 @@ on: - release/0.6.7 - release/0.6.8 - release/0.6.9 + - release/0.6.10 + - release/0.6.11 environment: description: 'Environment to (re)deploy to' From 2620dbb9b7d9106df3dfcda0d0c59820821f2797 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Thu, 13 Feb 2025 13:44:19 +0100 Subject: [PATCH 42/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 35d0fb1b..a1981a56 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -18,6 +18,7 @@ on: - release/0.6.9 - release/0.6.10 - release/0.6.11 + - release/0.6.12 environment: description: 'Environment to (re)deploy to' From 07c8af8d41359c36fc7c84755e60481cd66079d9 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Thu, 13 Feb 2025 20:05:20 +0100 Subject: [PATCH 43/90] delete .github folder for release --- .github/workflows/ci_cd.yml | 168 ------------------------------------ 1 file changed, 168 deletions(-) delete mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml deleted file mode 100644 index 796cf90b..00000000 --- a/.github/workflows/ci_cd.yml +++ /dev/null @@ -1,168 +0,0 @@ -name: Build & Deploy (CI/CD - DEV) - -concurrency: - group: development - cancel-in-progress: true - -on: - push: - branches: - - development - paths-ignore: - - 'README.md' - - '.github/**' - pull_request: - branches: - - development - workflow_dispatch: - -jobs: - - build_frontend: - - name: build frontend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install npm packages - run: | - cd frontend - npm install - - - name: Build & bundle - run: | - cd frontend - unset CI # ignore React warnings - npm run build - - build_backend: - - name: build backend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Fetch submodules - run: | - cd backend - cd apps - git submodule update --init --recursive - git submodule update --remote - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Create venv - run: | - cd backend - python3.11 -m venv venv - - - name: Install packages - run: | - cd backend - source venv/bin/activate - pip install --upgrade pip - pip install -r requirements.txt - - - name: Install ifcopenshell package (temp) - run: | - cd backend - source venv/bin/activate - # use version of ifcopenshell with desired schema parsing - # TODO: revert to pyPI when schema parsing is published in the future - wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.1-c49ca69-linux64.zip" - mkdir -p venv/lib/python3.11/site-packages - unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - - - name: Check Django config - run: | - cd backend - source venv/bin/activate - python3 manage.py check - - - name: Run tests - run: | - cd backend - source venv/bin/activate - python3 manage.py test - - deploy: - - name: deploy to server - needs: [build_frontend, build_backend] - if: github.event_name == 'push' - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - - name: Install sshpass - run: sudo apt-get install sshpass - - - name: Stop Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make stop - ENDSSH - - - name: Fetch sources & submodules - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ vars.BRANCH_NAME }} && git pull - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh - ENDSSH - - - name: Set VERSION - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - COMMIT_HASH=$(git rev-parse --short HEAD) - VERSION="${{ vars.VERSION }}" - echo "Set VERSION to ${VERSION}" - echo "Commit hash ${COMMIT_HASH}" - echo "${VERSION}" > .VERSION - ENDSSH - - - name: Build Docker images - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH - - - name: Start Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH From f14895c4d9bfe3f7e9e63b84f7601064d112fe66 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Thu, 13 Feb 2025 20:17:29 +0100 Subject: [PATCH 44/90] update checkout branches --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index ffa044a3..da0f8736 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,8 +1,8 @@ [submodule "backend/apps/ifc_validation/checks/ifc_gherkin_rules"] path = backend/apps/ifc_validation/checks/ifc_gherkin_rules url = https://github.com/buildingSMART/ifc-gherkin-rules - branch = development + branch = release/0.6.12 [submodule "backend/apps/ifc_validation_models"] path = backend/apps/ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model - branch = development + branch = release/0.6.12 From be0d8aa72a04f948dcc6bdb0afcd6988966bebe6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 15 Feb 2025 12:06:32 +0000 Subject: [PATCH 45/90] Update of submodules (bSI-Bot via GH action) --- backend/apps/ifc_validation/checks/ifc_gherkin_rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/apps/ifc_validation/checks/ifc_gherkin_rules b/backend/apps/ifc_validation/checks/ifc_gherkin_rules index 347333d8..9cd4bf69 160000 --- a/backend/apps/ifc_validation/checks/ifc_gherkin_rules +++ b/backend/apps/ifc_validation/checks/ifc_gherkin_rules @@ -1 +1 @@ -Subproject commit 347333d8095ddb7f7a6a26ff33dac4e74add42a7 +Subproject commit 9cd4bf6994b5c44816e09280430e4f342e6fbffa From d1a51d573b42d155a82fcdd9e3cf32e0c87b0656 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 15 Feb 2025 12:09:22 +0000 Subject: [PATCH 46/90] Update of submodules (bSI-Bot via GH action) --- backend/apps/ifc_validation_models | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/apps/ifc_validation_models b/backend/apps/ifc_validation_models index 25109ee3..c60e3db4 160000 --- a/backend/apps/ifc_validation_models +++ b/backend/apps/ifc_validation_models @@ -1 +1 @@ -Subproject commit 25109ee30a816fd54c1b127a2258c5d039f2113c +Subproject commit c60e3db47379d152d8092858119fb8b82c1af9fb From 71db8e717f0145b8fc1be147177a45903245dbbb Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Wed, 19 Feb 2025 11:29:43 +0100 Subject: [PATCH 47/90] remove github folder --- .github/workflows/ci_cd.yml | 168 ------------------------------------ 1 file changed, 168 deletions(-) delete mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml deleted file mode 100644 index 796cf90b..00000000 --- a/.github/workflows/ci_cd.yml +++ /dev/null @@ -1,168 +0,0 @@ -name: Build & Deploy (CI/CD - DEV) - -concurrency: - group: development - cancel-in-progress: true - -on: - push: - branches: - - development - paths-ignore: - - 'README.md' - - '.github/**' - pull_request: - branches: - - development - workflow_dispatch: - -jobs: - - build_frontend: - - name: build frontend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install npm packages - run: | - cd frontend - npm install - - - name: Build & bundle - run: | - cd frontend - unset CI # ignore React warnings - npm run build - - build_backend: - - name: build backend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Fetch submodules - run: | - cd backend - cd apps - git submodule update --init --recursive - git submodule update --remote - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Create venv - run: | - cd backend - python3.11 -m venv venv - - - name: Install packages - run: | - cd backend - source venv/bin/activate - pip install --upgrade pip - pip install -r requirements.txt - - - name: Install ifcopenshell package (temp) - run: | - cd backend - source venv/bin/activate - # use version of ifcopenshell with desired schema parsing - # TODO: revert to pyPI when schema parsing is published in the future - wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.1-c49ca69-linux64.zip" - mkdir -p venv/lib/python3.11/site-packages - unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - - - name: Check Django config - run: | - cd backend - source venv/bin/activate - python3 manage.py check - - - name: Run tests - run: | - cd backend - source venv/bin/activate - python3 manage.py test - - deploy: - - name: deploy to server - needs: [build_frontend, build_backend] - if: github.event_name == 'push' - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - - name: Install sshpass - run: sudo apt-get install sshpass - - - name: Stop Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make stop - ENDSSH - - - name: Fetch sources & submodules - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ vars.BRANCH_NAME }} && git pull - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh - ENDSSH - - - name: Set VERSION - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - COMMIT_HASH=$(git rev-parse --short HEAD) - VERSION="${{ vars.VERSION }}" - echo "Set VERSION to ${VERSION}" - echo "Commit hash ${COMMIT_HASH}" - echo "${VERSION}" > .VERSION - ENDSSH - - - name: Build Docker images - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH - - - name: Start Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH From d48344e55df24a4aaeb65d2f42f0d1acf7bbcb11 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Wed, 19 Feb 2025 11:34:44 +0100 Subject: [PATCH 48/90] correct submodule pointer --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index ffa044a3..b029d1a6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,8 +1,8 @@ [submodule "backend/apps/ifc_validation/checks/ifc_gherkin_rules"] path = backend/apps/ifc_validation/checks/ifc_gherkin_rules url = https://github.com/buildingSMART/ifc-gherkin-rules - branch = development + branch = release/0.7.0 [submodule "backend/apps/ifc_validation_models"] path = backend/apps/ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model - branch = development + branch = release/0.7.0 From 04c5492cb5dc9ad1921ad7316c31efccf1ad8e55 Mon Sep 17 00:00:00 2001 From: Geert Hesselink <54070862+Ghesselink@users.noreply.github.com> Date: Wed, 19 Feb 2025 11:36:14 +0100 Subject: [PATCH 49/90] Add 0.7.0 to build_deploy.yml --- .github/workflows/build_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index a1981a56..c8404e51 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -19,6 +19,7 @@ on: - release/0.6.10 - release/0.6.11 - release/0.6.12 + - release/0.7.0 environment: description: 'Environment to (re)deploy to' From cc05042f83a9e678da18f4aebb7126a856cb13ea Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Mon, 10 Mar 2025 03:18:38 +0000 Subject: [PATCH 50/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index c8404e51..720da101 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -20,6 +20,8 @@ on: - release/0.6.11 - release/0.6.12 - release/0.7.0 + - release/0.7.1 + - release/0.7.2 environment: description: 'Environment to (re)deploy to' From 45787989f3cb11c302b805be17efa881e6008527 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Tue, 11 Mar 2025 22:47:55 +0100 Subject: [PATCH 51/90] rm github folder --- .github/workflows/ci_cd.yml | 172 ------------------------------------ 1 file changed, 172 deletions(-) delete mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml deleted file mode 100644 index 25707066..00000000 --- a/.github/workflows/ci_cd.yml +++ /dev/null @@ -1,172 +0,0 @@ -name: Build & Deploy (CI/CD - DEV) - -concurrency: - group: development - cancel-in-progress: true - -on: - push: - branches: - - development - paths-ignore: - - 'README.md' - - '.github/**' - pull_request: - branches: - - development - workflow_dispatch: - -jobs: - - build_frontend: - - name: build frontend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install npm packages - run: | - cd frontend - npm install - - - name: Build & bundle - run: | - cd frontend - unset CI # ignore React warnings - npm run build - - build_backend: - - name: build backend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Fetch submodules - run: | - cd backend - cd apps - git submodule update --init --recursive - git submodule update --remote - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Create venv - run: | - cd backend - python3.11 -m venv venv - - - name: Install packages - run: | - cd backend - source venv/bin/activate - pip install --upgrade pip - pip install -r requirements.txt - - - name: Install ifcopenshell package (temp) - run: | - cd backend - source venv/bin/activate - # use version of ifcopenshell with desired schema parsing - # TODO: revert to pyPI when schema parsing is published in the future - wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.1-c49ca69-linux64.zip" - mkdir -p venv/lib/python3.11/site-packages - unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - - - name: Check Django config - run: | - cd backend - source venv/bin/activate - python3 manage.py check - - - name: Run tests - run: | - cd backend - source venv/bin/activate - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps/ifc_validation_models --settings apps.ifc_validation_models.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_parse_info_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_schema_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_bsdd_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - - deploy: - - name: deploy to server - needs: [build_frontend, build_backend] - if: github.event_name == 'push' - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - - name: Install sshpass - run: sudo apt-get install sshpass - - - name: Stop Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make stop - ENDSSH - - - name: Fetch sources & submodules - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ vars.BRANCH_NAME }} && git pull - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh - ENDSSH - - - name: Set VERSION - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - COMMIT_HASH=$(git rev-parse --short HEAD) - VERSION="${{ vars.VERSION }}" - echo "Set VERSION to ${VERSION}" - echo "Commit hash ${COMMIT_HASH}" - echo "${VERSION}" > .VERSION - ENDSSH - - - name: Build Docker images - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH - - - name: Start Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH From 0bf49fbc75d7d50f986bc1c8314965b4bc68dc55 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Tue, 11 Mar 2025 22:53:33 +0100 Subject: [PATCH 52/90] update gitmodules --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index ffa044a3..21dc4724 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,8 +1,8 @@ [submodule "backend/apps/ifc_validation/checks/ifc_gherkin_rules"] path = backend/apps/ifc_validation/checks/ifc_gherkin_rules url = https://github.com/buildingSMART/ifc-gherkin-rules - branch = development + branch = release/0.7.1 [submodule "backend/apps/ifc_validation_models"] path = backend/apps/ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model - branch = development + branch = release/0.7.1 From a3f6e75a1db9aa95770edcc872504de1acffb3c5 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Wed, 19 Mar 2025 00:07:27 +0100 Subject: [PATCH 53/90] remove obsolete github folder --- .github/workflows/ci_cd.yml | 172 ------------------------------------ 1 file changed, 172 deletions(-) delete mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml deleted file mode 100644 index 25707066..00000000 --- a/.github/workflows/ci_cd.yml +++ /dev/null @@ -1,172 +0,0 @@ -name: Build & Deploy (CI/CD - DEV) - -concurrency: - group: development - cancel-in-progress: true - -on: - push: - branches: - - development - paths-ignore: - - 'README.md' - - '.github/**' - pull_request: - branches: - - development - workflow_dispatch: - -jobs: - - build_frontend: - - name: build frontend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install npm packages - run: | - cd frontend - npm install - - - name: Build & bundle - run: | - cd frontend - unset CI # ignore React warnings - npm run build - - build_backend: - - name: build backend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Fetch submodules - run: | - cd backend - cd apps - git submodule update --init --recursive - git submodule update --remote - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Create venv - run: | - cd backend - python3.11 -m venv venv - - - name: Install packages - run: | - cd backend - source venv/bin/activate - pip install --upgrade pip - pip install -r requirements.txt - - - name: Install ifcopenshell package (temp) - run: | - cd backend - source venv/bin/activate - # use version of ifcopenshell with desired schema parsing - # TODO: revert to pyPI when schema parsing is published in the future - wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.1-c49ca69-linux64.zip" - mkdir -p venv/lib/python3.11/site-packages - unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - - - name: Check Django config - run: | - cd backend - source venv/bin/activate - python3 manage.py check - - - name: Run tests - run: | - cd backend - source venv/bin/activate - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps/ifc_validation_models --settings apps.ifc_validation_models.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_parse_info_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_schema_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_bsdd_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - - deploy: - - name: deploy to server - needs: [build_frontend, build_backend] - if: github.event_name == 'push' - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - - name: Install sshpass - run: sudo apt-get install sshpass - - - name: Stop Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make stop - ENDSSH - - - name: Fetch sources & submodules - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ vars.BRANCH_NAME }} && git pull - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh - ENDSSH - - - name: Set VERSION - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - COMMIT_HASH=$(git rev-parse --short HEAD) - VERSION="${{ vars.VERSION }}" - echo "Set VERSION to ${VERSION}" - echo "Commit hash ${COMMIT_HASH}" - echo "${VERSION}" > .VERSION - ENDSSH - - - name: Build Docker images - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH - - - name: Start Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH From 2c70ece62f6d1188d48a74e1701b745c1df85650 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Wed, 19 Mar 2025 00:10:03 +0100 Subject: [PATCH 54/90] correct submodule pointer --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index ffa044a3..726097ce 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,8 +1,8 @@ [submodule "backend/apps/ifc_validation/checks/ifc_gherkin_rules"] path = backend/apps/ifc_validation/checks/ifc_gherkin_rules url = https://github.com/buildingSMART/ifc-gherkin-rules - branch = development + branch = release/0.7.2 [submodule "backend/apps/ifc_validation_models"] path = backend/apps/ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model - branch = development + branch = release/0.7.2 From 667b3e83ebc9c1342ad7a663d47877c73dd0d27a Mon Sep 17 00:00:00 2001 From: Geert Hesselink <54070862+Ghesselink@users.noreply.github.com> Date: Wed, 19 Mar 2025 00:11:35 +0100 Subject: [PATCH 55/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 720da101..85b6d231 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -22,6 +22,7 @@ on: - release/0.7.0 - release/0.7.1 - release/0.7.2 + - release/0.7.3 environment: description: 'Environment to (re)deploy to' From d65038e77e262103dccc67b8e6bea17ffeff6248 Mon Sep 17 00:00:00 2001 From: Geert Hesselink <54070862+Ghesselink@users.noreply.github.com> Date: Mon, 31 Mar 2025 00:15:05 +0200 Subject: [PATCH 56/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 85b6d231..40b5f9b7 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -23,6 +23,7 @@ on: - release/0.7.1 - release/0.7.2 - release/0.7.3 + - release/0.7.4 environment: description: 'Environment to (re)deploy to' From 49010233542a276ceea43c62fddf274048cf0716 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Thu, 17 Apr 2025 18:57:40 +0100 Subject: [PATCH 57/90] rm .github folder --- .github/workflows/build-and-deploy-docs.yml | 31 ---- .github/workflows/build-docs.yml | 28 ---- .github/workflows/ci_cd.yml | 172 -------------------- 3 files changed, 231 deletions(-) delete mode 100644 .github/workflows/build-and-deploy-docs.yml delete mode 100644 .github/workflows/build-docs.yml delete mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/build-and-deploy-docs.yml b/.github/workflows/build-and-deploy-docs.yml deleted file mode 100644 index 172fbd66..00000000 --- a/.github/workflows/build-and-deploy-docs.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Build docs with Sphinx and deploy to Github Pages" - -on: - push: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml deleted file mode 100644 index f1f25772..00000000 --- a/.github/workflows/build-docs.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "Build docs with Sphinx" - -on: - pull_request: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml deleted file mode 100644 index 25707066..00000000 --- a/.github/workflows/ci_cd.yml +++ /dev/null @@ -1,172 +0,0 @@ -name: Build & Deploy (CI/CD - DEV) - -concurrency: - group: development - cancel-in-progress: true - -on: - push: - branches: - - development - paths-ignore: - - 'README.md' - - '.github/**' - pull_request: - branches: - - development - workflow_dispatch: - -jobs: - - build_frontend: - - name: build frontend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install npm packages - run: | - cd frontend - npm install - - - name: Build & bundle - run: | - cd frontend - unset CI # ignore React warnings - npm run build - - build_backend: - - name: build backend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Fetch submodules - run: | - cd backend - cd apps - git submodule update --init --recursive - git submodule update --remote - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Create venv - run: | - cd backend - python3.11 -m venv venv - - - name: Install packages - run: | - cd backend - source venv/bin/activate - pip install --upgrade pip - pip install -r requirements.txt - - - name: Install ifcopenshell package (temp) - run: | - cd backend - source venv/bin/activate - # use version of ifcopenshell with desired schema parsing - # TODO: revert to pyPI when schema parsing is published in the future - wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.1-c49ca69-linux64.zip" - mkdir -p venv/lib/python3.11/site-packages - unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - - - name: Check Django config - run: | - cd backend - source venv/bin/activate - python3 manage.py check - - - name: Run tests - run: | - cd backend - source venv/bin/activate - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps/ifc_validation_models --settings apps.ifc_validation_models.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_parse_info_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_schema_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_bsdd_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - - deploy: - - name: deploy to server - needs: [build_frontend, build_backend] - if: github.event_name == 'push' - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - - name: Install sshpass - run: sudo apt-get install sshpass - - - name: Stop Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make stop - ENDSSH - - - name: Fetch sources & submodules - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ vars.BRANCH_NAME }} && git pull - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh - ENDSSH - - - name: Set VERSION - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - COMMIT_HASH=$(git rev-parse --short HEAD) - VERSION="${{ vars.VERSION }}" - echo "Set VERSION to ${VERSION}" - echo "Commit hash ${COMMIT_HASH}" - echo "${VERSION}" > .VERSION - ENDSSH - - - name: Build Docker images - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH - - - name: Start Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH From 18837cac914d7f006dfa355aaf9c2269f875a939 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Thu, 17 Apr 2025 18:58:42 +0100 Subject: [PATCH 58/90] point to release/0.7.4 --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index ffa044a3..14a24533 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,8 +1,8 @@ [submodule "backend/apps/ifc_validation/checks/ifc_gherkin_rules"] path = backend/apps/ifc_validation/checks/ifc_gherkin_rules url = https://github.com/buildingSMART/ifc-gherkin-rules - branch = development + branch = release/0.7.4 [submodule "backend/apps/ifc_validation_models"] path = backend/apps/ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model - branch = development + branch = release/0.7.4 From 623794e10570b30052a0128d212c36177eba3982 Mon Sep 17 00:00:00 2001 From: Geert Hesselink <54070862+Ghesselink@users.noreply.github.com> Date: Thu, 17 Apr 2025 18:59:21 +0100 Subject: [PATCH 59/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 40b5f9b7..86e80a9d 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -24,6 +24,7 @@ on: - release/0.7.2 - release/0.7.3 - release/0.7.4 + - release/0.7.5 environment: description: 'Environment to (re)deploy to' From 9bed38ff2a82b4ff9d070c8170ae8492200975b9 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Sat, 19 Apr 2025 17:51:24 +0100 Subject: [PATCH 60/90] Add workflows by IVS-216 (documentation) --- .github/workflows/build-and-deploy-docs.yml | 31 +++++++++++++++++++++ .github/workflows/build-docs.yml | 28 +++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .github/workflows/build-and-deploy-docs.yml create mode 100644 .github/workflows/build-docs.yml diff --git a/.github/workflows/build-and-deploy-docs.yml b/.github/workflows/build-and-deploy-docs.yml new file mode 100644 index 00000000..172fbd66 --- /dev/null +++ b/.github/workflows/build-and-deploy-docs.yml @@ -0,0 +1,31 @@ +name: "Build docs with Sphinx and deploy to Github Pages" + +on: + push: + branches: docs/gh-pages + +jobs: + build_and_deploy: + runs-on: ubuntu-latest + permissions: + contents: write + id-token: write + pages: write + env: + INPUT_DOCS-FOLDER: docs + steps: + - uses: actions/checkout@v4 + - name: Build HTML + uses: civilx64/sphinx-action@master + with: + docs-folder: docs/ + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload html docs + path: './docs/_build/html' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml new file mode 100644 index 00000000..f1f25772 --- /dev/null +++ b/.github/workflows/build-docs.yml @@ -0,0 +1,28 @@ +name: "Build docs with Sphinx" + +on: + pull_request: + branches: docs/gh-pages + +jobs: + build_and_deploy: + runs-on: ubuntu-latest + permissions: + contents: write + id-token: write + pages: write + env: + INPUT_DOCS-FOLDER: docs + steps: + - uses: actions/checkout@v4 + - name: Build HTML + uses: civilx64/sphinx-action@master + with: + docs-folder: docs/ + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload html docs + path: './docs/_build/html' From f1e78f84a99ca991eb13d34c8e98acba188a2c6e Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Mon, 28 Apr 2025 22:28:21 +0100 Subject: [PATCH 61/90] remove .github folder --- .github/workflows/build-and-deploy-docs.yml | 31 ---- .github/workflows/build-docs.yml | 28 ---- .github/workflows/ci_cd.yml | 172 -------------------- 3 files changed, 231 deletions(-) delete mode 100644 .github/workflows/build-and-deploy-docs.yml delete mode 100644 .github/workflows/build-docs.yml delete mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/build-and-deploy-docs.yml b/.github/workflows/build-and-deploy-docs.yml deleted file mode 100644 index 172fbd66..00000000 --- a/.github/workflows/build-and-deploy-docs.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Build docs with Sphinx and deploy to Github Pages" - -on: - push: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml deleted file mode 100644 index f1f25772..00000000 --- a/.github/workflows/build-docs.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "Build docs with Sphinx" - -on: - pull_request: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml deleted file mode 100644 index 25707066..00000000 --- a/.github/workflows/ci_cd.yml +++ /dev/null @@ -1,172 +0,0 @@ -name: Build & Deploy (CI/CD - DEV) - -concurrency: - group: development - cancel-in-progress: true - -on: - push: - branches: - - development - paths-ignore: - - 'README.md' - - '.github/**' - pull_request: - branches: - - development - workflow_dispatch: - -jobs: - - build_frontend: - - name: build frontend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install npm packages - run: | - cd frontend - npm install - - - name: Build & bundle - run: | - cd frontend - unset CI # ignore React warnings - npm run build - - build_backend: - - name: build backend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Fetch submodules - run: | - cd backend - cd apps - git submodule update --init --recursive - git submodule update --remote - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Create venv - run: | - cd backend - python3.11 -m venv venv - - - name: Install packages - run: | - cd backend - source venv/bin/activate - pip install --upgrade pip - pip install -r requirements.txt - - - name: Install ifcopenshell package (temp) - run: | - cd backend - source venv/bin/activate - # use version of ifcopenshell with desired schema parsing - # TODO: revert to pyPI when schema parsing is published in the future - wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.1-c49ca69-linux64.zip" - mkdir -p venv/lib/python3.11/site-packages - unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - - - name: Check Django config - run: | - cd backend - source venv/bin/activate - python3 manage.py check - - - name: Run tests - run: | - cd backend - source venv/bin/activate - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps/ifc_validation_models --settings apps.ifc_validation_models.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_parse_info_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_schema_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_bsdd_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - - deploy: - - name: deploy to server - needs: [build_frontend, build_backend] - if: github.event_name == 'push' - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - - name: Install sshpass - run: sudo apt-get install sshpass - - - name: Stop Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make stop - ENDSSH - - - name: Fetch sources & submodules - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ vars.BRANCH_NAME }} && git pull - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh - ENDSSH - - - name: Set VERSION - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - COMMIT_HASH=$(git rev-parse --short HEAD) - VERSION="${{ vars.VERSION }}" - echo "Set VERSION to ${VERSION}" - echo "Commit hash ${COMMIT_HASH}" - echo "${VERSION}" > .VERSION - ENDSSH - - - name: Build Docker images - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH - - - name: Start Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH From 535ebcc0b9032772fb42aae486c560b3ee3099c4 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Mon, 28 Apr 2025 22:29:12 +0100 Subject: [PATCH 62/90] correct submodule pointer --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index ffa044a3..78df2919 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,8 +1,8 @@ [submodule "backend/apps/ifc_validation/checks/ifc_gherkin_rules"] path = backend/apps/ifc_validation/checks/ifc_gherkin_rules url = https://github.com/buildingSMART/ifc-gherkin-rules - branch = development + branch = release/0.7.5 [submodule "backend/apps/ifc_validation_models"] path = backend/apps/ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model - branch = development + branch = release/0.7.5 From 9e44e91c4914a75abca27352e4447c2392e03827 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Mon, 26 May 2025 08:54:59 +0100 Subject: [PATCH 63/90] rm github folder --- .github/workflows/build-and-deploy-docs.yml | 31 ---- .github/workflows/build-docs.yml | 28 ---- .github/workflows/ci_cd.yml | 175 -------------------- 3 files changed, 234 deletions(-) delete mode 100644 .github/workflows/build-and-deploy-docs.yml delete mode 100644 .github/workflows/build-docs.yml delete mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/build-and-deploy-docs.yml b/.github/workflows/build-and-deploy-docs.yml deleted file mode 100644 index 172fbd66..00000000 --- a/.github/workflows/build-and-deploy-docs.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Build docs with Sphinx and deploy to Github Pages" - -on: - push: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml deleted file mode 100644 index f1f25772..00000000 --- a/.github/workflows/build-docs.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "Build docs with Sphinx" - -on: - pull_request: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml deleted file mode 100644 index 4cdcd3ef..00000000 --- a/.github/workflows/ci_cd.yml +++ /dev/null @@ -1,175 +0,0 @@ -name: Build & Deploy (CI/CD - DEV) - -concurrency: - group: development - cancel-in-progress: true - -on: - push: - branches: - - development - paths-ignore: - - 'README.md' - pull_request: - branches: - - development - workflow_dispatch: - -jobs: - - build_frontend: - - name: build frontend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install npm packages - run: | - cd frontend - npm install - - - name: Build & bundle - run: | - cd frontend - unset CI # ignore React warnings - npm run build - - build_backend: - - name: build backend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Fetch submodules - run: | - git clean -fdx -e ${{ vars.ENV_FILE }} -e 'redeploy.*.sh' -e 'docker/' - git submodule foreach --recursive 'git clean -fdx' - cd backend - cd apps - git submodule update --init --recursive - git submodule update --remote - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Create venv - run: | - cd backend - python3.11 -m venv venv - - - name: Install packages - run: | - cd backend - source venv/bin/activate - pip install --upgrade pip - pip install -r requirements.txt - - - name: Install ifcopenshell package (temp) - run: | - cd backend - source venv/bin/activate - # use version of ifcopenshell with desired schema parsing - # TODO: revert to pyPI when schema parsing is published in the future - wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.3-ec13294-linux64.zip" - mkdir -p venv/lib/python3.11/site-packages - unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - - - name: Check Django config - run: | - cd backend - source venv/bin/activate - python3 manage.py check - - - name: Run tests - run: | - cd backend - source venv/bin/activate - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps/ifc_validation_models --settings apps.ifc_validation_models.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_parse_info_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_schema_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_bsdd_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - - deploy: - - name: deploy to server - needs: [build_frontend, build_backend] - if: github.event_name == 'push' - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - - name: Install sshpass - run: sudo apt-get install sshpass - - - name: Stop Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make stop - ENDSSH - - - name: Fetch sources & submodules - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ vars.BRANCH_NAME }} && git pull - git clean -fdx -e ${{ vars.ENV_FILE }} -e 'redeploy.*.sh' -e 'docker/' - git submodule foreach --recursive 'git clean -fdx' - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh - ENDSSH - - - name: Set VERSION - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - COMMIT_HASH=$(git rev-parse --short HEAD) - VERSION="${{ vars.VERSION }}" - echo "Set VERSION to ${VERSION}" - echo "Commit hash ${COMMIT_HASH}" - echo "${VERSION}" > .VERSION - ENDSSH - - - name: Build Docker images - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH - - - name: Start Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH From 025f6d86635bb34e8737fde2b839a3cc5de3a2c2 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Mon, 26 May 2025 08:59:46 +0100 Subject: [PATCH 64/90] submodule pointer to 0.7.6 --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 51a6a5b0..d4107165 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,11 +1,11 @@ [submodule "backend/apps/ifc_validation/checks/ifc_gherkin_rules"] path = backend/apps/ifc_validation/checks/ifc_gherkin_rules url = https://github.com/buildingSMART/ifc-gherkin-rules - branch = development + branch = release/0.7.6 [submodule "backend/apps/ifc_validation_models"] path = backend/apps/ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model - branch = development + branch = release/0.7.6 [submodule "backend/apps/ifc_validation/checks/signatures/store"] path = backend/apps/ifc_validation/checks/signatures/store url = https://github.com/buildingsmart-certificates/validation-service-vendor-certificates From 9fc0eecdbf992e60d58e49ae770d079921dcf924 Mon Sep 17 00:00:00 2001 From: Geert Hesselink <54070862+Ghesselink@users.noreply.github.com> Date: Mon, 26 May 2025 09:00:31 +0100 Subject: [PATCH 65/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 86e80a9d..e519b18e 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -25,6 +25,7 @@ on: - release/0.7.3 - release/0.7.4 - release/0.7.5 + - release/0.7.6 environment: description: 'Environment to (re)deploy to' From 7d31cb1102c36c4b291eef8343e23386efe55734 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Mon, 30 Jun 2025 21:37:01 +0100 Subject: [PATCH 66/90] rm .github folder --- .github/workflows/build-and-deploy-docs.yml | 31 ---- .github/workflows/build-docs.yml | 28 ---- .github/workflows/ci_cd.yml | 176 -------------------- 3 files changed, 235 deletions(-) delete mode 100644 .github/workflows/build-and-deploy-docs.yml delete mode 100644 .github/workflows/build-docs.yml delete mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/build-and-deploy-docs.yml b/.github/workflows/build-and-deploy-docs.yml deleted file mode 100644 index 172fbd66..00000000 --- a/.github/workflows/build-and-deploy-docs.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Build docs with Sphinx and deploy to Github Pages" - -on: - push: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml deleted file mode 100644 index f1f25772..00000000 --- a/.github/workflows/build-docs.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "Build docs with Sphinx" - -on: - pull_request: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml deleted file mode 100644 index fadf1f17..00000000 --- a/.github/workflows/ci_cd.yml +++ /dev/null @@ -1,176 +0,0 @@ -name: Build & Deploy (CI/CD - DEV) - -concurrency: - group: development - cancel-in-progress: true - -on: - push: - branches: - - development - paths-ignore: - - 'README.md' - pull_request: - branches: - - development - workflow_dispatch: - -jobs: - - build_frontend: - - name: build frontend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install npm packages - run: | - cd frontend - npm install - - - name: Build & bundle - run: | - cd frontend - unset CI # ignore React warnings - npm run build - - build_backend: - - name: build backend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Fetch submodules - run: | - git clean -fdx -e ${{ vars.ENV_FILE }} -e 'redeploy.*.sh' -e 'docker/' - git submodule foreach --recursive 'git clean -fdx' - cd backend - cd apps - git submodule update --init --recursive - git submodule update --remote - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Create venv - run: | - cd backend - python3.11 -m venv venv - - - name: Install packages - run: | - cd backend - source venv/bin/activate - pip install --upgrade pip - pip install -r requirements.txt - - - name: Install ifcopenshell package (temp) - run: | - cd backend - source venv/bin/activate - # use version of ifcopenshell with desired schema parsing - # TODO: revert to pyPI when schema parsing is published in the future - wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.3-260bc80-linux64.zip" - mkdir -p venv/lib/python3.11/site-packages - unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - - - name: Check Django config - run: | - cd backend - source venv/bin/activate - python3 manage.py check - - - name: Run tests - run: | - cd backend - source venv/bin/activate - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps/ifc_validation_models --settings apps.ifc_validation_models.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_header_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_header_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_schema_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_bsdd_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - - deploy: - - name: deploy to server - needs: [build_frontend, build_backend] - if: github.event_name == 'push' - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - - name: Install sshpass - run: sudo apt-get install sshpass - - - name: Stop Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make stop - ENDSSH - - - name: Fetch sources & submodules - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ vars.BRANCH_NAME }} && git pull - git clean -fdx -e ${{ vars.ENV_FILE }} -e 'redeploy.*.sh' -e 'docker/' - git submodule foreach --recursive 'git clean -fdx' - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh - ENDSSH - - - name: Set VERSION - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - COMMIT_HASH=$(git rev-parse --short HEAD) - VERSION="${{ vars.VERSION }}" - echo "Set VERSION to ${VERSION}" - echo "Commit hash ${COMMIT_HASH}" - echo "${VERSION}" > .VERSION - ENDSSH - - - name: Build Docker images - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH - - - name: Start Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH From 88374abdf1259916e8f69fb30c62e2580b30a74e Mon Sep 17 00:00:00 2001 From: Geert Hesselink <54070862+Ghesselink@users.noreply.github.com> Date: Mon, 30 Jun 2025 21:38:19 +0100 Subject: [PATCH 67/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index e519b18e..6c99bb5a 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -26,6 +26,7 @@ on: - release/0.7.4 - release/0.7.5 - release/0.7.6 + - release/0.7.7 environment: description: 'Environment to (re)deploy to' From f86f2afd99b26c7c954c750f189711ab220301a4 Mon Sep 17 00:00:00 2001 From: Geert Hesselink <54070862+Ghesselink@users.noreply.github.com> Date: Sun, 6 Jul 2025 20:30:01 +0100 Subject: [PATCH 68/90] Certification in submodule list --- .gitmodules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitmodules b/.gitmodules index 72ed58ae..06d8d26c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,3 +6,6 @@ path = backend/apps/ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model branch = main +[submodule "backend/apps/ifc_validation/checks/signatures/store"] + path = backend/apps/ifc_validation/checks/signatures/store + url = https://github.com/buildingsmart-certificates/validation-service-vendor-certificates From c018746d8db1d5fadefb83ddd1c3413f37d76c25 Mon Sep 17 00:00:00 2001 From: Ghesselink Date: Sun, 6 Jul 2025 21:39:27 +0200 Subject: [PATCH 69/90] remove spf submodule from main --- backend/apps/ifc_validation/checks/step_file_parser | 1 - 1 file changed, 1 deletion(-) delete mode 160000 backend/apps/ifc_validation/checks/step_file_parser diff --git a/backend/apps/ifc_validation/checks/step_file_parser b/backend/apps/ifc_validation/checks/step_file_parser deleted file mode 160000 index 8a5349f5..00000000 --- a/backend/apps/ifc_validation/checks/step_file_parser +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8a5349f57eadcbc280f8578cf5f6a1c006189533 From 085944b1c1beb02432bee17f8f8d3dbcf087ac3b Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Mon, 7 Jul 2025 00:01:46 +0100 Subject: [PATCH 70/90] update documentation & add restart instructions --- Makefile | 24 +++++++++++++++++++++ README.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++-- backend/Makefile | 5 +++++ 3 files changed, 81 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 96403781..d2d80b25 100644 --- a/Makefile +++ b/Makefile @@ -74,3 +74,27 @@ fetch-modules: git submodule foreach git clean -f . git submodule foreach git reset --hard git submodule update --remote --recursive + + +BRANCH ?= main +SUBTREES := \ + backend/apps/ifc_validation/checks/ifc_gherkin_rules \ + backend/apps/ifc_validation/checks/ifc_gherkin_rules/ifc_validation_models \ + backend/apps/ifc_validation_models + +# Pulls the specified branch (default: 'main') for the main repo and all relevant submodules. +# The default branch is main unless specified otherwise (e.g. 'make checkout BRANCH=development') +.PHONY: checkout +checkout: + @echo "==> root repo (branch: $(BRANCH))" + @git checkout -q $(BRANCH) && git pull + + @echo "==> sub-repos (branch: $(BRANCH))" + @set -e; for d in $(SUBTREES); do \ + echo " → $$d"; \ + ( cd $$d && git checkout -q $(BRANCH) && git pull ); \ + done + + @echo "==> signatures/store (always on main)" + @( cd backend/apps/ifc_validation/checks/signatures/store && \ + git checkout -q main && git pull ) diff --git a/README.md b/README.md index 478cf1a2..53b4b945 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,10 @@ More scenario's exist - have a look at the various *make* files. ```shell mkdir bsi-validate cd bsi-validate -git clone https://github.com/buildingSMART/validate . +git clone https://github.com/buildingSMART/validate +cd validate +git checkout # if not main +make fetch-modules ``` 2. Make sure Docker is running. @@ -104,6 +107,22 @@ exit 7. Optionally, use a tool like curl or Postman to invoke API requests directly +8. Restart services after pulling updates +---------------------------------------- + +```shell +# 1 — Stop running containers +make stop # or: docker compose down + +# 2 — Get the latest code +make checkout # defaults to main +# or: make checkout BRANCH=development + +# 3 — Rebuild images (if Dockerfiles or base images changed) and start +docker compose up -d --build +``` + + ## Option 2 - Local debugging + infrastructure via Docker Compose (easiest to debug) 1. Clone this repo in a local folder @@ -111,7 +130,10 @@ exit ```shell mkdir bsi-validate cd bsi-validate -git clone https://github.com/buildingSMART/validate . +git clone https://github.com/buildingSMART/validate +cd validate +git checkout # if not main +make fetch-modules ``` 2. Make sure Docker is running. @@ -183,3 +205,31 @@ DJANGO_SUPERUSER_USERNAME=SYSTEM DJANGO_SUPERUSER_PASSWORD=system DJANGO_SUPERUS - Celery Flower UI: http://localhost:5555 10. Optionally, use a tool like curl or Postman to invoke API requests directly + +11. Restart local services after code updates +--------------------------------------- + +If there are code changes (locally or from GitHub), restart the worker — and optionally the backend and frontend if they were stopped. + +### 1. Stop running local services + +- In the terminal running the backend or frontend: press `Ctrl+C` +- To stop the worker gracefully, run in a new terminal: + +```shell +cd backend +make stop-worker +``` +### 2. Update code (if pulling from github) +```shell +make fetch-modules && make checkout +``` +### 3. Restart services +```shell +cd backend +make start-worker +make start-backend +make start-frontend +``` + + diff --git a/backend/Makefile b/backend/Makefile index 0ad402fe..580a78fe 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -61,6 +61,11 @@ start-worker4: start-worker-scheduler: $(PYTHON) -m celery --app=core worker --loglevel=DEBUG --concurrency 5 --task-events --beat +.PHONY: stop-worker +stop-worker: + -$(PYTHON) -m celery -A core control shutdown \ + --destination=worker@$(shell hostname) || true + test: test-models test-bsdd-task test-header-validation-task test-syntax-task test-syntax-header-validation-task test-schema-task test-models: From 32815c6a51632fc8f6be2bf9bef1a6202dd99754 Mon Sep 17 00:00:00 2001 From: Geert Hesselink <54070862+Ghesselink@users.noreply.github.com> Date: Wed, 16 Jul 2025 23:05:55 +0100 Subject: [PATCH 71/90] Release/0.7.7.1 in deployment script --- .github/workflows/build_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 6c99bb5a..ebe4c1f4 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -27,6 +27,7 @@ on: - release/0.7.5 - release/0.7.6 - release/0.7.7 + - release/0.7.7.1 environment: description: 'Environment to (re)deploy to' From 68921a0eb8a35c2cc51ca272c7bc1592b5e5e06a Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Thu, 17 Jul 2025 11:18:10 +0100 Subject: [PATCH 72/90] rm .github folder --- .github/workflows/build-and-deploy-docs.yml | 31 ---- .github/workflows/build-docs.yml | 28 ---- .github/workflows/ci_cd.yml | 176 -------------------- 3 files changed, 235 deletions(-) delete mode 100644 .github/workflows/build-and-deploy-docs.yml delete mode 100644 .github/workflows/build-docs.yml delete mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/build-and-deploy-docs.yml b/.github/workflows/build-and-deploy-docs.yml deleted file mode 100644 index 172fbd66..00000000 --- a/.github/workflows/build-and-deploy-docs.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Build docs with Sphinx and deploy to Github Pages" - -on: - push: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml deleted file mode 100644 index f1f25772..00000000 --- a/.github/workflows/build-docs.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "Build docs with Sphinx" - -on: - pull_request: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml deleted file mode 100644 index fadf1f17..00000000 --- a/.github/workflows/ci_cd.yml +++ /dev/null @@ -1,176 +0,0 @@ -name: Build & Deploy (CI/CD - DEV) - -concurrency: - group: development - cancel-in-progress: true - -on: - push: - branches: - - development - paths-ignore: - - 'README.md' - pull_request: - branches: - - development - workflow_dispatch: - -jobs: - - build_frontend: - - name: build frontend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install npm packages - run: | - cd frontend - npm install - - - name: Build & bundle - run: | - cd frontend - unset CI # ignore React warnings - npm run build - - build_backend: - - name: build backend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Fetch submodules - run: | - git clean -fdx -e ${{ vars.ENV_FILE }} -e 'redeploy.*.sh' -e 'docker/' - git submodule foreach --recursive 'git clean -fdx' - cd backend - cd apps - git submodule update --init --recursive - git submodule update --remote - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Create venv - run: | - cd backend - python3.11 -m venv venv - - - name: Install packages - run: | - cd backend - source venv/bin/activate - pip install --upgrade pip - pip install -r requirements.txt - - - name: Install ifcopenshell package (temp) - run: | - cd backend - source venv/bin/activate - # use version of ifcopenshell with desired schema parsing - # TODO: revert to pyPI when schema parsing is published in the future - wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.3-260bc80-linux64.zip" - mkdir -p venv/lib/python3.11/site-packages - unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - - - name: Check Django config - run: | - cd backend - source venv/bin/activate - python3 manage.py check - - - name: Run tests - run: | - cd backend - source venv/bin/activate - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps/ifc_validation_models --settings apps.ifc_validation_models.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_header_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_header_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_schema_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_bsdd_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - - deploy: - - name: deploy to server - needs: [build_frontend, build_backend] - if: github.event_name == 'push' - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - - name: Install sshpass - run: sudo apt-get install sshpass - - - name: Stop Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make stop - ENDSSH - - - name: Fetch sources & submodules - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ vars.BRANCH_NAME }} && git pull - git clean -fdx -e ${{ vars.ENV_FILE }} -e 'redeploy.*.sh' -e 'docker/' - git submodule foreach --recursive 'git clean -fdx' - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh - ENDSSH - - - name: Set VERSION - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - COMMIT_HASH=$(git rev-parse --short HEAD) - VERSION="${{ vars.VERSION }}" - echo "Set VERSION to ${VERSION}" - echo "Commit hash ${COMMIT_HASH}" - echo "${VERSION}" > .VERSION - ENDSSH - - - name: Build Docker images - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH - - - name: Start Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH From da48aac55fa42de4b8edd26a4c89373e46e9e594 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Thu, 17 Jul 2025 11:19:54 +0100 Subject: [PATCH 73/90] point to 0.7.7.1 submodule --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 51a6a5b0..0a0e66e7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,11 +1,11 @@ [submodule "backend/apps/ifc_validation/checks/ifc_gherkin_rules"] path = backend/apps/ifc_validation/checks/ifc_gherkin_rules url = https://github.com/buildingSMART/ifc-gherkin-rules - branch = development + branch = release/0.7.7.1 [submodule "backend/apps/ifc_validation_models"] path = backend/apps/ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model - branch = development + branch = release/0.7.7.1 [submodule "backend/apps/ifc_validation/checks/signatures/store"] path = backend/apps/ifc_validation/checks/signatures/store url = https://github.com/buildingsmart-certificates/validation-service-vendor-certificates From 5759363246f0e3a5b0f93d959b4c05403d42d7ec Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 24 Jul 2025 20:26:01 +0000 Subject: [PATCH 74/90] Update of submodules (bSI-Bot via GH action) --- backend/apps/ifc_validation/checks/ifc_gherkin_rules | 2 +- backend/apps/ifc_validation/checks/signatures/store | 2 +- backend/apps/ifc_validation_models | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/apps/ifc_validation/checks/ifc_gherkin_rules b/backend/apps/ifc_validation/checks/ifc_gherkin_rules index d4a3de6b..f3ed578f 160000 --- a/backend/apps/ifc_validation/checks/ifc_gherkin_rules +++ b/backend/apps/ifc_validation/checks/ifc_gherkin_rules @@ -1 +1 @@ -Subproject commit d4a3de6b348e953638b9e407b5874e17d09721bd +Subproject commit f3ed578f5568790482bb22ffdac6006aac7178de diff --git a/backend/apps/ifc_validation/checks/signatures/store b/backend/apps/ifc_validation/checks/signatures/store index 16359eac..ebd2058b 160000 --- a/backend/apps/ifc_validation/checks/signatures/store +++ b/backend/apps/ifc_validation/checks/signatures/store @@ -1 +1 @@ -Subproject commit 16359eac0ce07d5e898c98802d357171a7484453 +Subproject commit ebd2058b008c997b4805ec59553d319544670be6 diff --git a/backend/apps/ifc_validation_models b/backend/apps/ifc_validation_models index 37a0f609..237a0aa6 160000 --- a/backend/apps/ifc_validation_models +++ b/backend/apps/ifc_validation_models @@ -1 +1 @@ -Subproject commit 37a0f609aa7eace5eafd3f513e60e4a3f1770e16 +Subproject commit 237a0aa6a625956a3e1137a225e68d16cad303a7 From c5236548cd6639cc40fa02b94701319dfdaa67af Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Mon, 28 Jul 2025 22:07:36 +0100 Subject: [PATCH 75/90] rm .github folder --- .github/workflows/build-and-deploy-docs.yml | 31 ---- .github/workflows/build-docs.yml | 28 ---- .github/workflows/ci_cd.yml | 176 -------------------- 3 files changed, 235 deletions(-) delete mode 100644 .github/workflows/build-and-deploy-docs.yml delete mode 100644 .github/workflows/build-docs.yml delete mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/build-and-deploy-docs.yml b/.github/workflows/build-and-deploy-docs.yml deleted file mode 100644 index 172fbd66..00000000 --- a/.github/workflows/build-and-deploy-docs.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Build docs with Sphinx and deploy to Github Pages" - -on: - push: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml deleted file mode 100644 index f1f25772..00000000 --- a/.github/workflows/build-docs.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "Build docs with Sphinx" - -on: - pull_request: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml deleted file mode 100644 index fadf1f17..00000000 --- a/.github/workflows/ci_cd.yml +++ /dev/null @@ -1,176 +0,0 @@ -name: Build & Deploy (CI/CD - DEV) - -concurrency: - group: development - cancel-in-progress: true - -on: - push: - branches: - - development - paths-ignore: - - 'README.md' - pull_request: - branches: - - development - workflow_dispatch: - -jobs: - - build_frontend: - - name: build frontend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install npm packages - run: | - cd frontend - npm install - - - name: Build & bundle - run: | - cd frontend - unset CI # ignore React warnings - npm run build - - build_backend: - - name: build backend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Fetch submodules - run: | - git clean -fdx -e ${{ vars.ENV_FILE }} -e 'redeploy.*.sh' -e 'docker/' - git submodule foreach --recursive 'git clean -fdx' - cd backend - cd apps - git submodule update --init --recursive - git submodule update --remote - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Create venv - run: | - cd backend - python3.11 -m venv venv - - - name: Install packages - run: | - cd backend - source venv/bin/activate - pip install --upgrade pip - pip install -r requirements.txt - - - name: Install ifcopenshell package (temp) - run: | - cd backend - source venv/bin/activate - # use version of ifcopenshell with desired schema parsing - # TODO: revert to pyPI when schema parsing is published in the future - wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.3-260bc80-linux64.zip" - mkdir -p venv/lib/python3.11/site-packages - unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - - - name: Check Django config - run: | - cd backend - source venv/bin/activate - python3 manage.py check - - - name: Run tests - run: | - cd backend - source venv/bin/activate - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps/ifc_validation_models --settings apps.ifc_validation_models.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_header_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_header_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_schema_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_bsdd_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - - deploy: - - name: deploy to server - needs: [build_frontend, build_backend] - if: github.event_name == 'push' - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - - name: Install sshpass - run: sudo apt-get install sshpass - - - name: Stop Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make stop - ENDSSH - - - name: Fetch sources & submodules - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ vars.BRANCH_NAME }} && git pull - git clean -fdx -e ${{ vars.ENV_FILE }} -e 'redeploy.*.sh' -e 'docker/' - git submodule foreach --recursive 'git clean -fdx' - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh - ENDSSH - - - name: Set VERSION - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - COMMIT_HASH=$(git rev-parse --short HEAD) - VERSION="${{ vars.VERSION }}" - echo "Set VERSION to ${VERSION}" - echo "Commit hash ${COMMIT_HASH}" - echo "${VERSION}" > .VERSION - ENDSSH - - - name: Build Docker images - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH - - - name: Start Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH From 5a595807ed028abb097af414fd80d0cef424a9df Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Mon, 28 Jul 2025 22:09:01 +0100 Subject: [PATCH 76/90] checkout release/0.7.8 submodules --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 51a6a5b0..f6dc7416 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,11 +1,11 @@ [submodule "backend/apps/ifc_validation/checks/ifc_gherkin_rules"] path = backend/apps/ifc_validation/checks/ifc_gherkin_rules url = https://github.com/buildingSMART/ifc-gherkin-rules - branch = development + branch = release/0.7.8 [submodule "backend/apps/ifc_validation_models"] path = backend/apps/ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model - branch = development + branch = release/0.7.8 [submodule "backend/apps/ifc_validation/checks/signatures/store"] path = backend/apps/ifc_validation/checks/signatures/store url = https://github.com/buildingsmart-certificates/validation-service-vendor-certificates From 1552795ff8df5867808fa29634ec44e7c94f9691 Mon Sep 17 00:00:00 2001 From: Geert Hesselink <54070862+Ghesselink@users.noreply.github.com> Date: Mon, 28 Jul 2025 22:09:32 +0100 Subject: [PATCH 77/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index ebe4c1f4..2ca1685a 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -28,6 +28,7 @@ on: - release/0.7.6 - release/0.7.7 - release/0.7.7.1 + - release/0.7.8 environment: description: 'Environment to (re)deploy to' From 3fafd0f8bc0668194ec79aec887042422cc09edb Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Thu, 31 Jul 2025 12:12:33 +0100 Subject: [PATCH 78/90] rm gh workflows, set correct submodule --- .github/workflows/build-and-deploy-docs.yml | 31 --------------------- .github/workflows/build-docs.yml | 28 ------------------- .gitmodules | 4 +-- 3 files changed, 2 insertions(+), 61 deletions(-) delete mode 100644 .github/workflows/build-and-deploy-docs.yml delete mode 100644 .github/workflows/build-docs.yml diff --git a/.github/workflows/build-and-deploy-docs.yml b/.github/workflows/build-and-deploy-docs.yml deleted file mode 100644 index 172fbd66..00000000 --- a/.github/workflows/build-and-deploy-docs.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Build docs with Sphinx and deploy to Github Pages" - -on: - push: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml deleted file mode 100644 index f1f25772..00000000 --- a/.github/workflows/build-docs.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "Build docs with Sphinx" - -on: - pull_request: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' diff --git a/.gitmodules b/.gitmodules index 51a6a5b0..bd111d44 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,11 +1,11 @@ [submodule "backend/apps/ifc_validation/checks/ifc_gherkin_rules"] path = backend/apps/ifc_validation/checks/ifc_gherkin_rules url = https://github.com/buildingSMART/ifc-gherkin-rules - branch = development + branch = release/0.7.8.1 [submodule "backend/apps/ifc_validation_models"] path = backend/apps/ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model - branch = development + branch = release/0.7.8.1 [submodule "backend/apps/ifc_validation/checks/signatures/store"] path = backend/apps/ifc_validation/checks/signatures/store url = https://github.com/buildingsmart-certificates/validation-service-vendor-certificates From 561315fd5789aca2c64af1f50be553bd7c4f39a5 Mon Sep 17 00:00:00 2001 From: Geert Hesselink <54070862+Ghesselink@users.noreply.github.com> Date: Thu, 31 Jul 2025 12:13:31 +0100 Subject: [PATCH 79/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 2ca1685a..7e7765d8 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -29,6 +29,9 @@ on: - release/0.7.7 - release/0.7.7.1 - release/0.7.8 + - release/0.7.8.1 + - release/0.7.9 + - release/0.8.0 environment: description: 'Environment to (re)deploy to' From 209aeae6945ad22456a7e29ba95a2518b34fa158 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Thu, 31 Jul 2025 16:21:37 +0100 Subject: [PATCH 80/90] rm debug_toolbar outside dev --- backend/core/settings.py | 1 - backend/core/urls.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/backend/core/settings.py b/backend/core/settings.py index 357b78af..8d2ea43f 100644 --- a/backend/core/settings.py +++ b/backend/core/settings.py @@ -96,7 +96,6 @@ "django.contrib.auth.middleware.AuthenticationMiddleware", "django.contrib.messages.middleware.MessageMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware", - "debug_toolbar.middleware.DebugToolbarMiddleware", ] if DEVELOPMENT: diff --git a/backend/core/urls.py b/backend/core/urls.py index d1bb6706..bb6a906b 100644 --- a/backend/core/urls.py +++ b/backend/core/urls.py @@ -35,8 +35,6 @@ path('logout/', logout, name='logout'), path('callback/', callback, name='callback'), - # Debug toolbar - path("__debug__/", include("debug_toolbar.urls")), ] if DEVELOPMENT: From 19babf12791e74714b54e3f66a93e7f4d2675bbb Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Mon, 25 Aug 2025 20:38:48 +0100 Subject: [PATCH 81/90] prepare for release --- .github/workflows/build-and-deploy-docs.yml | 31 ---- .github/workflows/build-docs.yml | 28 ---- .github/workflows/ci_cd.yml | 173 -------------------- .gitmodules | 4 +- 4 files changed, 2 insertions(+), 234 deletions(-) delete mode 100644 .github/workflows/build-and-deploy-docs.yml delete mode 100644 .github/workflows/build-docs.yml delete mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/build-and-deploy-docs.yml b/.github/workflows/build-and-deploy-docs.yml deleted file mode 100644 index 172fbd66..00000000 --- a/.github/workflows/build-and-deploy-docs.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Build docs with Sphinx and deploy to Github Pages" - -on: - push: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml deleted file mode 100644 index f1f25772..00000000 --- a/.github/workflows/build-docs.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "Build docs with Sphinx" - -on: - pull_request: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml deleted file mode 100644 index e3272ad4..00000000 --- a/.github/workflows/ci_cd.yml +++ /dev/null @@ -1,173 +0,0 @@ -name: Build & Deploy (CI/CD - DEV) - -concurrency: - group: development - cancel-in-progress: true - -on: - push: - branches: - - development - paths-ignore: - - 'README.md' - workflow_dispatch: - -jobs: - - build_frontend: - - name: build frontend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install npm packages - run: | - cd frontend - npm install - - - name: Build & bundle - run: | - cd frontend - unset CI # ignore React warnings - npm run build - - build_backend: - - name: build backend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Fetch submodules - run: | - git clean -fdx -e ${{ vars.ENV_FILE }} -e 'redeploy.*.sh' -e 'docker/' - git submodule foreach --recursive 'git clean -fdx' - cd backend - cd apps - git submodule update --init --recursive - git submodule update --remote - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Create venv - run: | - cd backend - python3.11 -m venv venv - - - name: Install packages - run: | - cd backend - source venv/bin/activate - pip install --upgrade pip - find . -name 'requirements.txt' -exec pip install -r {} \; - - - name: Install ifcopenshell package (temp) - run: | - cd backend - source venv/bin/activate - # use version of ifcopenshell with desired schema parsing - # TODO: revert to pyPI when schema parsing is published in the future - wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.3-260bc80-linux64.zip" - mkdir -p venv/lib/python3.11/site-packages - unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - - - name: Check Django config - run: | - cd backend - source venv/bin/activate - python3 manage.py check - - - name: Run tests - run: | - cd backend - source venv/bin/activate - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps/ifc_validation_models --settings apps.ifc_validation_models.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_header_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_header_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_schema_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_bsdd_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - - deploy: - - name: deploy to server - needs: [build_frontend, build_backend] - if: github.event_name == 'push' - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - - name: Install sshpass - run: sudo apt-get install sshpass - - - name: Stop Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make stop - ENDSSH - - - name: Fetch sources & submodules - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ vars.BRANCH_NAME }} && git pull - git clean -fdx -e ${{ vars.ENV_FILE }} -e 'redeploy.*.sh' -e 'docker/' - git submodule foreach --recursive 'git clean -fdx' - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh - ENDSSH - - - name: Set VERSION - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - COMMIT_HASH=$(git rev-parse --short HEAD) - VERSION="${{ vars.VERSION }}" - echo "Set VERSION to ${VERSION}" - echo "Commit hash ${COMMIT_HASH}" - echo "${VERSION}" > .VERSION - ENDSSH - - - name: Build Docker images - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH - - - name: Start Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH diff --git a/.gitmodules b/.gitmodules index 51a6a5b0..7364bd26 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,11 +1,11 @@ [submodule "backend/apps/ifc_validation/checks/ifc_gherkin_rules"] path = backend/apps/ifc_validation/checks/ifc_gherkin_rules url = https://github.com/buildingSMART/ifc-gherkin-rules - branch = development + branch = release/0.7.9 [submodule "backend/apps/ifc_validation_models"] path = backend/apps/ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model - branch = development + branch = release/0.7.9 [submodule "backend/apps/ifc_validation/checks/signatures/store"] path = backend/apps/ifc_validation/checks/signatures/store url = https://github.com/buildingsmart-certificates/validation-service-vendor-certificates From 6aec92314d826d86c55bb6d9a01e715070d8550b Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Thu, 28 Aug 2025 20:04:35 +0100 Subject: [PATCH 82/90] add defensive fetching on deployment --- .github/workflows/build_deploy.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 7e7765d8..03e2825d 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -156,10 +156,13 @@ jobs: ssh ssh_host 'cd ${{ vars.REPO_CLONE_PATH }} sudo make stop' - - name: Fetch sources & submodules - run: | - ssh ssh_host 'cd ${{ vars.REPO_CLONE_PATH }} - git pull && git checkout -q ${{ inputs.branch }} && git pull + - name: Fetch sources & submodules + run: | + ssh ssh_host 'set -euo pipefail; \ + cd ${{ vars.REPO_CLONE_PATH }} && \ + git pull && \ + git checkout -q ${{ inputs.branch }} && \ + git pull && \ sudo make fetch-modules' - name: Checkout correct branches From 99a405d1c4890aa23f8a54643177f9fe62874e6c Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Thu, 28 Aug 2025 20:22:25 +0100 Subject: [PATCH 83/90] fix identation error --- .github/workflows/build_deploy.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 03e2825d..a0028d9b 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -156,14 +156,14 @@ jobs: ssh ssh_host 'cd ${{ vars.REPO_CLONE_PATH }} sudo make stop' - - name: Fetch sources & submodules - run: | - ssh ssh_host 'set -euo pipefail; \ - cd ${{ vars.REPO_CLONE_PATH }} && \ - git pull && \ - git checkout -q ${{ inputs.branch }} && \ - git pull && \ - sudo make fetch-modules' + - name: Fetch sources & submodules + run: | + ssh ssh_host 'set -euo pipefail; \ + cd ${{ vars.REPO_CLONE_PATH }} && \ + git pull && \ + git checkout -q ${{ inputs.branch }} && \ + git pull && \ + sudo make fetch-modules' - name: Checkout correct branches run: | From d6c87b5416a02406b2738ffe4fbbc305c1ce493b Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Mon, 15 Sep 2025 19:58:11 +0100 Subject: [PATCH 84/90] prepare for release - v0.8.0 --- .github/workflows/build-and-deploy-docs.yml | 31 ---- .github/workflows/build-docs.yml | 28 ---- .github/workflows/ci.yml | 105 ------------ .github/workflows/ci_cd.yml | 172 -------------------- .gitmodules | 4 +- 5 files changed, 2 insertions(+), 338 deletions(-) delete mode 100644 .github/workflows/build-and-deploy-docs.yml delete mode 100644 .github/workflows/build-docs.yml delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/build-and-deploy-docs.yml b/.github/workflows/build-and-deploy-docs.yml deleted file mode 100644 index 172fbd66..00000000 --- a/.github/workflows/build-and-deploy-docs.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Build docs with Sphinx and deploy to Github Pages" - -on: - push: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml deleted file mode 100644 index f1f25772..00000000 --- a/.github/workflows/build-docs.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "Build docs with Sphinx" - -on: - pull_request: - branches: docs/gh-pages - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - pages: write - env: - INPUT_DOCS-FOLDER: docs - steps: - - uses: actions/checkout@v4 - - name: Build HTML - uses: civilx64/sphinx-action@master - with: - docs-folder: docs/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload html docs - path: './docs/_build/html' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index be381f35..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,105 +0,0 @@ -name: Testing (CI - DEV) - -concurrency: - group: development - cancel-in-progress: true - -on: - pull_request: - branches: - - development - paths-ignore: - - 'README.md' - workflow_dispatch: - -jobs: - - build_frontend: - - name: build frontend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install npm packages - run: | - cd frontend - npm install - - - name: Build & bundle - run: | - cd frontend - unset CI # ignore React warnings - npm run build - - build_backend: - - name: build backend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Fetch submodules - run: | - git clean -fdx -e ${{ vars.ENV_FILE }} -e 'redeploy.*.sh' -e 'docker/' - git submodule foreach --recursive 'git clean -fdx' - cd backend - cd apps - git submodule update --init --recursive - git submodule update --remote - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Create venv - run: | - cd backend - python3.11 -m venv venv - - - name: Install packages - run: | - cd backend - source venv/bin/activate - pip install --upgrade pip - find . -name 'requirements.txt' -exec pip install -r {} \; - - - name: Install ifcopenshell package (temp) - run: | - cd backend - source venv/bin/activate - # use version of ifcopenshell with desired schema parsing - # TODO: revert to pyPI when schema parsing is published in the future - wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.4-6924012-linux64.zip" - mkdir -p venv/lib/python3.11/site-packages - unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - - - name: Check Django config - run: | - cd backend - source venv/bin/activate - python3 manage.py check - - - name: Run tests - run: | - cd backend - source venv/bin/activate - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps/ifc_validation_models --settings apps.ifc_validation_models.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_header_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_header_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_schema_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 \ No newline at end of file diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml deleted file mode 100644 index bd22748e..00000000 --- a/.github/workflows/ci_cd.yml +++ /dev/null @@ -1,172 +0,0 @@ -name: Build & Deploy (CI/CD - DEV) - -concurrency: - group: development - cancel-in-progress: true - -on: - push: - branches: - - development - paths-ignore: - - 'README.md' - workflow_dispatch: - -jobs: - - build_frontend: - - name: build frontend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install npm packages - run: | - cd frontend - npm install - - - name: Build & bundle - run: | - cd frontend - unset CI # ignore React warnings - npm run build - - build_backend: - - name: build backend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Fetch submodules - run: | - git clean -fdx -e ${{ vars.ENV_FILE }} -e 'redeploy.*.sh' -e 'docker/' - git submodule foreach --recursive 'git clean -fdx' - cd backend - cd apps - git submodule update --init --recursive - git submodule update --remote - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Create venv - run: | - cd backend - python3.11 -m venv venv - - - name: Install packages - run: | - cd backend - source venv/bin/activate - pip install --upgrade pip - find . -name 'requirements.txt' -exec pip install -r {} \; - - - name: Install ifcopenshell package (temp) - run: | - cd backend - source venv/bin/activate - # use version of ifcopenshell with desired schema parsing - # TODO: revert to pyPI when schema parsing is published in the future - wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.4-6924012-linux64.zip" - mkdir -p venv/lib/python3.11/site-packages - unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - - - name: Check Django config - run: | - cd backend - source venv/bin/activate - python3 manage.py check - - - name: Run tests - run: | - cd backend - source venv/bin/activate - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps/ifc_validation_models --settings apps.ifc_validation_models.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_header_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_header_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_schema_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - - deploy: - - name: deploy to server - needs: [build_frontend, build_backend] - if: github.event_name == 'push' - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - - name: Install sshpass - run: sudo apt-get install sshpass - - - name: Stop Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make stop - ENDSSH - - - name: Fetch sources & submodules - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ vars.BRANCH_NAME }} && git pull - git clean -fdx -e ${{ vars.ENV_FILE }} -e 'redeploy.*.sh' -e 'docker/' - git submodule foreach --recursive 'git clean -fdx' - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh - ENDSSH - - - name: Set VERSION - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - COMMIT_HASH=$(git rev-parse --short HEAD) - VERSION="${{ vars.VERSION }}" - echo "Set VERSION to ${VERSION}" - echo "Commit hash ${COMMIT_HASH}" - echo "${VERSION}" > .VERSION - ENDSSH - - - name: Build Docker images - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH - - - name: Start Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH diff --git a/.gitmodules b/.gitmodules index 51a6a5b0..9576fba8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,11 +1,11 @@ [submodule "backend/apps/ifc_validation/checks/ifc_gherkin_rules"] path = backend/apps/ifc_validation/checks/ifc_gherkin_rules url = https://github.com/buildingSMART/ifc-gherkin-rules - branch = development + branch = release/0.8.0 [submodule "backend/apps/ifc_validation_models"] path = backend/apps/ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model - branch = development + branch = release/0.8.0 [submodule "backend/apps/ifc_validation/checks/signatures/store"] path = backend/apps/ifc_validation/checks/signatures/store url = https://github.com/buildingsmart-certificates/validation-service-vendor-certificates From 65c97280bb845b3984c0581c6a89531de62a3092 Mon Sep 17 00:00:00 2001 From: Geert Hesselink Date: Mon, 29 Sep 2025 22:03:58 +0100 Subject: [PATCH 85/90] prepare for release/0.8.1 --- .github/workflows/ci_cd.yml | 176 ------------------------------------ .gitmodules | 4 +- 2 files changed, 2 insertions(+), 178 deletions(-) delete mode 100644 .github/workflows/ci_cd.yml diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml deleted file mode 100644 index d1d12cbe..00000000 --- a/.github/workflows/ci_cd.yml +++ /dev/null @@ -1,176 +0,0 @@ -name: Build & Deploy (CI/CD - DEV) - -concurrency: - group: development - cancel-in-progress: true - -on: - push: - branches: - - development - paths-ignore: - - 'README.md' - pull_request: - branches: - - development - workflow_dispatch: - -jobs: - - build_frontend: - - name: build frontend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install npm packages - run: | - cd frontend - npm install - - - name: Build & bundle - run: | - cd frontend - unset CI # ignore React warnings - npm run build - - build_backend: - - name: build backend - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Fetch submodules - run: | - git clean -fdx -e ${{ vars.ENV_FILE }} -e 'redeploy.*.sh' -e 'docker/' - git submodule foreach --recursive 'git clean -fdx' - cd backend - cd apps - git submodule update --init --recursive - git submodule update --remote - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Create venv - run: | - cd backend - python3.11 -m venv venv - - - name: Install packages - run: | - cd backend - source venv/bin/activate - pip install --upgrade pip - find . -name 'requirements.txt' -exec pip install -r {} \; - - - name: Install ifcopenshell package (temp) - run: | - cd backend - source venv/bin/activate - # use version of ifcopenshell with desired schema parsing - # TODO: revert to pyPI when schema parsing is published in the future - wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.3-260bc80-linux64.zip" - mkdir -p venv/lib/python3.11/site-packages - unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip - - - name: Check Django config - run: | - cd backend - source venv/bin/activate - python3 manage.py check - - - name: Run tests - run: | - cd backend - source venv/bin/activate - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps/ifc_validation_models --settings apps.ifc_validation_models.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_header_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_header_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_syntax_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_schema_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - MEDIA_ROOT=./apps/ifc_validation/fixtures python3 manage.py test apps.ifc_validation.tests.tests_bsdd_validation_task --settings apps.ifc_validation.test_settings --debug-mode --verbosity 3 - - deploy: - - name: deploy to server - needs: [build_frontend, build_backend] - if: github.event_name == 'push' - runs-on: ubuntu-latest - environment: - name: development - - steps: - - name: Set up SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 22 ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - - name: Install sshpass - run: sudo apt-get install sshpass - - - name: Stop Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make stop - ENDSSH - - - name: Fetch sources & submodules - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - git checkout -q ${{ vars.BRANCH_NAME }} && git pull - git clean -fdx -e ${{ vars.ENV_FILE }} -e 'redeploy.*.sh' -e 'docker/' - git submodule foreach --recursive 'git clean -fdx' - sudo make fetch-modules - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation/checks/ifc_gherkin_rules && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ./ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }}/backend/apps/ifc_validation_models && git checkout -q ${{ vars.BRANCH_NAME }} && git pull - cd ${{ vars.REPO_CLONE_PATH }} - ./check-submodules.sh - ENDSSH - - - name: Set VERSION - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - COMMIT_HASH=$(git rev-parse --short HEAD) - VERSION="${{ vars.VERSION }}" - echo "Set VERSION to ${VERSION}" - echo "Commit hash ${COMMIT_HASH}" - echo "${VERSION}" > .VERSION - ENDSSH - - - name: Build Docker images - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo make rebuild - ENDSSH - - - name: Start Docker containers - run: | - sshpass ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} bash <<'ENDSSH' - cd ${{ vars.REPO_CLONE_PATH }} - sudo docker compose -f ${{ vars.DOCKER_COMPOSE_FILE }} --env-file ${{ vars.ENV_FILE }} up -d - ENDSSH diff --git a/.gitmodules b/.gitmodules index bd111d44..1ba19b84 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,11 +1,11 @@ [submodule "backend/apps/ifc_validation/checks/ifc_gherkin_rules"] path = backend/apps/ifc_validation/checks/ifc_gherkin_rules url = https://github.com/buildingSMART/ifc-gherkin-rules - branch = release/0.7.8.1 + branch = release/0.8.1 [submodule "backend/apps/ifc_validation_models"] path = backend/apps/ifc_validation_models url = https://github.com/buildingSMART/ifc-validation-data-model - branch = release/0.7.8.1 + branch = release/0.8.1 [submodule "backend/apps/ifc_validation/checks/signatures/store"] path = backend/apps/ifc_validation/checks/signatures/store url = https://github.com/buildingsmart-certificates/validation-service-vendor-certificates From 64bc14c779569f948635add6d9d103b537e5b0d3 Mon Sep 17 00:00:00 2001 From: Geert Hesselink <54070862+Ghesselink@users.noreply.github.com> Date: Mon, 29 Sep 2025 22:05:09 +0100 Subject: [PATCH 86/90] Update build_deploy.yml --- .github/workflows/build_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index a0028d9b..7b904e63 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -32,6 +32,7 @@ on: - release/0.7.8.1 - release/0.7.9 - release/0.8.0 + - release/0.8.1 environment: description: 'Environment to (re)deploy to' From 34b7dce43c79496b992d9b3804fa08e8e9c3d780 Mon Sep 17 00:00:00 2001 From: Raphael <155643707+rw-bsi@users.noreply.github.com> Date: Mon, 10 Nov 2025 23:32:49 +0000 Subject: [PATCH 87/90] Add release version 0.8.2 to deployment workflow --- .github/workflows/build_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 7b904e63..64552ec2 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -33,6 +33,7 @@ on: - release/0.7.9 - release/0.8.0 - release/0.8.1 + - release/0.8.2 environment: description: 'Environment to (re)deploy to' From bf7f66c7b79d834269a325fda5d17991d9396ff4 Mon Sep 17 00:00:00 2001 From: Geert Hesselink <54070862+Ghesselink@users.noreply.github.com> Date: Tue, 9 Dec 2025 18:42:18 +0100 Subject: [PATCH 88/90] Add release version 0.8.3 to deployment workflow --- .github/workflows/build_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml index 64552ec2..0de9242a 100644 --- a/.github/workflows/build_deploy.yml +++ b/.github/workflows/build_deploy.yml @@ -34,6 +34,7 @@ on: - release/0.8.0 - release/0.8.1 - release/0.8.2 + - release/0.8.3 environment: description: 'Environment to (re)deploy to' From a50ab59115f837af90e2908141782ff85f5cebfb Mon Sep 17 00:00:00 2001 From: "geert.hess@gmail.com" Date: Tue, 9 Dec 2025 19:55:16 +0000 Subject: [PATCH 89/90] update submodule --- backend/apps/ifc_validation_models | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/apps/ifc_validation_models b/backend/apps/ifc_validation_models index 49cea3b8..b74a9d22 160000 --- a/backend/apps/ifc_validation_models +++ b/backend/apps/ifc_validation_models @@ -1 +1 @@ -Subproject commit 49cea3b83d3f38adef25b137b2857dd63332150a +Subproject commit b74a9d22e0f6d2e5240d76c0a8360c6678d3e102 From 3c6c5bc36f547650d2159b0cc7f3526ff3d7fd35 Mon Sep 17 00:00:00 2001 From: semon wang Date: Thu, 11 Dec 2025 10:52:22 +0800 Subject: [PATCH 90/90] refactor sidemenu --- frontend/src/SideMenu.js | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/frontend/src/SideMenu.js b/frontend/src/SideMenu.js index 1b5791d1..70505de2 100644 --- a/frontend/src/SideMenu.js +++ b/frontend/src/SideMenu.js @@ -21,26 +21,39 @@ const drawerWidth = 240; export default function SideMenu() { const context = useContext(PageContext); + + const menuItems = [{ + text: "Home", + href: context.sandboxId ? `/sandbox/${context.sandboxId}` : "/", + icon: , + displayText: "Home", + }, + { + text: "Dashboard", + href: context.sandboxId ? `/sandbox/dashboard/${context.sandboxId}` : "/dashboard", + icon: , + displayText: "Validation", + },]; + return ( - - + - {['Home', 'Dashboard'].map((text, index) => ( - - + {menuItems.map((item, index) => ( + + - {text === "Home" ? : } + {item.icon} - + ))}