Skip to content

Preview image repository override: allow pushing app/seed tags to a sub-repository #294

Closed as not planned

Description

@simpros

What broke

sprout ci preview hardcodes the app/seed push location to the registry root: resolveImageRef (apps/cli/src/commands/ci-identity.ts) returns ${CI_REGISTRY_IMAGE}:${SHA} with no override, and the seed ref derives from the app ref (resolveSeedTarget). Adopters whose root repository holds nothing but throwaway preview tags (KIDO-44: toptiere/dcos root vs dcos/product releases built from the same Dockerfile) cannot fold previews into a sub-repository, so the root repo — and its tags — can never be retired.

Root cause

One line owns the location: resolveImageRef reads only CI_REGISTRY_IMAGE + commit SHA. Every consumer (ci-preview.ts build+push, ci-deploy.ts appImage, ci-reseed.ts, ci-reset.ts, teardown tag deletion from #284/#285) reuses identity.imageRef, so there is exactly one seam to widen — but no input (env or .sprout.yaml key) feeds it today.

What to build

An image-repository override for the app/seed refs, defaulting to today's behavior (empty = ${CI_REGISTRY_IMAGE}:${SHA}):

  • New input, e.g. .sprout.yaml build.image_repo (or env SPROUT_IMAGE_REPO if config-file plumbing is heavier — pick one, document it): full repository path (e.g. registry.gitlab.com/toptiere/dcos/product), tag stays :${SHA} / :${SHA}-seed as today.
  • Preview build+push, deploy appImage, reseed, reset, and teardown tag deletion (ci teardown should delete the preview SHA image tags it pushed #284) all resolve through the same override — push location and delete logic must agree.
  • Component input passthrough if the value needs to come from .gitlab-ci.yml rather than the yaml file (check templates/preview.yml inputs).
  • Backwards compatible: no override set anywhere behaves byte-identical to today.

Acceptance criteria

  • Preview with override set pushes <override>:<SHA> (+ seed) and deploys from it; teardown deletes exactly those tags
  • Preview without override pushes ${CI_REGISTRY_IMAGE}:${SHA} exactly as today (existing tests green unchanged)
  • Unit coverage alongside the existing ci-identity / ci-teardown-tags tests (override set, unset, teardown-with-override)
  • Docs mention the new key where ci preview inputs are documented
  • Follow-up noted: adopter-side move (KIDO-44) consumes this once released

Blocked by

None (relates to #284 teardown tag deletion and KIDO-44 root-repo retirement).

Activity

  1. simpros commented on Nov 15, 2026

    @simpros
    OwnerAuthor

    Overkill

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions