Skip to content
代码片段 群组 项目
未验证 提交 8e7cd5ec 编辑于 作者: Stan Hu's avatar Stan Hu
浏览文件

Explicitly set Omnibus and CNG Ruby version in CI

This commit adds `OMNIBUS_RUBY_VERSION` and `CNG_RUBY_VERSION` to
define which versions are used in the Omnibus and CNG projects.

Previously the Ruby versions used in the child pipelines for building
Omnibus and CNG was determined based on the image used in the
respective CI jobs. When we bumped the CI image to 3.1.5 in
https://gitlab.com/gitlab-org/gitlab-build-images/-/merge_requests/803,
this quietly added a requirement to Omnibus that Ruby 3.1.5 had to be
supported. At the same time, the `build-cng` image used Ruby 3.1.4, so
https://gitlab.com/gitlab-org/build/CNG-mirror/-/jobs/6821715942
started to fail once CNG stopped building Ruby 3.1.4.

While the latter case needed
https://gitlab.com/gitlab-org/build/CNG/-/merge_requests/1828, we can
at least avoid the first problem by explicitly setting the version
needed. In an ideal world, these variables would be determined
automatically from the upstream projects. However, setting these
variables avoids surprise failures and opens the possibility up for
automation to update these values.
上级 8417a631
No related branches found
No related tags found
无相关合并请求
......@@ -30,10 +30,14 @@ default:
.default-ruby-variables: &default-ruby-variables
RUBY_VERSION: "3.1"
OMNIBUS_GITLAB_CACHE_EDITION: "GITLAB_RUBY3_1"
OMNIBUS_RUBY_VERSION: "3.1.5"
CNG_RUBY_VERSION: "3.1.5"
.next-ruby-variables: &next-ruby-variables
RUBY_VERSION: "3.2"
OMNIBUS_GITLAB_CACHE_EDITION: "GITLAB_RUBY3_2"
OMNIBUS_RUBY_VERSION: "3.2.4"
CNG_RUBY_VERSION: "3.2.4"
.default-branch-pipeline-failure-variables: &default-branch-pipeline-failure-variables
CREATE_RAILS_FLAKY_TEST_ISSUES: "true"
......
......@@ -24,7 +24,7 @@ include:
script:
- 'ruby -r./scripts/trigger-build.rb -e "puts Trigger.variables_for_env_file(Trigger::CNG.new.variables)" > $BUILD_ENV'
- echo "GITLAB_ASSETS_TAG=$(assets_image_tag)" >> $BUILD_ENV
- ruby -e 'puts "FULL_RUBY_VERSION=#{RUBY_VERSION}"' >> build.env
- echo "FULL_RUBY_VERSION=${CNG_RUBY_VERSION}" >> $BUILD_ENV
- cat $BUILD_ENV
artifacts:
reports:
......
......@@ -242,7 +242,7 @@ trigger-omnibus-env:
echo "OMNIBUS_GITLAB_CACHE_EDITION=${OMNIBUS_GITLAB_CACHE_EDITION}" >> $BUILD_ENV
for version_file in *_VERSION; do echo "$version_file=$(cat $version_file)" >> $BUILD_ENV; done
echo "OMNIBUS_GITLAB_BUILD_ON_ALL_OS=${OMNIBUS_GITLAB_BUILD_ON_ALL_OS:-false}" >> $BUILD_ENV
ruby -e 'puts "FULL_RUBY_VERSION=#{RUBY_VERSION}"' >> $BUILD_ENV
echo "FULL_RUBY_VERSION=${OMNIBUS_RUBY_VERSION}" >> $BUILD_ENV
echo "SHORT_RUBY_VERSION=${RUBY_VERSION}" >> $BUILD_ENV
echo "GITLAB_ASSETS_TAG=$(assets_image_tag)" >> $BUILD_ENV
echo "EE=$([[ $FOSS_ONLY == '1' ]] && echo 'false' || echo 'true')" >> $BUILD_ENV
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册