Setup testing for gitlab-ci json schema

Per https://github.com/SchemaStore/schemastore/pull/1901#issuecomment-958832290:

GitLab should copy the two GitLab test file directories. I don't see it there.

GitLab should have a JSON schema validator on the server. Perhaps a validator is already active, but without using test files.

Gitlab now hosts an officially available version of the json schema. The base schema was imported from schemastore (see #218473 (closed)) and additional missing keywords have been, and will continue to be, added to the schema over time.

The schema is being used in the pipeline editor to validate .gitlab-ci.yml files. Since we will be updating the schema regularly, we should look into adding tests to make sure the schema is correct.

Proposal

Schemastore has existing test files to validate some keywords in the schema:

As a first step, we can import these schemastore test files first and include them in testing. The idea is to use a json validator (like ajv) to run these test files against the json schema and confirm that the definitions validate different shapes of data correctly.

We can perhaps do a spike or POC merge request and explore this idea first to see how we can set this up for gitlab.

Edited by Mireya Andres