Skip to content

fix: dotcms-dev:latest incorrectly overwritten by nightly builds #34765

@spbolton

Description

@spbolton

Problem Statement

The dotcms/dotcms-dev:latest Docker tag is overwritten on every nightly build due to a missing inputs.latest guard in cicd_comp_deployment-phase.yml. The main image (dotcms/dotcms) correctly gates the latest tag behind inputs.latest, but the dev image does not.

Design principle violated: latest must only be set by the release workflow for primary (non-variant) builds. All other build types (nightly, trunk, feature) have their own meaningful floating tags and must never write to latest.

Affects CI/CD pipeline behavior — nightly runs silently corrupt the release-only latest tag for the dev image.

Steps to Reproduce

  1. Trigger or observe any nightly workflow run (cicd_4-nightly.yml)
  2. Check Docker Hub for dotcms/dotcms-dev:latest
  3. Observe that the tag timestamp reflects the most recent nightly, not the most recent release

Root causecicd_comp_deployment-phase.yml:

Line 250 (main image — correct, gated on inputs.latest):

latest: ${{ inputs.latest && steps.get-sdkman-version.outputs.docker_suffix == '' }}

Line 293 (dev image — incorrect, missing inputs.latest gate):

latest: ${{ steps.get-sdkman-version.outputs.docker_suffix == '' }}

Acceptance Criteria

  • Line 293 in cicd_comp_deployment-phase.yml updated to add inputs.latest && guard, matching the pattern on line 250
  • dotcms/dotcms-dev:latest is no longer updated by nightly builds
  • dotcms/dotcms-dev:latest continues to be updated correctly by the release workflow (cicd_6-release.yml passes latest: true)
  • Variant release builds (cicd_7-release-java-variant.yml) do not push latest for the dev image (no change needed — they already omit latest: true)
  • Comment block in cicd_comp_deployment-phase.yml (lines 14–41) updated to document the latest-only-on-release rule for both main and dev images

dotCMS Version

CI/CD pipeline — current main branch

Severity

Medium - Some functionality impacted

Links

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions