From b4ab8b6a4de79d30a81c6bde65609fe3ed2798f3 Mon Sep 17 00:00:00 2001 From: Emma Date: Wed, 17 Dec 2025 15:59:54 +0100 Subject: [PATCH 1/7] ci: move setup blueprint after setup php --- .github/workflows/ci.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f9f3940..4d0a1f7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -113,13 +113,6 @@ jobs: echo 'WEBUSER="runner"; OWNERSHIP="runner:runner"; USERSHELL="/bin/bash";' > .blueprintrc chmod +x blueprint.sh - - name: Setup Blueprint - working-directory: panel - run: bash blueprint.sh - env: - BLUEPRINT_ENVIRONMENT: ci - TERM: xterm-kitty #fixes tput errors - - name: Get cache directory id: composer-cache working-directory: panel @@ -150,6 +143,13 @@ jobs: working-directory: panel run: composer install --no-interaction --no-progress --no-suggest --prefer-dist + - name: Setup Blueprint + working-directory: panel + run: bash blueprint.sh + env: + BLUEPRINT_ENVIRONMENT: ci + TERM: xterm-kitty #fixes tput errors + - name: Unit tests working-directory: panel run: vendor/bin/phpunit --bootstrap vendor/autoload.php tests/Unit From f5bcca919f2cc8dee60b9fbe85c180fb36d3d1fa Mon Sep 17 00:00:00 2001 From: Emma Date: Wed, 17 Dec 2025 16:06:19 +0100 Subject: [PATCH 2/7] ci: make slight changes to blueprint.sh's install script for ci --- blueprint.sh | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/blueprint.sh b/blueprint.sh index 0dbd79a..e79e6c0 100644 --- a/blueprint.sh +++ b/blueprint.sh @@ -248,12 +248,14 @@ if [[ $1 != "-bash" ]]; then export PROGRESS_NOW=0 fi - PRINT INFO "Installing node modules.." - # Check for yarn before installing node modules.. - if ! [ -x "$(command -v yarn)" ]; then - PRINT FATAL "Missing dependency \"yarn\"." + if [[ $BLUEPRINT_ENVIRONMENT != "ci" ]]; then + PRINT INFO "Installing node modules.." + # Check for yarn before installing node modules.. + if ! [ -x "$(command -v yarn)" ]; then + PRINT FATAL "Missing dependency \"yarn\"." + fi + hide_progress fi - hide_progress if [[ $BLUEPRINT_ENVIRONMENT != "ci" ]]; then set -eo pipefail @@ -330,7 +332,7 @@ if [[ $1 != "-bash" ]]; then ((PROGRESS_NOW++)) # Run migrations if Blueprint is not running through Docker. - if [[ $DOCKER != "y" ]]; then + if [[ ( $DOCKER != "y" ) && ( $BLUEPRINT_ENVIRONMENT != "ci" ) ]]; then PRINT INFO "Running database migrations.." hide_progress php artisan migrate --force @@ -339,21 +341,25 @@ if [[ $1 != "-bash" ]]; then ((PROGRESS_NOW++)) # Seed Blueprint database records - PRINT INFO "Seeding Blueprint database records.." - php artisan db:seed --class=BlueprintSeeder --force &>> "$BLUEPRINT__DEBUG" + if [[ $BLUEPRINT_ENVIRONMENT != "ci" ]]; then + PRINT INFO "Seeding Blueprint database records.." + php artisan db:seed --class=BlueprintSeeder --force &>> "$BLUEPRINT__DEBUG" + fi ((PROGRESS_NOW++)) # Flush cache. - PRINT INFO "Flushing cache.." - { - php artisan view:cache - php artisan config:cache - php artisan route:clear - php artisan cache:clear - php artisan bp:cache - php artisan bp:version:cache - } &>> "$BLUEPRINT__DEBUG" + if [[ $BLUEPRINT_ENVIRONMENT != "ci" ]]; then + PRINT INFO "Flushing cache.." + { + php artisan view:cache + php artisan config:cache + php artisan route:clear + php artisan cache:clear + php artisan bp:cache + php artisan bp:version:cache + } &>> "$BLUEPRINT__DEBUG" + fi ((PROGRESS_NOW++)) From a4bbc69232290011a09614c86b0d892d60e39afb Mon Sep 17 00:00:00 2001 From: Emma Date: Wed, 17 Dec 2025 16:31:13 +0100 Subject: [PATCH 3/7] ci: do scuffed stuff --- .github/workflows/ci.yaml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4d0a1f7..d55f49e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,7 +1,12 @@ name: Tests -on: [push] -permissions: {} +on: + push: + branches: + - "main" + pull_request: + branches: + - "main" jobs: shellcheck: @@ -103,6 +108,23 @@ jobs: - name: Overwrite Pterodactyl files with latest commit run: cp -r blueprint/* panel/ + # This is a temporary and pretty scuffed way to go about this. The current latest + # version of Pterodactyl (v1.11.11) has a broken unit test. Once a new version is + # released, this issue will pretty much be fixed. + - name: Commit overlay changes + working-directory: panel + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add -A + git commit -m "Apply overlay files" + - name: Cherry-pick specific commit from pterodactyl + working-directory: panel + run: | + git fetch origin 1.0-develop + git cherry-pick caab0562561228b02355618904b25dce66550a94 + # This concludes scuffed temporary CI fix. + - name: Install node dependencies working-directory: panel run: yarn install From 3d805c15a9844c16b5e43be4171f037cfe993d86 Mon Sep 17 00:00:00 2001 From: Emma Date: Wed, 17 Dec 2025 16:31:26 +0100 Subject: [PATCH 4/7] feat: sync up a few files with latest pterodactyl commits --- app/Console/Kernel.php | 3 ++- app/Transformers/Api/Client/ServerTransformer.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index a626e61..e17f7fd 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -8,11 +8,12 @@ use Illuminate\Database\Console\PruneCommand; use Pterodactyl\Repositories\Eloquent\SettingsRepository; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; -use Pterodactyl\BlueprintFramework\GetExtensionSchedules; use Pterodactyl\Services\Telemetry\TelemetryCollectionService; use Pterodactyl\Console\Commands\Schedule\ProcessRunnableCommand; use Pterodactyl\Console\Commands\Maintenance\PruneOrphanedBackupsCommand; use Pterodactyl\Console\Commands\Maintenance\CleanServiceBackupFilesCommand; + +use Pterodactyl\BlueprintFramework\GetExtensionSchedules; use Pterodactyl\Services\Telemetry\RegisterBlueprintTelemetry; use Pterodactyl\BlueprintFramework\Libraries\ExtensionLibrary\Console\BlueprintConsoleLibrary as BlueprintExtensionLibrary; diff --git a/app/Transformers/Api/Client/ServerTransformer.php b/app/Transformers/Api/Client/ServerTransformer.php index 8dc2f56..d0817a8 100644 --- a/app/Transformers/Api/Client/ServerTransformer.php +++ b/app/Transformers/Api/Client/ServerTransformer.php @@ -31,7 +31,7 @@ public function getResourceName(): string */ public function transform(Server $server): array { - /** @var \Pterodactyl\Services\Servers\StartupCommandService $service */ + /** @var StartupCommandService $service */ $service = Container::getInstance()->make(StartupCommandService::class); $user = $this->request->user(); From 231982bc7dbe1033a9102e70c259bc9d4bf81f3a Mon Sep 17 00:00:00 2001 From: Emma Date: Wed, 17 Dec 2025 16:36:58 +0100 Subject: [PATCH 5/7] ci: git conflict :c --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d55f49e..54ccb91 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -122,7 +122,7 @@ jobs: working-directory: panel run: | git fetch origin 1.0-develop - git cherry-pick caab0562561228b02355618904b25dce66550a94 + git cherry-pick caab0562561228b02355618904b25dce66550a94 -X theirs # This concludes scuffed temporary CI fix. - name: Install node dependencies From 6ed156c6559a670d57d9f914120e88412a5449db Mon Sep 17 00:00:00 2001 From: Emma Date: Wed, 17 Dec 2025 16:46:33 +0100 Subject: [PATCH 6/7] ci: ok nuclear option it is --- .github/workflows/ci.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 54ccb91..c2dad22 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -67,10 +67,7 @@ jobs: matrix: php: [8.2, 8.3] database: - - mariadb:10.5 - - mariadb:10.11 - mariadb:11.5 - - mysql:8 - mysql:9 services: database: @@ -85,7 +82,6 @@ jobs: uses: actions/checkout@v4 with: repository: pterodactyl/panel - ref: v1.11.11 path: panel - name: Install apt dependencies From f579e944fd9451d70f4d86a62545ddc80c808142 Mon Sep 17 00:00:00 2001 From: Emma Date: Wed, 17 Dec 2025 16:49:52 +0100 Subject: [PATCH 7/7] ci: remove scuffed commit cherrypicking step --- .github/workflows/ci.yaml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c2dad22..0ca8031 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -104,23 +104,6 @@ jobs: - name: Overwrite Pterodactyl files with latest commit run: cp -r blueprint/* panel/ - # This is a temporary and pretty scuffed way to go about this. The current latest - # version of Pterodactyl (v1.11.11) has a broken unit test. Once a new version is - # released, this issue will pretty much be fixed. - - name: Commit overlay changes - working-directory: panel - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add -A - git commit -m "Apply overlay files" - - name: Cherry-pick specific commit from pterodactyl - working-directory: panel - run: | - git fetch origin 1.0-develop - git cherry-pick caab0562561228b02355618904b25dce66550a94 -X theirs - # This concludes scuffed temporary CI fix. - - name: Install node dependencies working-directory: panel run: yarn install