Skip to content

Commit b35736f

Browse files
committed
v1.47: Standardize directory structure to use custom_apps path following Nextcloud best practices
1 parent 0eaf0bc commit b35736f

2 files changed

Lines changed: 28 additions & 26 deletions

File tree

.github/workflows/COMPREHENSIVE_DOCUMENTATION.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ This document tracks the evolution of OpenConnector's GitHub Actions workflows f
66
---
77

88
## 🚀 Version
9-
**Current Version:** 1.45 - Enhanced Autoloader Generation with Improved Class Mapping
9+
**Current Version:** 1.47 - Standardized Directory Structure with Custom Apps Path
1010
**Date:** October 3, 2025
1111
**Status:** 🔄 Testing In Progress
12-
**Approach:** Use app:install as primary method + force migration execution by disable/enable + enhanced database verification with proper MariaDB container connection + fixed autoload generation inside container + timeout protection for hanging commands + enhanced diagnostics to identify autoload file location issues + Nextcloud app:update for proper autoloader generation + extended timeouts for progress bar issues + early autoloader check after app installation + timing fix for background autoloader generation + fixed invalid --force flag + enhanced class existence checks + improved timing with longer delays
12+
**Approach:** Use app:install as primary method + force migration execution by disable/enable + enhanced database verification with proper MariaDB container connection + fixed autoload generation inside container + timeout protection for hanging commands + enhanced diagnostics to identify autoload file location issues + Nextcloud app:update for proper autoloader generation + extended timeouts for progress bar issues + early autoloader check after app installation + timing fix for background autoloader generation + fixed invalid --force flag + enhanced class existence checks + improved timing with longer delays + standardized directory structure using custom_apps path
1313

1414
## 🎯 Strategy
1515
Run unit tests inside a real Nextcloud Docker container with comprehensive diagnostics and host-based autoloader generation to ensure proper class loading and test execution.
@@ -92,6 +92,16 @@ Run unit tests inside a real Nextcloud Docker container with comprehensive diagn
9292
### Future Versions
9393
*This section will be updated as new versions are released*
9494

95+
### Version 1.47 - Standardized Directory Structure with Custom Apps Path
96+
**Date:** October 3, 2025
97+
**Status:** 🔄 Testing In Progress
98+
**Changes:**
99+
- 📁 **Standardized Directory Structure** - Updated workflow to use `/var/www/html/custom_apps/` instead of `/var/www/html/apps-extra/` for better Nextcloud compatibility
100+
- 🏗️ **Improved App Installation Path** - Changed app copy destination from `apps-extra/openconnector` to `custom_apps/openconnector` following Nextcloud standards
101+
- 🔧 **Updated All References** - Updated all file path references throughout both tests and quality jobs to use the new directory structure
102+
- 📋 **Enhanced Diagnostics** - Updated diagnostic messages to reflect the new directory structure for better troubleshooting
103+
- 🎯 **Nextcloud Best Practices** - Aligns with Nextcloud's recommended directory structure for custom applications
104+
95105
### Version 1.45 - Enhanced Autoloader Generation with Improved Class Mapping
96106
**Date:** October 3, 2025
97107
**Status:** 🔄 Testing In Progress

.github/workflows/ci.yml

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,9 @@ jobs:
137137
timeout 600 bash -c 'until curl -sSf http://localhost:8080/status.php | grep -q "installed.*true"; do echo "Waiting for Nextcloud to start..."; sleep 10; done'
138138
echo "Nextcloud is fully initialized and ready!"
139139
140-
# Create apps-extra directory in Nextcloud container
141-
echo "Creating apps-extra directory in Nextcloud container..."
142-
docker exec nextcloud-test mkdir -p /var/www/html/apps-extra
143-
144140
# Copy the OpenConnector app into the container
145141
echo "Copying OpenConnector app into Nextcloud container..."
146-
docker cp . nextcloud-test:/var/www/html/apps-extra/openconnector
142+
docker cp . nextcloud-test:/var/www/html/custom_apps/openconnector
147143
148144
# Wait a bit more for Nextcloud to fully process the app installation
149145
echo "Waiting for app installation to complete..."
@@ -214,15 +210,15 @@ jobs:
214210
215211
# Check if app directory exists
216212
echo "Checking if OpenConnector app directory exists..."
217-
docker exec nextcloud-test bash -c "ls -la /var/www/html/apps-extra/openconnector/"
213+
docker exec nextcloud-test bash -c "ls -la /var/www/html/custom_apps/openconnector/"
218214
219215
# List available apps
220216
echo "Listing available apps..."
221217
docker exec nextcloud-test bash -c "cd /var/www/html && php occ app:list"
222218
223219
# Move app to correct location for Nextcloud
224220
echo "Moving app to correct location for Nextcloud..."
225-
docker exec nextcloud-test bash -c "cp -r /var/www/html/apps-extra/openconnector /var/www/html/apps/"
221+
docker exec nextcloud-test bash -c "cp -r /var/www/html/custom_apps/openconnector /var/www/html/apps/"
226222
echo "App moved to /var/www/html/apps/openconnector"
227223
228224
# Install app dependencies BEFORE enabling the app
@@ -397,9 +393,9 @@ jobs:
397393
398394
# Check app structure and files
399395
echo "Checking app structure and files..."
400-
docker exec nextcloud-test bash -c "ls -la /var/www/html/apps-extra/openconnector/"
401-
docker exec nextcloud-test bash -c "ls -la /var/www/html/apps-extra/openconnector/appinfo/"
402-
docker exec nextcloud-test bash -c "cat /var/www/html/apps-extra/openconnector/appinfo/info.xml | head -10"
396+
docker exec nextcloud-test bash -c "ls -la /var/www/html/custom_apps/openconnector/"
397+
docker exec nextcloud-test bash -c "ls -la /var/www/html/custom_apps/openconnector/appinfo/"
398+
docker exec nextcloud-test bash -c "cat /var/www/html/custom_apps/openconnector/appinfo/info.xml | head -10"
403399
404400
# Check if app is in the right location for Nextcloud
405401
echo "Checking if app is in correct location..."
@@ -640,7 +636,7 @@ jobs:
640636
641637
# Check if app is in both locations
642638
echo "Checking app locations..."
643-
docker exec nextcloud-test bash -c "echo 'Apps-extra location:'; ls -la /var/www/html/apps-extra/ | grep openconnector || echo 'Not found in apps-extra'"
639+
docker exec nextcloud-test bash -c "echo 'Custom Apps location:'; ls -la /var/www/html/custom_apps/ | grep openconnector || echo 'Not found in custom_apps'"
644640
docker exec nextcloud-test bash -c "echo 'Apps location:'; ls -la /var/www/html/apps/ | grep openconnector || echo 'Not found in apps'"
645641
646642
# Check if vendor directory exists in new location
@@ -768,7 +764,7 @@ jobs:
768764
run: |
769765
# Run tests from inside the Nextcloud container where all OCP classes are available
770766
echo "Running tests inside Nextcloud container..."
771-
docker exec nextcloud-test bash -c "cd /var/www/html && ./lib/composer/bin/phpunit --bootstrap apps-extra/openconnector/tests/bootstrap.php apps-extra/openconnector/tests"
767+
docker exec nextcloud-test bash -c "cd /var/www/html && ./lib/composer/bin/phpunit --bootstrap custom_apps/openconnector/tests/bootstrap.php custom_apps/openconnector/tests"
772768
773769
- name: Upload coverage (PHP 8.2 only)
774770
if: matrix.php-version == '8.2'
@@ -897,13 +893,9 @@ jobs:
897893
timeout 600 bash -c 'until curl -sSf http://localhost:8081/status.php | grep -q "installed.*true"; do echo "Waiting for Nextcloud to start..."; sleep 10; done'
898894
echo "Nextcloud is fully initialized and ready!"
899895
900-
# Create apps-extra directory in Nextcloud container
901-
echo "Creating apps-extra directory in Nextcloud container..."
902-
docker exec nextcloud-test-quality mkdir -p /var/www/html/apps-extra
903-
904896
# Copy the OpenConnector app into the container
905897
echo "Copying OpenConnector app into Nextcloud container..."
906-
docker cp . nextcloud-test-quality:/var/www/html/apps-extra/openconnector
898+
docker cp . nextcloud-test-quality:/var/www/html/custom_apps/openconnector
907899
908900
# Wait a bit more for Nextcloud to fully process the app installation
909901
echo "Waiting for app installation to complete..."
@@ -997,15 +989,15 @@ jobs:
997989
998990
# Check if app directory exists
999991
echo "Checking if OpenConnector app directory exists..."
1000-
docker exec nextcloud-test-quality bash -c "ls -la /var/www/html/apps-extra/openconnector/"
992+
docker exec nextcloud-test-quality bash -c "ls -la /var/www/html/custom_apps/openconnector/"
1001993
1002994
# List available apps
1003995
echo "Listing available apps..."
1004996
docker exec nextcloud-test-quality bash -c "cd /var/www/html && php occ app:list"
1005997
1006998
# Move app to correct location for Nextcloud
1007999
echo "Moving app to correct location for Nextcloud..."
1008-
docker exec nextcloud-test-quality bash -c "cp -r /var/www/html/apps-extra/openconnector /var/www/html/apps/"
1000+
docker exec nextcloud-test-quality bash -c "cp -r /var/www/html/custom_apps/openconnector /var/www/html/apps/"
10091001
echo "App moved to /var/www/html/apps/openconnector"
10101002
10111003
# Install app dependencies BEFORE enabling the app
@@ -1169,9 +1161,9 @@ jobs:
11691161
11701162
# Check app structure and files
11711163
echo "Checking app structure and files..."
1172-
docker exec nextcloud-test-quality bash -c "ls -la /var/www/html/apps-extra/openconnector/"
1173-
docker exec nextcloud-test-quality bash -c "ls -la /var/www/html/apps-extra/openconnector/appinfo/"
1174-
docker exec nextcloud-test-quality bash -c "cat /var/www/html/apps-extra/openconnector/appinfo/info.xml | head -10"
1164+
docker exec nextcloud-test-quality bash -c "ls -la /var/www/html/custom_apps/openconnector/"
1165+
docker exec nextcloud-test-quality bash -c "ls -la /var/www/html/custom_apps/openconnector/appinfo/"
1166+
docker exec nextcloud-test-quality bash -c "cat /var/www/html/custom_apps/openconnector/appinfo/info.xml | head -10"
11751167
11761168
# Check if app is in the right location for Nextcloud
11771169
echo "Checking if app is in correct location..."
@@ -1400,7 +1392,7 @@ jobs:
14001392
14011393
# Check if app is in both locations
14021394
echo "Checking app locations..."
1403-
docker exec nextcloud-test-quality bash -c "echo 'Apps-extra location:'; ls -la /var/www/html/apps-extra/ | grep openconnector || echo 'Not found in apps-extra'"
1395+
docker exec nextcloud-test-quality bash -c "echo 'Custom Apps location:'; ls -la /var/www/html/custom_apps/ | grep openconnector || echo 'Not found in custom_apps'"
14041396
docker exec nextcloud-test-quality bash -c "echo 'Apps location:'; ls -la /var/www/html/apps/ | grep openconnector || echo 'Not found in apps'"
14051397
14061398
# Check if vendor directory exists in new location
@@ -1542,7 +1534,7 @@ jobs:
15421534
run: |
15431535
# Run tests from inside the Nextcloud container where all OCP classes are available
15441536
echo "Running tests inside Nextcloud container..."
1545-
docker exec nextcloud-test-quality bash -c "cd /var/www/html && ./lib/composer/bin/phpunit --bootstrap apps-extra/openconnector/tests/bootstrap.php apps-extra/openconnector/tests"
1537+
docker exec nextcloud-test-quality bash -c "cd /var/www/html && ./lib/composer/bin/phpunit --bootstrap custom_apps/openconnector/tests/bootstrap.php custom_apps/openconnector/tests"
15461538
15471539
- name: Generate quality status
15481540
if: always()

0 commit comments

Comments
 (0)