From 72385f27734ccc36316d76d5e159a20daedf7ccc Mon Sep 17 00:00:00 2001 From: TheWitness Date: Sat, 12 Sep 2026 09:38:56 -0400 Subject: [PATCH 1/6] Fix plugin CI workflow: limit PHP matrix and apache mod-php package name --- .github/workflows/plugin-ci-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index 7e0602b..0c4ef5f 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -38,7 +38,7 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.1', '8.2', '8.3', '8.4'] + php: ['8.2', '8.3', '8.4'] os: [ubuntu-latest] services: @@ -85,7 +85,7 @@ jobs: run: sudo apt-get update - name: Install System Dependencies - run: sudo apt-get install -y apache2 snmp snmpd rrdtool fping libapache2-mod-php${{ matrix.php }} + run: sudo apt-get install -y apache2 snmp snmpd rrdtool fping libapache2-mod-php - name: Start SNMPD Agent and Test run: | From 112168c0f478cee17b9ae01b34aa7d8e40cb0212 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Sat, 12 Sep 2026 09:59:43 -0400 Subject: [PATCH 2/6] Pin Cacti checkout in CI workflow to the 1.2.x branch --- .github/workflows/plugin-ci-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index 0c4ef5f..f5b613d 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -64,6 +64,7 @@ jobs: uses: actions/checkout@v4 with: repository: Cacti/cacti + ref: 1.2.x path: cacti - name: Checkout servcheck Plugin From d93f087487042e5ac273e9b4d95f83baa3040726 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Sat, 12 Sep 2026 15:38:07 -0400 Subject: [PATCH 3/6] Attempt to prevent php upgrade during workflow Removed apache2 from the list of system dependencies. --- .github/workflows/plugin-ci-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index f5b613d..7aaaf42 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -86,7 +86,7 @@ jobs: run: sudo apt-get update - name: Install System Dependencies - run: sudo apt-get install -y apache2 snmp snmpd rrdtool fping libapache2-mod-php + run: sudo apt-get install -y snmp snmpd rrdtool fping - name: Start SNMPD Agent and Test run: | From 3e86f538d74884e6e2db6aa430bc1f7b528367b7 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Sat, 12 Sep 2026 15:48:13 -0400 Subject: [PATCH 4/6] Add CACTI env variable and conditional job execution Added environment variable CACTI and conditional checks for PHPStan and linting tasks based on its value. --- .github/workflows/plugin-ci-workflow.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index 7aaaf42..b7cd6ad 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -30,6 +30,8 @@ on: branches: - main - develop +env: + CACTI="1.2.x" jobs: integration-test: @@ -180,6 +182,7 @@ jobs: fi - name: Remove the plugins directory exclusion from the .phpstan.neon + if: ${{ env.CACTI != '1.2.x' }} run: sed '/plugins/d' -i .phpstan.neon working-directory: ${{ github.workspace }}/cacti @@ -187,16 +190,19 @@ jobs: run: sudo chmod +x ${{ github.workspace }}/cacti/include/vendor/bin/* - name: Run Linter on base code + if: ${{ env.CACTI != '1.2.x' }} run: composer run-script lint ${{ github.workspace }}/cacti/plugins/servcheck working-directory: ${{ github.workspace }}/cacti - name: Checking coding standards on base code + if: ${{ env.CACTI != '1.2.x' }} run: composer run-script phpcsfixer ${{ github.workspace }}/cacti/plugins/servcheck working-directory: ${{ github.workspace }}/cacti -# - name: Run PHPStan at Level 6 on base code outside of Composer due to technical issues -# run: ./include/vendor/bin/phpstan analyze --level 6 ${{ github.workspace }}/cacti/plugins/servcheck -# working-directory: ${{ github.workspace }}/cacti + - name: Run PHPStan at Level 6 on base code outside of Composer due to technical issues + if: ${{ env.CACTI != '1.2.x' }} + run: ./include/vendor/bin/phpstan analyze --level 6 ${{ github.workspace }}/cacti/plugins/servcheck + working-directory: ${{ github.workspace }}/cacti - name: Run Cacti Poller run: | From 365a489308b3dc8d97b58883d8bc6ae9387b7c4a Mon Sep 17 00:00:00 2001 From: TheWitness Date: Sat, 12 Sep 2026 15:50:06 -0400 Subject: [PATCH 5/6] Update Cacti reference to use environment variable --- .github/workflows/plugin-ci-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index b7cd6ad..f4f328e 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -31,7 +31,7 @@ on: - main - develop env: - CACTI="1.2.x" + CACTI: 1.2.x jobs: integration-test: @@ -66,7 +66,7 @@ jobs: uses: actions/checkout@v4 with: repository: Cacti/cacti - ref: 1.2.x + ref: ${{ env.CACTI }} path: cacti - name: Checkout servcheck Plugin From d93f866f0fd67ef8b9da6184955e63ee7d1ec561 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Sat, 12 Sep 2026 15:52:21 -0400 Subject: [PATCH 6/6] Add conditional check for CACTI version in workflow --- .github/workflows/plugin-ci-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index f4f328e..ceb82ea 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -187,6 +187,7 @@ jobs: working-directory: ${{ github.workspace }}/cacti - name: Mark composer scripts executable + if: ${{ env.CACTI != '1.2.x' }} run: sudo chmod +x ${{ github.workspace }}/cacti/include/vendor/bin/* - name: Run Linter on base code