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.
How to setup and validate locally
- Enable
:schema_lintingfeature flag.(rails cthenFeature.enable(:schema_linting)) - Go to the pipeline editor in
CI/CD > Editor - 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
- [-] I have included changelog trailers, or none are needed. (Does this MR need a changelog?)
-
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides. -
This change is backwards compatible across updates, or this does not apply.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.)