Skip to content

Commit

Permalink
Extract install-base-ruby-gems
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyCTHsu committed Nov 15, 2023
1 parent d5e9be4 commit 400e32f
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ promote-image:
- docker tag $RUBY_CUSTOM_IMAGE_BASE/$RUBY_VERSION-$ARCHITECTURE:$CI_PIPELINE_ID $RUBY_CUSTOM_IMAGE_BASE/$RUBY_VERSION-$ARCHITECTURE:current
- docker push $RUBY_CUSTOM_IMAGE_BASE/$RUBY_VERSION-$ARCHITECTURE:current

install-base-ruby-gems:
.install-base-ruby-gems:
image: $RUBY_CUSTOM_IMAGE_BASE/3.2.2-$ARCHITECTURE:current
needs:
- check-gem-presence
Expand All @@ -82,14 +82,6 @@ install-base-ruby-gems:
when: on_success
- if: '$CI_COMMIT_TAG =~ /^v.*/'
when: on_success
parallel:
matrix:
- ARCHITECTURE: amd64
TAG: "runner:main"
- ARCHITECTURE: arm64
TAG: "arch:arm64"
tags:
- $TAG
script:
# This would install all dependencies
- .gitlab/prepare_pkg_directory.sh
Expand All @@ -98,6 +90,16 @@ install-base-ruby-gems:
paths:
- pkg

install-base-ruby-gems-amd64:
extends: .install-base-ruby-gems
image: $RUBY_CUSTOM_IMAGE_BASE/3.2.2-amd64:current
tags: "runner:main"

install-base-ruby-gems-arm64:
extends: .install-base-ruby-gems
image: $RUBY_CUSTOM_IMAGE_BASE/3.2.2-arm64:current
tags: "arch:arm64"

.install-version-dependant-gems:
parallel:
matrix:
Expand Down Expand Up @@ -133,7 +135,6 @@ install-version-dependant-gems-arm64:
- check-gem-presence
- install-base-ruby-gems-arm64


check-gem-presence:
image: $RUBY_CUSTOM_IMAGE_BASE/3.2.2-amd64:current
rules:
Expand Down

0 comments on commit 400e32f

Please sign in to comment.