Skip to content

CI for GLFM verification script

What does this MR do and why?

Related: Tracking Issue: Implement GLFM scripts per the ... (#361241 - closed)

This MR creates a verify-all-generated-files-are-up-to-date.rb script.

The scripts/glfm/verify-all-generated-files-are-up-to-date.rb script runs the update-specification.rb and update-example-snapshots.rb scripts, and fails with an exception and non-zero return code if running these scripts results in any diffs to the generated and committed output specification files or example snapshot files.

This script is run via the glfm-verify CI job to ensure that all changes to the input specification files are reflected in the generated output specification and example snapshot files.

References

See the GLFM Specification Guide development documentation for much more context on all of this work: https://docs.gitlab.com/ee/development/gitlab_flavored_markdown/specification_guide

How to set up and validate locally

  1. Run scripts/glfm/verify-all-generated-files-are-up-to-date.rb in a clean repo and ensure it works with no errors
  2. Commit a change to any of the output specification files or example snapshot files
  3. Run scripts/glfm/verify-all-generated-files-are-up-to-date.rb in a clean repo and ensure it prints a descriptive error message
  4. To test the job on CI, push the committed change on the MR and see the glfm-verify job fail. Example: https://gitlab.com/gitlab-org/gitlab/-/jobs/3178372505

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Chad Woolley

Merge request reports

Loading