fix: pipeline failures due to missing CSP unit test jobs when protected...
The one-pipeline CSP unit test jobs require branches to be run on a trusted branch or master, however the containerize jobs do not have the same requirement. This results in an invalid pipeline definition when triggering a protected branch run on a non-trusted branch, since the CSP unit test jobs do not exist but the containerize jobs do exist but have a dependency on the unit test jobs.
There are two approaches to solve this problem:
- Fix the job rules so it runs on all protected branches and propagate this rule to later stages.
- Remove the job rules.
I've removed the job rules to keep the pipeline rules simple. Removing the job rules still has the same intended behavior where the CSP unit/compile stages aren't run on non-protected branches.
Currently, only Legal service is using the one-pipeline approach. Here are pipeline runs that demonstrate the working behavior:
- Non-trusted protected branch: https://community.opengroup.org/osdu/platform/security-and-compliance/legal/-/pipelines/299472
- Unprotected branch: https://community.opengroup.org/osdu/platform/security-and-compliance/legal/-/pipelines/299475