Use the 'needs' keyword for 'package-and-qa' job
What does this MR do?
Given that:
-
build-qa-image
only takes 5 minutes to finish, e.g. https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/277746904 -
gitlab:assets:compile pull-cache
takes 17 minutes (to be checked) to finish, e.g. https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/277746864 - The
test
stage finishes in 43 minutes on average (the duration ofgitlab:assets:compile pull-cache
+ the duration ofreview-build-cng
since the latter is started once the former finishes) -
package-and-qa
only needsbuild-qa-image
andgitlab:assets:compile pull-cache
to start -
package-and-qa
can take up to 45 minutes, e.g. https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/277746921 - We are saving 43 - 17 = 26 minutes for QA branches pipelines since these branches usually take around 106 to 109 minutes to finish (e.g. https://gitlab.com/gitlab-org/gitlab-ce/pipelines/76302387, https://gitlab.com/gitlab-org/gitlab-ce/pipelines/76302292). This is confirmed by the pipeline for this MR, which finished in 80 minutes "only": https://gitlab.com/gitlab-org/gitlab-ce/pipelines/77749172
I've also moved the package-and-qa-manual
and package-and-qa
to the qa
stage.
TODO:
-
Check the behavior of non-QA branch: https://gitlab.com/gitlab-org/gitlab-ce/pipelines/77828764 => See Non-QA branch below.
Example
-
build-qa-image
(prepare
stage) started at 9:57 AM UTC and finished at 10:02 AM UTC: https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/277746904 -
gitlab:assets:compile pull-cache
(test
stage) started at 9:57 AM UTC and finished at 10:14 AM UTC: https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/277746864 -
review-build-cng
(test
stage) started at 10:14 AM UTC (just aftergitlab:assets:compile pull-cache
finished) and finished at 10:40 AM UTC: https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/277746910 -
package-and-qa
(qa
stage) started at 10:14 AM UTC (just aftergitlab:assets:compile pull-cache
finished) and finished at 10:59 AM UTC: https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/277746921
Before this change, package-and-qa
would have started at 10:40 AM UTC (just after review-build-cng
finished), but now it started at 10:14 AM UTC, so we saved 26 minutes
Screenshot
QA branch
Non-QA branch
Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/65609.
Edited by Rémy Coutable