Refactor CI stages
Currently, our CI tasks are split into three stages:
- build
- test
- deploy
The test stage contains only one task: system_tests.
The CI stages work so that the previous stage must finish before the next starts.
The build stage contains two heavy tasks: build_deb
and build_rpms
. They take a lot of time. Additionally, they produce significant artifacts - binary packages. We limit the lifetime of these artifacts to 5 minutes to limit disk space usage.
It has one unexpected consequence. The system tests may be run only 5 minutes after finishing the build stage. It causes the repeating of the system tests pipeline to be impossible.
I propose to refactor the stages. We should split the heavy tasks (system tests, build packages) from the fast, light tasks:
- check-in
- heavy
- deploy
It allows us not to start time- and resource-consuming tasks when the basic checks fail. Additionally, it fixes a problem with creating the system tests pipeline.