Merge branch 'publish-ruby-patch-release' into 'master'

Publish images with full Ruby version

See merge request https://gitlab.com/gitlab-org/gitlab-build-images/-/merge_requests/810

Merged-by: Stan Hu <stanhu@gmail.com>
Approved-by: Lin Jen-Shin <jen-shin@gitlab.com>
Reviewed-by: Rémy Coutable <remy@rymai.me>
Reviewed-by: Evan Read <eread@gitlab.com>
Reviewed-by: Lin Jen-Shin <jen-shin@gitlab.com>
Co-authored-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Stan Hu 2024-05-31 03:36:35 +00:00
commit b0f0352a1b
16 changed files with 125 additions and 98 deletions

View file

@ -24,14 +24,19 @@ default:
- gitlab-org-docker - gitlab-org-docker
stages: stages:
- custom
- gitlab
- gitlab-chart
- gitlab-assets
- gitlab-review-app
- workhorse
- gitaly
- automation - automation
- custom
- customers
- docker
- e2e
- ep
- gitaly
- gitlab
- gitlab-assets
- gitlab-chart
- gitlab-cng
- gitlab-kas
- gitlab-workhorse
variables: variables:
DOCKER_HOST: tcp://docker:2375 DOCKER_HOST: tcp://docker:2375

View file

@ -1,7 +1,7 @@
--- .customers-base:
.customers:
extends: extends:
- .build_dynamic_image - .build_dynamic_image
stage: customers
rules: rules:
- !reference [.build_dynamic_image, rules] - !reference [.build_dynamic_image, rules]
- changes: - changes:
@ -11,9 +11,9 @@
# Used by customers-gitlab-com rspec job: https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/staging/.gitlab-ci.yml # Used by customers-gitlab-com rspec job: https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/staging/.gitlab-ci.yml
customers: customers:
extends: extends:
- .customers - .customers-base
variables: variables:
RUBY: '3.2' RUBY: '3.2.4'
LFS: '2.9' LFS: '2.9'
CHROME: '119' CHROME: '119'
NODE: '20.12' NODE: '20.12'
@ -27,9 +27,9 @@ customers:
# Used by customers-gitlab-com qa e2e test: https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/staging/.gitlab/ci/e2e.gitlab-ci.yml # Used by customers-gitlab-com qa e2e test: https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/staging/.gitlab/ci/e2e.gitlab-ci.yml
customers-qa-assets: customers-qa-assets:
extends: extends:
- .customers - .customers-base
variables: variables:
RUBY: '3.2' RUBY: '3.2.4'
CHROME: '119' CHROME: '119'
NODE: '20.12' NODE: '20.12'
YARN: '1.22' YARN: '1.22'

View file

@ -1,7 +1,8 @@
# Docker image with buildx plugin # Docker image with buildx plugin
.docker: .docker-base:
extends: extends:
- .build_dynamic_image - .build_dynamic_image
stage: docker
rules: rules:
- !reference [.build_dynamic_image, rules] - !reference [.build_dynamic_image, rules]
- changes: - changes:
@ -10,7 +11,7 @@
docker: docker:
extends: extends:
- .docker - .docker-base
parallel: parallel:
matrix: matrix:
- OS: ['debian:bookworm', 'debian:bookworm-slim'] - OS: ['debian:bookworm', 'debian:bookworm-slim']

View file

@ -1,7 +1,9 @@
# Used by gitlab e2e tests and other qa related tasks # Used by gitlab e2e tests and other qa related tasks
.e2e: # Used by GitLab's Review app jobs and triage-ops
.e2e-base:
extends: extends:
- .build_dynamic_image - .build_dynamic_image
stage: e2e
rules: rules:
- !reference [.build_dynamic_image, rules] - !reference [.build_dynamic_image, rules]
- changes: - changes:
@ -21,11 +23,11 @@
# Base image with just ruby and bundler # Base image with just ruby and bundler
e2e: e2e:
extends: extends:
- .e2e - .e2e-base
parallel: parallel:
matrix: matrix:
- OS: ["debian:bookworm"] - OS: ["debian:bookworm"]
RUBY: ['3.0', '3.1', '3.2'] RUBY: ['3.0.6', '3.1.5', '3.2.4']
BUNDLER: ['2.4', '2.5'] BUNDLER: ['2.4', '2.5']
# Image with ruby, bundler and docker # Image with ruby, bundler and docker
@ -42,7 +44,7 @@ e2e-chrome:
parallel: parallel:
matrix: matrix:
- OS: ["debian:bookworm"] - OS: ["debian:bookworm"]
RUBY: ['3.0', '3.1', '3.2'] RUBY: ['3.0.6', '3.1.5', '3.2.4']
BUNDLER: ['2.4', '2.5'] BUNDLER: ['2.4', '2.5']
CHROME: ['120', '123'] CHROME: ['120', '123']
@ -58,7 +60,7 @@ e2e-cng:
parallel: parallel:
matrix: matrix:
- OS: ['debian:bookworm'] - OS: ['debian:bookworm']
RUBY: ['3.0', '3.1', '3.2'] RUBY: ['3.0.6', '3.1.5', '3.2.4']
BUNDLER: ['2.5'] BUNDLER: ['2.5']
CHROME: ['120', '123'] CHROME: ['120', '123']

18
.gitlab/ci/ep.images.yml Normal file
View file

@ -0,0 +1,18 @@
# Used by GitLab's Review app jobs and triage-ops
.ep-base:
extends:
- .build_dynamic_image
stage: ep
rules:
- !reference [.build_dynamic_image, rules]
- changes:
- ".gitlab/ci/ep.images.yml"
ep-native-cloud-services:
extends:
- .ep-base
variables:
RUBY: '3.2.4'
GCLOUD: '383'
KUBECTL: '1.27'
HELM: '3.9'

View file

@ -1,7 +1,8 @@
# Used by Gitaly: https://gitlab.com/gitlab-org/gitaly/blob/master/.gitlab-ci.yml # Used by Gitaly: https://gitlab.com/gitlab-org/gitaly/blob/master/.gitlab-ci.yml
.gitaly: .gitaly-base:
extends: extends:
- .build_dynamic_image - .build_dynamic_image
stage: gitaly
rules: rules:
- !reference [.build_dynamic_image, rules] - !reference [.build_dynamic_image, rules]
- changes: - changes:
@ -12,10 +13,8 @@
- ".gitlab/ci/gitaly.images.yml" - ".gitlab/ci/gitaly.images.yml"
gitaly: gitaly:
needs: []
extends: extends:
- .gitaly - .gitaly-base
stage: gitaly
parallel: parallel:
matrix: matrix:
- OS: ['debian:bookworm'] - OS: ['debian:bookworm']

View file

@ -1,8 +1,9 @@
# Used by GitLab chart CI (https://gitlab.com/gitlab-org/charts/gitlab) # Used by GitLab chart CI (https://gitlab.com/gitlab-org/charts/gitlab)
.gitlab-chart: .gitlab-chart-base:
extends: extends:
- .build_dynamic_image - .build_dynamic_image
stage: gitlab-chart
rules: rules:
- !reference [.build_dynamic_image, rules] - !reference [.build_dynamic_image, rules]
- changes: - changes:
@ -16,10 +17,9 @@
gitlab-chart: gitlab-chart:
extends: extends:
- .gitlab-chart - .gitlab-chart-base
stage: gitlab-chart
variables: variables:
RUBY: '3.2' RUBY: '3.2.4'
HELM: '3.10' HELM: '3.10'
HELM_KUBECONFORM: '0.1.17' HELM_KUBECONFORM: '0.1.17'
VCLUSTER: '0.19' VCLUSTER: '0.19'

View file

@ -1,5 +1,8 @@
# Used by GitLab: https://gitlab.com/gitlab-org/gitlab/blob/master/.gitlab-ci.yml # Used by GitLab: https://gitlab.com/gitlab-org/gitlab/blob/master/.gitlab-ci.yml
.gitlab-cng-matrix: .gitlab-cng-base:
extends:
- .build_dynamic_image
stage: gitlab-cng
variables: variables:
LFS: '2.9' LFS: '2.9'
CHROME: '123' CHROME: '123'
@ -7,7 +10,7 @@
YARN: '1.22' YARN: '1.22'
GRAPHICSMAGICK: '1.3.36' GRAPHICSMAGICK: '1.3.36'
POSTGRESQL: '11' POSTGRESQL: '11'
RUBY: '3.0.patched' RUBY: '3.0.6'
GIT: '2.33' GIT: '2.33'
GOLANG: '1.21' GOLANG: '1.21'
KUBECTL: '1.23' KUBECTL: '1.23'
@ -15,8 +18,7 @@
gitlab-cng: gitlab-cng:
extends: extends:
- .gitlab-cng-matrix - .gitlab-cng-base
- .build_dynamic_image
rules: rules:
- !reference [.build_dynamic_image, rules] - !reference [.build_dynamic_image, rules]
- changes: - changes:

View file

@ -1,7 +1,8 @@
# Used by GitLab/KAS integration tests # Used by GitLab/KAS integration tests
.kas: .gitlab-kas-base:
extends: extends:
- .build_dynamic_image - .build_dynamic_image
stage: gitlab-kas
rules: rules:
- !reference [.build_dynamic_image, rules] - !reference [.build_dynamic_image, rules]
- changes: - changes:
@ -10,7 +11,7 @@
gitlab-kas: gitlab-kas:
extends: extends:
- .kas - .gitlab-kas-base
variables: variables:
GOLANG: '1.21' GOLANG: '1.21'
RUST: '1.73' RUST: '1.73'
@ -23,4 +24,4 @@ gitlab-kas:
POSTGRESQL: '12' POSTGRESQL: '12'
parallel: parallel:
matrix: matrix:
- RUBY: ['3.0.patched', '3.1.patched', '3.2.patched'] - RUBY: ['3.0.6', '3.1.5', '3.2.4']

View file

@ -1,36 +1,19 @@
# Used by GitLab: https://gitlab.com/gitlab-org/gitlab/blob/master/.gitlab-ci.yml # Used by GitLab: https://gitlab.com/gitlab-org/gitlab/blob/master/.gitlab-ci.yml
.gitlab: .gitlab-base:
extends: extends:
- .build_dynamic_image - .build_dynamic_image
stage: gitlab stage: gitlab
rules: rules:
- !reference [.build_dynamic_image, rules] - !reference [.build_dynamic_image, rules]
- changes: - changes:
- "scripts/install-bazelisk" - "scripts/install-*"
- "scripts/install-chrome"
- "scripts/install-docker"
- "scripts/install-essentials"
- "scripts/install-exiftool"
- "scripts/install-git"
- "scripts/install-gcloud"
- "scripts/install-golang"
- "scripts/install-graphicsmagick"
- "scripts/install-helm"
- "scripts/install-kubectl"
- "scripts/install-lfs"
- "scripts/install-node"
- "scripts/install-pcre2"
- "scripts/install-postgresql"
- "scripts/install-ruby"
- "scripts/install-rust"
- "scripts/lib/custom-docker-build" - "scripts/lib/custom-docker-build"
- ".gitlab/ci/gitlab.images.yml" - ".gitlab/ci/gitlab.images.yml"
- "patches/ruby/**/*" - "patches/ruby/**/*"
gitlab: gitlab:
extends: extends:
- .gitlab - .gitlab-base
stage: gitlab
variables: variables:
RUBYGEMS: '3.4' RUBYGEMS: '3.4'
LFS: '2.9' LFS: '2.9'
@ -43,15 +26,24 @@ gitlab:
parallel: parallel:
matrix: matrix:
- OS: ['debian:bookworm', 'debian:bookworm-slim'] - OS: ['debian:bookworm', 'debian:bookworm-slim']
RUBY: ['3.0.patched', '3.1.patched', '3.2.patched'] RUBY: ['3.0.6', '3.1.5', '3.2.4']
POSTGRESQL: ['13', '14', '15', '16'] POSTGRESQL: ['13', '14', '15', '16']
GOLANG: ['1.21', '1.22'] GOLANG: ['1.21', '1.22']
CHROME: ['123'] CHROME: ['123']
# Used by GitLab's jobs that work with ruby gems
gitlab-slim-ruby:
extends:
- .gitlab-base
parallel:
matrix:
- RUBY: ['3.0.6', '3.1.5', '3.2.4']
OS: ['debian:bookworm-slim']
# Used by GitLab's compile-production-assets and compile-test-assets jobs # Used by GitLab's compile-production-assets and compile-test-assets jobs
gitlab-assets: gitlab-assets:
extends: extends:
- .gitlab - .gitlab-base
stage: gitlab-assets stage: gitlab-assets
variables: variables:
RUBYGEMS: '3.4' RUBYGEMS: '3.4'
@ -63,48 +55,27 @@ gitlab-assets:
parallel: parallel:
matrix: matrix:
- OS: ['debian:bookworm'] - OS: ['debian:bookworm']
RUBY: ['3.0', '3.1', '3.2'] RUBY: ['3.0.6', '3.1.5', '3.2.4']
GIT: ['2.33'] GIT: ['2.33']
# Used by GitLab's Review app jobs and triage-ops
ep-native-cloud-services:
extends:
- .gitlab
stage: gitlab-review-app
variables:
RUBY: '3.0'
GCLOUD: '383'
KUBECTL: '1.27'
HELM: '3.9'
# Used by GitLab's jobs that work with ruby gems
gitlab-slim-ruby:
extends:
- .gitlab
stage: gitlab
parallel:
matrix:
- RUBY: ['3.0', '3.1', '3.2']
OS: ['debian:bookworm-slim']
# Used by GitLab's workhorse tests # Used by GitLab's workhorse tests
gitlab-workhorse: gitlab-workhorse:
needs: [] needs: []
extends: extends:
- .gitlab - .gitlab-base
stage: workhorse stage: gitlab-workhorse
variables: variables:
EXIFTOOL: '12.60' EXIFTOOL: '12.60'
RUBYGEMS: '3.4' RUBYGEMS: '3.4'
parallel: parallel:
matrix: matrix:
- OS: ['debian:bookworm'] - OS: ['debian:bookworm']
RUBY: ['3.0', '3.1', '3.2'] RUBY: ['3.0.6', '3.1.5', '3.2.4']
GOLANG: ['1.21', '1.22'] GOLANG: ['1.21', '1.22']
RUST: ['1.73'] RUST: ['1.73']
GIT: ['2.36'] GIT: ['2.36']
- OS: ['ubi:8.6'] - OS: ['ubi:8.6']
RUBY: ['3.0', '3.1', '3.2'] RUBY: ['3.0.6', '3.1.5', '3.2.4']
GOLANG: ['1.21', '1.22'] GOLANG: ['1.21', '1.22']
RUST: ['1.73'] RUST: ['1.73']
GIT: ['2.36'] GIT: ['2.36']

View file

@ -0,0 +1,28 @@
ARG GCLOUD_VERSION=413.0.0
# Google-cloud-sdk
#
# gsutil 5.18 unnecessarily requires the storage.buckets.get
# permission: https://github.com/GoogleCloudPlatform/gsutil/issues/1663
FROM gcr.io/google.com/cloudsdktool/cloud-sdk:$GCLOUD_VERSION as gcloud-sdk
FROM ruby:3.2.4-slim-bookworm
# pupulated by docker buildx build --platform flag
ARG TARGETARCH
# Install Google Cloud SDK for deploys via rsync
COPY --from=gcloud-sdk /usr/lib/google-cloud-sdk /usr/lib/google-cloud-sdk
COPY --from=gcloud-sdk /usr/share/google-cloud-sdk /usr/share/google-cloud-sdk
RUN cd /usr/bin && find ../lib/google-cloud-sdk/bin -type f -executable -exec ln -s {} \;; cd -
ADD /scripts/ /scripts/
ADD /patches /patches/
ENV NODE_INSTALL_VERSION=20.12.2
ENV YARN_INSTALL_VERSION=1.22.19
RUN /scripts/install-www-gitlab-com
# Set UTF-8 http://jaredmarkell.com/docker-and-locales/
# Must be set after install-essentials is run
ENV LANG C.UTF-8
ENV LANGUAGE C
ENV LC_ALL C.UTF-8

View file

@ -5,7 +5,7 @@ ARG GCLOUD_VERSION=413.0.0
# gsutil 5.18 unnecessarily requires the storage.buckets.get # gsutil 5.18 unnecessarily requires the storage.buckets.get
# permission: https://github.com/GoogleCloudPlatform/gsutil/issues/1663 # permission: https://github.com/GoogleCloudPlatform/gsutil/issues/1663
FROM gcr.io/google.com/cloudsdktool/cloud-sdk:$GCLOUD_VERSION as gcloud-sdk FROM gcr.io/google.com/cloudsdktool/cloud-sdk:$GCLOUD_VERSION as gcloud-sdk
FROM ruby:3.0.5-slim-bullseye FROM ruby:3.0.6-slim-bullseye
# pupulated by docker buildx build --platform flag # pupulated by docker buildx build --platform flag
ARG TARGETARCH ARG TARGETARCH

View file

@ -5,7 +5,7 @@ ARG GCLOUD_VERSION=413.0.0
# gsutil 5.18 unnecessarily requires the storage.buckets.get # gsutil 5.18 unnecessarily requires the storage.buckets.get
# permission: https://github.com/GoogleCloudPlatform/gsutil/issues/1663 # permission: https://github.com/GoogleCloudPlatform/gsutil/issues/1663
FROM gcr.io/google.com/cloudsdktool/cloud-sdk:$GCLOUD_VERSION as gcloud-sdk FROM gcr.io/google.com/cloudsdktool/cloud-sdk:$GCLOUD_VERSION as gcloud-sdk
FROM ruby:3.2.2-slim-bullseye FROM ruby:3.2.4-slim-bullseye
# pupulated by docker buildx build --platform flag # pupulated by docker buildx build --platform flag
ARG TARGETARCH ARG TARGETARCH

View file

@ -85,7 +85,7 @@ Here are some example build names:
1. `debian-bullseye-ruby-2.7-golang-1.15:git-2.29` 1. `debian-bullseye-ruby-2.7-golang-1.15:git-2.29`
1. `debian-bullseye-ruby-3.0.0-node-14.15:git-2.29-lfs-2.9-yarn-1.22-graphicsmagick-1.3.34` 1. `debian-bullseye-ruby-3.0.0-node-14.15:git-2.29-lfs-2.9-yarn-1.22-graphicsmagick-1.3.34`
1. `debian-bullseye-ruby-3.0.0.patched-golang-1.14-postgresql-12:git-2.29-lfs-2.9-chrome-87-node-14.15-yarn-1.22-graphicsmagick-1.3.34` 1. `debian-bullseye-ruby-3.0.0-golang-1.14-postgresql-12:git-2.29-lfs-2.9-chrome-87-node-14.15-yarn-1.22-graphicsmagick-1.3.34`
#### Adding a new build #### Adding a new build
@ -98,7 +98,7 @@ new_image:
- .build_dynamic_image - .build_dynamic_image
variables: variables:
OS: 'debian:bookworm' OS: 'debian:bookworm'
RUBY: '3.0' RUBY: '3.0.6'
GOLANG: '1.15' GOLANG: '1.15'
RUST: '1.73.0' RUST: '1.73.0'
GIT: '2.29' GIT: '2.29'

View file

@ -222,17 +222,17 @@ function print_bazelisk_args() {
function print_ruby_args() { function print_ruby_args() {
case "$1" in case "$1" in
3.0|3.0.patched) 3.0.6)
RUBY_VERSION="3.0.6" RUBY_VERSION="3.0.6"
RUBY_DOWNLOAD_SHA256="6e6cbd490030d7910c0ff20edefab4294dfcd1046f0f8f47f78b597987ac683e" RUBY_DOWNLOAD_SHA256="6e6cbd490030d7910c0ff20edefab4294dfcd1046f0f8f47f78b597987ac683e"
;; ;;
3.1|3.1.patched) 3.1.5)
RUBY_VERSION="3.1.5" RUBY_VERSION="3.1.5"
RUBY_DOWNLOAD_SHA256="3685c51eeee1352c31ea039706d71976f53d00ab6d77312de6aa1abaf5cda2c5" RUBY_DOWNLOAD_SHA256="3685c51eeee1352c31ea039706d71976f53d00ab6d77312de6aa1abaf5cda2c5"
;; ;;
3.2|3.2.patched) 3.2.4)
RUBY_VERSION="3.2.4" RUBY_VERSION="3.2.4"
RUBY_DOWNLOAD_SHA256="c72b3c5c30482dca18b0f868c9075f3f47d8168eaf626d4e682ce5b59c858692" RUBY_DOWNLOAD_SHA256="c72b3c5c30482dca18b0f868c9075f3f47d8168eaf626d4e682ce5b59c858692"
;; ;;

View file

@ -8,7 +8,7 @@ TAG_TOOLS=(BUNDLER RUBYGEMS GIT LFS CHROME YARN GRAPHICSMAGICK EXIFTOOL BAZELISK
# variables. # variables.
# For example, consider a CI job which specifies the following variables: # For example, consider a CI job which specifies the following variables:
# OS: debian:bullseye # OS: debian:bullseye
# RUBY: 3.0 # RUBY: 3.0.6
# GOLANG: 1.19 # GOLANG: 1.19
# RUST: 1.73.0 # RUST: 1.73.0
# GIT: 2.33 # GIT: 2.33
@ -43,7 +43,7 @@ function get_image_path() {
# Generate the image tag using the components that were specified via variables. # Generate the image tag using the components that were specified via variables.
# For example, consider a CI job which specifies the following variables: # For example, consider a CI job which specifies the following variables:
# OS: debian:bullseye # OS: debian:bullseye
# RUBY: 2.7 # RUBY: 3.1.5
# GOLANG: 1.19 # GOLANG: 1.19
# RUST: 1.73.0 # RUST: 1.73.0
# GIT: 2.33 # GIT: 2.33