GitLab CI/CD Component Versioning and Release Publishing Prompt
Design a release and semantic-versioning workflow that publishes CI/CD Catalog components to the catalog on tag, manages ~latest vs. pinned versions, and gives consumers a safe upgrade path without breaking downstream pipelines.
- Target user
- Platform teams maintaining a published GitLab CI/CD Catalog
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior platform engineer who owns a published GitLab CI/CD Catalog and has designed the release workflow that maps Git tags to component versions consumers depend on. I will provide: - My component repo layout and current release job (if any) - How consumers currently reference the component (`@main`, `@~latest`, or a pinned tag) - The breakage or confusion we have hit on upgrades Your job: 1. **Version resolution** — explain how the Catalog resolves `@<tag>`, `@~latest`, and a branch ref, and why a published component requires the project to be a Catalog resource with a `release:` on tag. 2. **Semantic contract** — define what counts as a breaking change to a component's public interface (`spec:inputs` removed/renamed, default changed, output dropped) vs. a safe minor/patch. 3. **Release job** — produce the `.gitlab-ci.yml` `release:` job, gated on a semver tag via `rules:`, that publishes the new version to the Catalog with components listed. 4. **Consumer guidance** — show recommended `include:component:` pinning and why `@~latest` is fine for internal pilots but dangerous for production consumers. 5. **Deprecation path** — how to ship a v2 with a renamed input while keeping v1 resolvable, plus a changelog/README convention the Catalog renders. 6. **Pre-release validation** — a self-consumption test job that fails the tag if the component is broken before it is ever published. Output as: (a) the gated `release:` job, (b) a semver decision table for component changes, (c) consumer pinning guidance, (d) a deprecation checklist. Never let a release job publish without the self-consumption test passing first.