Add check stage
What does this MR do?
This MR adds a new 1st stage for basic health checks (e.g. linting, code quality) before any other jobs run. This saves expensive downstream job runs from executing even though a previous stage failed.
- Example of failed build: https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/-/pipelines/364119078
- Example of passing build: https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/-/pipelines/364121115
Difference between the 2 builds in this commit: 9e529fd6
Note: several build jobs and the dependency scanning job have been modified to remove dependencies/needs directives. Before this change these jobs started as soon as the pipeline started. With this change the job has to wait for its stage. If we decide that this is too long, we can create a post-check
job in the check
stage which will wait for the other jobs to complete. The updated dependencies/needs jobs above can then wait on this job and start right after the check
stage this way.
Does this MR meet the acceptance criteria?
-
Conforms to the code review guidelines
Note: changelog entry not required.