CI: only build the CLI when it changes; reuse prior release otherwise
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem
The dotCMS CLI is rebuilt and re-released on every trunk push and every dotCMS release, even when tools/dotcms-cli/** is unchanged. The native build runs an expensive 3-OS GraalVM matrix (including two macOS runners), so we burn that cost repeatedly to ship byte-identical binaries.
Proposed change
Gate the CLI build on actual CLI source changes, and reuse the prior release when unchanged.
Trunk (cicd_3-trunk.yml)
- Run
build-clionly when theclipath filter matches; gatedeploy-clion the same predicate.
Release (cicd_release-cli.yml)
- Detect whether
tools/dotcms-cli/**changed since the previous release tag (fail-safe: build when uncertain). - When unchanged, skip the native build + JReleaser and republish the previous release's binaries under the new version across all channels — npm, the
dotcms-cli-<version>GitHub release, and Artifactory. - Remove the Slack announcement from the CLI release cycle.
The CLI is self-contained under tools/dotcms-cli/** (its only com.dotcms dependency lives in that subtree), so the path filter is a correct change-key.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with cicd_3-trunk.yml and cicd_release-cli.yml, then trace the existing CLI path filter, native build, JReleaser, and release publishing steps. Compare changes with the previous release tag, including the fail-safe path. Done means unchanged CLI sources skip the native build while the prior binaries are republished through npm, the versioned GitHub release, and Artifactory; changed or uncertain sources still build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, java
- Domain
- ci-cd, cli, release
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 62/100