(Overview) E2E: Have MRs run E2E during MRs.
🆕 Pipeline Feature Overview
Affected app variants: All
Summary
Have MRs run E2E during MRs.
Background
We have started to add support for our E2E to run on our pipeline. We want to use them. As of now, we have done two important things.
- Write a good amount of E2E tests.
- Have a mechanism to run E2E against QA and DEV.
This is wonderful but we need to move forward to having E2E tests being run at other parts of the development cycle. Two of these are on MRs and on Main Merge
Acceptance Criteria
-
Run on MRs
Ideas
The main challenge for this task is to spawn a running version of the branch that doesn't break and support running cypress.
- Check out how to improve the performance "services" defined in the jobs. If this works out, it can be great as we wouldn't have to do anything else. However, one problem with this approach is that services are spawned per job. That means that the service image gets started multiple time at the same time, and this is probably the reason why everything gets some much slower.
- Spawn a simple VM that runs an arbitrary branch on an arbitrary domain like hcp.branch-XZY-TIMESTAMP.recovery.cat. This VM or service should only run for a temporal amount of time, while the tests are running. Unlike the previous approach, this approach would provide great performance because we would only need one instance and not multiple. Not sure how feasible it is to have such control with Kubernetes.
- After some research we found a very convenient way to spawn an image. Serverless containers. You can read more about it here: https://git.recoverycat.de/recoverycat.ops/serverless-e2e-image.
Tasks
-
Investigate service performace for gitlab jobs, and decide if approach 1 could work out. #1213 (closed) -
Investigate and implement best option for spawning temporal service if 1 doesn't work. -
Write code that spawns serverless container. https://git.recoverycat.de/recoverycat.ops/serverless-e2e-image. -
Modify pipeline to integrate the E2E steps into the MRs steps. !1114 (merged) -
Add doc to knowledge repo: https://git.recoverycat.de/recoverycat/rcc-knowledge-base/-/blob/main/how-tos/how-to-do-e2e-with-mrs-pipeline.md -
Add 2 more runners for better performance -
Add docker tags of new runners to docker jobs -
Add clean-up jobs for error cases. This will handled in Deploy Serverless V2 (#1324)