Export CI schema via webpack

What does this MR do?

For: #218473 (closed)

Instead of relying on requesting our CI schema through third party sources (schemastore), it would be better for us to host the CI schema ourselves on gitlab. The schema allows linting of our CI files under the :schema_config feature flag. However, on-prem installs might not want third part requests on their behalf. By hosting the schema ourselves, we could enable the linting feature for all users and remove the feature flag in the future.

The schema in app/assets/javascripts/ci_schema/schema.json is directly copied from the schema we use in schemastore. No additional changes have been added.

This MR exports the schema via webpack. There are still some missing keywords; they will be added in a follow-up MR.

No changelog trailers added since there are no UI changes.

NOTE: Discussion re: license

Screenshots or Screencasts

No UI changes.

Linting should still work as expected.

CI Linting

How to setup and validate locally

  1. Enable :schema_linting feature flag.(rails c then Feature.enable(:schema_linting))
  2. Go to the pipeline editor in CI/CD > Editor
  3. Check that the linter works (type a few lines; for errors, there should be a squiggly underline in the bottom and some tips should show up on hover). Refer to screen recording above.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Ezekiel Kigbo

Merge request reports

Loading