lhotari opened a new pull request, #1148: URL: https://github.com/apache/pulsar-site/pull/1148
## Summary - apache/pulsar master switched to a Gradle build, breaking the sync-content composite action which still ran `mvn install`. Maintenance branches still use Maven and reuse the same Python entry points at release time. - Add a `pulsar_build` helper that detects gradle vs maven from the pulsar checkout layout, exposes build-system-specific classpath / swagger paths, and runs `./gradlew assemble :distribution:pulsar-server-distribution:exportClasspath :distribution:pulsar-shell-distribution:exportClasspath` on a fresh gradle checkout. - Route all five reference/CLI doc generators and `swagger_generator` through the detector so the same scripts work on master (gradle) and on maintenance branches (maven, behavior unchanged). `swagger_generator` skips with a warning on gradle since apache/pulsar master has no swagger task yet; the `mvn -Pswagger` path is preserved for maven. - Make `site_uploader.execute()`'s `head_sha` optional. `site-updater.py` had stopped passing it after the `.publish-ref` change, which left the sync workflow latently broken; `head_sha=None` now skips the `.publish-ref` write that is only meaningful for `asf-site-next`. - Rewrite `.github/actions/sync-content/action.yml` to use `gradle/actions/setup-gradle@v5` and `./gradlew assemble exportClasspath` instead of `mvn install`. - Drop `PULSARBOT_TOKEN` from `.github/workflows/ci-sync-content.yml` and grant the default `GITHUB_TOKEN` `contents: write` so the scheduled workflow can push to `main`. ## Test plan - [ ] Trigger `CI - Synchronize Content` via `workflow_dispatch` and confirm the gradle build + doc generators complete, that swagger generation skips with the expected warning, and that the resulting commit pushes to `main` using the default `GITHUB_TOKEN`. - [ ] Run `bin/reference-doc-generator.py --master-path=<maintenance-branch-checkout>` locally against a maven branch and confirm behavior is unchanged (classpath read from `target/`, `mvn -Pswagger` fallback intact for `rest-apidoc-generator.py`). - [ ] Run the same generators against an apache/pulsar master checkout and confirm `pulsar_build.ensure_built()` produces the gradle classpath/jars and the reference + CLI docs generate. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
