From 22e06d008bbc529feec11fb01fe363c8636c32ef Mon Sep 17 00:00:00 2001 From: Will Ezell Date: Wed, 1 Apr 2026 08:59:55 -0400 Subject: [PATCH 1/4] Use Google Container Registry mirror for Docker pulls Co-Authored-By: Claude Sonnet 4.6 --- .github/bin/test-install-plugins.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/bin/test-install-plugins.sh b/.github/bin/test-install-plugins.sh index c7517a8c..d074e9e7 100755 --- a/.github/bin/test-install-plugins.sh +++ b/.github/bin/test-install-plugins.sh @@ -17,7 +17,7 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)" PLUGINS_DIR="${1:-/tmp/dotcms-plugins}" -DOTCMS_IMAGE="${DOTCMS_IMAGE:-dotcms/dotcms-dev:nightly}" +DOTCMS_IMAGE="${DOTCMS_IMAGE:-mirror.gcr.io/dotcms/dotcms-dev:nightly}" DOTCMS_PORT="${DOTCMS_PORT:-8082}" STARTUP_WAIT="${STARTUP_WAIT:-300}" CONTAINER_NAME="dotcms-plugin-test" From e053ee3ac36efd48f0030732a6bc49dea548f4ac Mon Sep 17 00:00:00 2001 From: Will Ezell Date: Wed, 1 Apr 2026 13:15:46 -0400 Subject: [PATCH 2/4] Add workflow to test plugins on new dotCMS releases Polls dotcms/core daily, runs plugin install tests when a new release is detected, and tracks the last tested version via a repo variable. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/test-on-dotcms-release.yml | 103 +++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 .github/workflows/test-on-dotcms-release.yml diff --git a/.github/workflows/test-on-dotcms-release.yml b/.github/workflows/test-on-dotcms-release.yml new file mode 100644 index 00000000..c788301c --- /dev/null +++ b/.github/workflows/test-on-dotcms-release.yml @@ -0,0 +1,103 @@ +name: Test Plugins on dotCMS Release + +# Polls dotcms/core for new releases daily; runs plugin tests only when +# a version newer than LAST_TESTED_DOTCMS_VERSION is published. +# Also runnable manually to test a specific version. + +on: + schedule: + - cron: '0 6 * * *' # 06:00 UTC daily + workflow_dispatch: + inputs: + dotcms_version: + description: 'dotCMS version to test (e.g. 26.03.27-01). Leave blank to use latest release.' + required: false + default: '' + +permissions: + actions: write # needed to update the LAST_TESTED_DOTCMS_VERSION variable + +jobs: + check-release: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.resolve.outputs.version }} + should_run: ${{ steps.resolve.outputs.should_run }} + + steps: + - name: Resolve dotCMS version + id: resolve + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + INPUT_VERSION: ${{ inputs.dotcms_version }} + LAST_TESTED: ${{ vars.LAST_TESTED_DOTCMS_VERSION }} + run: | + if [[ -n "${INPUT_VERSION}" ]]; then + VERSION="${INPUT_VERSION}" + echo "Manual run — testing version ${VERSION}" + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" + echo "should_run=true" >> "$GITHUB_OUTPUT" + exit 0 + fi + + # Fetch latest core release (exclude dotcms-cli tags) + VERSION=$(gh release list --repo dotcms/core --limit 20 \ + --json tagName,name,isLatest \ + --jq '[.[] | select(.name | test("^Release "))] | first | .tagName | ltrimstr("v")') + + if [[ -z "${VERSION}" ]]; then + echo "Could not determine latest dotCMS release — aborting." + exit 1 + fi + + echo "Latest dotCMS release: ${VERSION}" + echo "Last tested version: ${LAST_TESTED}" + + if [[ "${VERSION}" == "${LAST_TESTED}" ]]; then + echo "Already tested — skipping." + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" + echo "should_run=false" >> "$GITHUB_OUTPUT" + else + echo "New version detected — will run tests." + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" + echo "should_run=true" >> "$GITHUB_OUTPUT" + fi + + test-plugins: + needs: check-release + if: needs.check-release.outputs.should_run == 'true' + runs-on: ubuntu-latest + timeout-minutes: 30 + env: + DOTCMS_VERSION: ${{ needs.check-release.outputs.version }} + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + cache: maven + + - name: Build Plugins + run: mvn --batch-mode --no-transfer-progress package -DskipTests + + - name: Test Plugin Installation + env: + DOTCMS_IMAGE: mirror.gcr.io/dotcms/dotcms-dev:${{ env.DOTCMS_VERSION }} + run: | + echo "Testing against image: ${DOTCMS_IMAGE}" + chmod +x .github/bin/test-install-plugins.sh + .github/bin/test-install-plugins.sh + + - name: Update last tested version + if: success() + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh variable set LAST_TESTED_DOTCMS_VERSION \ + --body "${{ env.DOTCMS_VERSION }}" \ + --repo "${{ github.repository }}" From 7a8063126f0390dd724985255409a80a403d9e4d Mon Sep 17 00:00:00 2001 From: Will Ezell Date: Wed, 1 Apr 2026 13:18:15 -0400 Subject: [PATCH 3/4] Auto-bump dotcms-core.version and open PR on new release When plugin tests pass against a new dotCMS release, commit the pom.xml version bump to a branch and open a PR automatically. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/test-on-dotcms-release.yml | 30 +++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-on-dotcms-release.yml b/.github/workflows/test-on-dotcms-release.yml index c788301c..5674737e 100644 --- a/.github/workflows/test-on-dotcms-release.yml +++ b/.github/workflows/test-on-dotcms-release.yml @@ -15,7 +15,9 @@ on: default: '' permissions: - actions: write # needed to update the LAST_TESTED_DOTCMS_VERSION variable + actions: write # update LAST_TESTED_DOTCMS_VERSION variable + contents: write # push version-bump branch + pull-requests: write # open PR jobs: check-release: @@ -74,6 +76,14 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Bump dotcms-core.version in pom.xml + run: | + sed -i "s|.*|${{ env.DOTCMS_VERSION }}|" pom.xml + echo "pom.xml updated:" + grep dotcms-core.version pom.xml - name: Set up JDK 21 uses: actions/setup-java@v4 @@ -93,6 +103,24 @@ jobs: chmod +x .github/bin/test-install-plugins.sh .github/bin/test-install-plugins.sh + - name: Open version-bump PR + if: success() + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + BRANCH="chore/dotcms-core-${{ env.DOTCMS_VERSION }}" + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git checkout -b "${BRANCH}" + git add pom.xml + git commit -m "chore: bump dotcms-core.version to ${{ env.DOTCMS_VERSION }}" + git push origin "${BRANCH}" + gh pr create \ + --title "chore: bump dotcms-core.version to ${{ env.DOTCMS_VERSION }}" \ + --body "Automated version bump — plugin tests passed against \`dotcms/dotcms-dev:${{ env.DOTCMS_VERSION }}\`." \ + --base main \ + --head "${BRANCH}" + - name: Update last tested version if: success() env: From 63bc943cd9e5b9077c498dc9e003e28299e4aac7 Mon Sep 17 00:00:00 2001 From: Will Ezell Date: Wed, 1 Apr 2026 13:20:34 -0400 Subject: [PATCH 4/4] Poll dotcms/core for new releases every 4 hours Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/test-on-dotcms-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-on-dotcms-release.yml b/.github/workflows/test-on-dotcms-release.yml index 5674737e..037387c2 100644 --- a/.github/workflows/test-on-dotcms-release.yml +++ b/.github/workflows/test-on-dotcms-release.yml @@ -6,7 +6,7 @@ name: Test Plugins on dotCMS Release on: schedule: - - cron: '0 6 * * *' # 06:00 UTC daily + - cron: '0 */4 * * *' # every 4 hours workflow_dispatch: inputs: dotcms_version: