ci: Only build custom images that need to be rebuilt

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2023-01-25 18:39:28 +01:00
parent ccd8e00291
commit 684f0ce8ef
No known key found for this signature in database
10 changed files with 125 additions and 62 deletions

View file

@ -1,7 +1,17 @@
# Used by GitLab: https://gitlab.com/gitlab-org/gitlab/blob/master/.gitlab-ci.yml
.gitlab:
extends:
- .build_dynamic_image
stage: gitlab
rules:
- !reference [.build_dynamic_image, rules]
- changes:
- "scripts/lib/custom-docker-build"
- ".gitlab/ci/gitlab.images.yml"
gitlab:
extends:
- .build_and_push
- .gitlab
stage: gitlab
variables:
RUBYGEMS: '3.2'
@ -22,8 +32,7 @@ gitlab:
gitlab-ruby-3.2:
extends:
- .build_and_push
stage: gitlab
- .gitlab
variables:
RUBYGEMS: '3.4'
LFS: '2.9'
@ -44,7 +53,7 @@ gitlab-ruby-3.2:
# Used by GitLab's compile-production-assets and compile-test-assets jobs
gitlab-assets:
extends:
- .build_and_push
- .gitlab
stage: gitlab-assets
variables:
RUBYGEMS: '3.2'
@ -62,7 +71,7 @@ gitlab-assets:
# Used by GitLab's Review app jobs
gitlab-review-app:
extends:
- .build_and_push
- .gitlab
stage: gitlab-review-app
variables:
RUBY: '3.0'