Skip to content

CI: only build the CLI when it changes; reuse prior release otherwise #36080

@wezell

Description

@wezell

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-cli only when the cli path filter matches; gate deploy-cli on 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions