3.5 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
This project does not yet use semantic versioning; entries are listed under [Unreleased] until a first release is tagged.
[Unreleased]
Added
-
Comprehensive keyword validation — checks for all major GitLab CI YAML keywords based on the official docs:
whenvalid values:on_success,on_failure,always,manual,delayed,neverstart_inonly allowed whenwhen: delayed; error if set without itparallelmust be integer 2–200 or map withmatrixkeyretrymax value 0–2;retry.whenfailure types validated against the full enumallow_failuremust be boolean or{exit_codes: ...}interruptiblemust be booleantriggerjobs cannot havescript; map form requiresprojectorincludecoveragemust be a regex pattern wrapped in/…/releaserequirestag_nameenvironment.urlrequiresenvironment.name;environment.actionvalidatedartifacts.whenvalid values;expose_asrequirespathscache.whenandcache.policyvalid valuesrules[*].whenvalidated per-ruleimagemap form requiresnameinherit.default/inherit.variablesmust be boolean or listworkflow.rules[*].whenrestricted toalways/never- Warning when
pagesjobartifacts.pathsdoes not includepublic
-
dependencies:validation — referenced jobs must exist and must be in an earlier stage -
run:keyword support — recognised as alternative toscript:(CI steps); no longer triggers "missing script" error -
spec:reserved key — top-levelspec:is now recognised as a CI component header, not a job -
New job model fields —
interruptible,resource_group,start_in,run -
Testdata fixtures —
keywords_valid.yml(clean pipeline exercising every new check),keywords_invalid.yml(18 deliberate violations) -
extends:resolution — resolves single and chained template inheritance before linting; deep-merges base job fields into derived jobs (child scalars/lists win, maps are merged recursively); cycle detection via topological sort -
needs:DAG validation — checks referenced jobs exist, respect stage ordering, and contain no circular dependencies; handles both the- job-nameshorthand and the- job: namemap form; cross-pipeline needs (pipeline:key) are skipped -
Hidden job support — jobs named with a leading
.are treated as reusable templates and exempted from thescriptrequirement and other per-job checks -
Core linter — initial set of lint rules:
- Missing
scripton non-trigger, non-template jobs (error) - Job
stagenot declared instages(error) only/rulesorexcept/rulesused together (error)- No
stagesblock defined (warning) - Deprecated
only/exceptusage (warning)
- Missing
-
CLI —
gitlab-sim <file>exits 0 on clean pipelines, 1 on errors; prints findings with severity, job name, and message -
YAML parser — two-pass parse: reserved top-level keys (
stages,variables,default,include,workflow) are decoded into typed structs; remaining keys are treated as job definitions -
Taskfile —
build,test,lint-go,validate,ci,cleantasks via Task -
Testdata fixtures —
valid.yml,invalid.yml,extends.yml,needs.yml,needs_cycle.yml