Foundation for CI/CD inline syntax highlighting and autocomplete
Problem to Solve
In #263145 (closed) the pipeline editor will start using a JSON schema hosted by a third party to provide feedback and validation to the .gitlab-ci.yml
file in the editor, the feature is behind FF for self managed and available by default for the .com version only
Additional details
GitLab should provide an officially available version of the .gitlab-ci.yml
schema available inside of the GitLab application at a URL accessible by other tools that may want to read this file. and lifting the FF so self-managed customer will be able to use this feature There are few benefits to providing:
-
Tools and services inside of GitLab won't need to communicate with an external resource. This provides increased security and better support for environments that don't have internet access.
-
The community can continue to update the schema on Schemastore (or other 3rd party) based on updates to the official GitLab hosted schema.
-
GitLab can host the schema / contribute it upstream
Proposal
- Directly include the schema's path (rather than build it) in
app/assets/javascripts/editor/extensions/source_editor_ci_schema_ext.js
OR? - Export the asset as a JS file, create a new webpack bundle for it, and then include the bundle URL in the schema config in JS
- Update the Schema with missing keywords
Missing keywords that need to be updated:
!reference
- https://docs.gitlab.com/14.0/ee/ci/yaml/index.html#allow_failureexit_codes
- https://docs.gitlab.com/14.0/ee/ci/yaml/index.html#cachewhen
- https://docs.gitlab.com/14.0/ee/ci/yaml/index.html#trigger-child-pipeline-with-files-from-another-project
- https://docs.gitlab.com/14.0/ee/ci/yaml/index.html#releaseassetslinks
Next step
Spike issue that would allow us to automatically regenerating the GitLab CI config language schema whenever the CI config is change
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.