Improve interaction between scheduled and docker pipelines
This is a part of !3605 (closed), which was too big to review. This MR makes use of the new pipeline names to help fix the interactions between scheduled pipelines and the other pipelines (mostly docker image jobs).
- We should run tests before building the images, so adds the test to the image build pipeline.
- Moves the
build-images
stage to run after the tests. - Makes sure docker image jobs aren't added to other "scheduled" pipelines, including the hourly deployment pipeline and the monthly environments cleanup.
- Removes several related
when: never
rules that are no longer needed now that we are using pipeline names, and not rules that apply to all scheduled pipelines.
Example of current scheduled config that is incorrect:
- Hourly deployment: https://gitlab.com/gitlab-org/gitlab-docs/-/pipelines/799325412
- Doesn't need any
image:*
jobs
- Doesn't need any
- Monthly cleanup: https://gitlab.com/gitlab-org/gitlab-docs/-/pipelines/799330392
- Doesn't need any jobs other than
delete_stopped_environments
- Doesn't need any jobs other than
- (manual schedule) Docker image builds: https://gitlab.com/gitlab-org/gitlab-docs/-/pipelines/799326716
- Tests run in stage after
build-images
- No docker image tests run
- You can build images no matter the outcome of the tests.
- Tests run in stage after
Related issues
- Related to #1324 (closed)
- Related to gitlab#389812 (closed)
Edited by Marcel Amirault