Add jobs to genereate graphql schema artifacts for foss
What does this MR do?
We previously discovered #365500 (closed), which surfaced an issue that the MR pipeline is currently running the eslint as-if-foss
job against the non-foss graphql schema, so the MR pipeline would pass with false positive eslint results and receive a build failure only when the change is made to the FOSS repo. This MR fixes this bug by generating foss graphql schema in the MR pipeline, so the eslint as-if-foss
job runs against the correct artifacts.
- Because the only time we want to run these 2 jobs is when we want to run eslint for foss or when we are making changes to the ci patterns, so I have given them the following rule:
.frontend:rules:default-frontend-jobs-as-if-foss
This will ensure the impact of adding these jobs to our pipeline cost is kept to minimum.
!90929 (closed)
Tested with changes to eslint rules and front-end code here:-
Test Condition: In the test MR, the code changes would result in the regular eslint to pass while failing the foss eslint (consistent with the scenario we saw in #365500 (closed)).
-
Test result: I was able to get a failed
eslint as-if-foss
job, which gives the same feedback as what we saw in the FOSS pipeline. So the correct early feedback can be achieved in the MR pipeline, instead of having it only fail in the FOSS build.
Related issues
Closes #365970 (closed)
Checklist
Pre-merge
Consider the effect of the changes in this merge request on the following:
-
Different pipeline types - Non-canonical projects:
-
gitlab-foss
-
security
-
dev
-
personal forks
-
-
Pipeline performance
If new jobs are added:
-
Change-related rules (e.g. frontend/backend/database file changes): _____ -
Frequency they are running (MRs, main branch, nightly, bi-hourly): _____ -
Add a duration chart to https://app.periscopedata.com/app/gitlab/652085/Engineering-Productivity---Pipeline-Build-Durations if there are new jobs added to merge request pipelines
This will help keep track of expected cost increases to the GitLab project average pipeline cost per merge request RPI
Post-merge
-
Consider communicating these changes to the broader team following the communication guideline for pipeline changes