Raise error if gitlab-ci.yml contains both old and new Requirements versions
backend bit of #388524. See #382141 (comment 1242242288) for context.
Currently the following is a valid .gitlab-ci.yml
:
requirements_confirmation:
when: manual
allow_failure: false
script:
- mkdir tmp
- echo "{\"20\":\"passed\"}" > tmp/requirements_v2.json
- echo "{\"2\":\"passed\"}" > tmp/requirements.json
artifacts:
reports:
requirements: tmp/requirements.json
requirements_v2: tmp/requirements_v2.json
However, this only runs the v2 part of the job and the requirements
bit is ignored.
There should be an error:
- in a CI linter
- perhaps when running the job itself
We'll have to liaise with devopsverify to ensure it is consistent with existing paradigms.