Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs/draft: change example in GitLab CBE guide
This updates the draft GitLab CUE-By-Example guide so that the example pipeline it imports/validates/regenerates is valid. The previous example used by the guide, taken from the Flockademic project, simply wasn't valid and wasn't a good choice of example. It was originally selected from the set of examples mentioned in the GitLab CI documentation because it was reasonably large, and therefore it was likely to represent a superset of what most users would be doing in their GitLab pipelines. Annoyingly, because of a typo noticed by @unixsurfer in cue-labs/cue-by-example#39, the pipeline wasn't actually being validated, so the example's inability to be validated wasn't noticed before now. This didn't invalidate the guide for folks following it with their own pipelines, it just meant that (a) the guide couldn't be followed using the published example and (b) folks' own pipelines wouldn't be validated against the upstream schema. Not great, of course, but not technically /broken/ for real-world use. The guide now uses GitLab's own pipeline file as its example: https://gitlab.com/gitlab-org/gitlab/-/blob/3308936efcd70839cc61e0545dcb780756e4ec28/.gitlab-ci.yml This example wasn't selected originally because (whilst it does exercise a lot of different YAML syntaxes and GitLab features) it places most of its job definitions behind "include" syntax which CUE doesn't support. Thus the majority of the jobs mentioned in its preamble aren't vetted by CUE. This doesn't feel signficant, as the validation that /is/ performed is sufficient to prove that CUE can help users. Other examples linked to by GitLab's documentation are extremely trivial, hence aren't useful. Also: - update upstream JSON Schema to its most recent definition; - add an explicit cue-vet to help the user discover invalid pipelines earlier than a cue-cmd, which emits less useful diagnostics; - re-enable the final diff check, so the entire guide is tested in CI. Preview-Path: /docs/draft/cbe-005_gitlab_ci/ Signed-off-by: Jonathan Matthews <[email protected]> Change-Id: I3ca61c12769d9d4b19da172d084eba244c654267 Dispatch-Trailer: {"type":"trybot","CL":1203460,"patchset":1,"ref":"refs/changes/60/1203460/1","targetBranch":"master"}
- Loading branch information