Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
GitLab
管理
动态
成员
标记
计划
议题
议题看板
里程碑
迭代
需求
代码
合并请求
仓库
分支
提交
标签
仓库图
比较修订版本
代码片段
锁定的文件
构建
流水线
作业
流水线计划
测试用例
产物
部署
发布
Package registry
容器镜像库
模型注册表
运维
环境
Terraform 模块
监控
事件
服务台
分析
价值流分析
贡献者分析
CI/CD 分析
仓库分析
代码评审分析
议题分析
洞察
模型实验
效能分析
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
gitlab-cn
GitLab
提交
6c2c0ecf
未验证
提交
6c2c0ecf
编辑于
10 months ago
作者:
Rémy Coutable
浏览文件
操作
下载
补丁
差异文件
Run merge requests in Ruby 3.2 by default
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
上级
97ad3cad
No related branches found
分支 包含提交
No related tags found
标签 包含提交
无相关合并请求
变更
4
隐藏空白变更内容
行内
左右并排
显示
4 个更改的文件
.gitlab-ci.yml
+6
-26
6 个添加, 26 个删除
.gitlab-ci.yml
.gitlab/ci/rules.gitlab-ci.yml
+0
-7
0 个添加, 7 个删除
.gitlab/ci/rules.gitlab-ci.yml
.gitlab/ci/setup.gitlab-ci.yml
+0
-9
0 个添加, 9 个删除
.gitlab/ci/setup.gitlab-ci.yml
doc/development/pipelines/index.md
+2
-14
2 个添加, 14 个删除
doc/development/pipelines/index.md
有
8 个添加
和
56 个删除
.gitlab-ci.yml
+
6
−
26
浏览文件 @
6c2c0ecf
...
@@ -27,10 +27,6 @@ default:
...
@@ -27,10 +27,6 @@ default:
# Default job timeout doesn't work: https://gitlab.com/gitlab-org/gitlab/-/issues/387528
# Default job timeout doesn't work: https://gitlab.com/gitlab-org/gitlab/-/issues/387528
timeout
:
90m
timeout
:
90m
.old-ruby-variables
:
&old-ruby-variables
RUBY_VERSION
:
"
3.0"
OMNIBUS_GITLAB_CACHE_EDITION
:
"
GITLAB_RUBY3_0"
.default-ruby-variables
:
&default-ruby-variables
.default-ruby-variables
:
&default-ruby-variables
RUBY_VERSION
:
"
3.1"
RUBY_VERSION
:
"
3.1"
OMNIBUS_GITLAB_CACHE_EDITION
:
"
GITLAB_RUBY3_1"
OMNIBUS_GITLAB_CACHE_EDITION
:
"
GITLAB_RUBY3_1"
...
@@ -45,6 +41,7 @@ default:
...
@@ -45,6 +41,7 @@ default:
CREATE_RAILS_TEST_FAILURE_ISSUES
:
"
true"
CREATE_RAILS_TEST_FAILURE_ISSUES
:
"
true"
.default-merge-request-variables
:
&default-merge-request-variables
.default-merge-request-variables
:
&default-merge-request-variables
NO_SOURCEMAPS
:
"
true"
ADD_SLOW_TEST_NOTE_TO_MERGE_REQUEST
:
"
true"
ADD_SLOW_TEST_NOTE_TO_MERGE_REQUEST
:
"
true"
.if-merge-request-security-canonical-sync
:
&if-merge-request-security-canonical-sync
.if-merge-request-security-canonical-sync
:
&if-merge-request-security-canonical-sync
...
@@ -76,27 +73,15 @@ workflow:
...
@@ -76,27 +73,15 @@ workflow:
# they serve no purpose and will run anyway when the changes are merged.
# they serve no purpose and will run anyway when the changes are merged.
-
if
:
'
$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
=~
/^release-tools\/\d+\.\d+\.\d+-rc\d+$/
&&
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
=~
/^[\d-]+-stable(-ee)?$/
&&
$CI_PROJECT_PATH
==
"gitlab-org/gitlab"'
-
if
:
'
$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
=~
/^release-tools\/\d+\.\d+\.\d+-rc\d+$/
&&
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
=~
/^[\d-]+-stable(-ee)?$/
&&
$CI_PROJECT_PATH
==
"gitlab-org/gitlab"'
when
:
never
when
:
never
-
if
:
'
$CI_MERGE_REQUEST_LABELS
=~
/pipeline:run-in-ruby3_0/'
variables
:
<<
:
*old-ruby-variables
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
MR'
NO_SOURCEMAPS
:
'
true'
-
if
:
'
$CI_MERGE_REQUEST_LABELS
=~
/pipeline:run-in-ruby3_1/'
-
if
:
'
$CI_MERGE_REQUEST_LABELS
=~
/pipeline:run-in-ruby3_1/'
variables
:
variables
:
<<
:
*default-ruby-variables
<<
:
[
*default-ruby-variables
,
*default-merge-request-variables
]
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
MR'
NO_SOURCEMAPS
:
'
true'
-
if
:
'
$CI_MERGE_REQUEST_LABELS
=~
/pipeline:run-in-ruby3_2/'
variables
:
<<
:
*next-ruby-variables
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
MR'
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
MR'
NO_SOURCEMAPS
:
'
true'
-
if
:
'
$CI_MERGE_REQUEST_LABELS
=~
/Community
contribution/'
-
if
:
'
$CI_MERGE_REQUEST_LABELS
=~
/Community
contribution/'
variables
:
variables
:
<<
:
*default-ruby
-variables
<<
:
[
*next-ruby-variables
,
*default-merge-request
-variables
]
GITLAB_DEPENDENCY_PROXY_ADDRESS
:
"
"
GITLAB_DEPENDENCY_PROXY_ADDRESS
:
"
"
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
MR
(community
contribution)'
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
MR
(community
contribution)'
NO_SOURCEMAPS
:
'
true'
# This work around https://gitlab.com/gitlab-org/gitlab/-/issues/332411 which prevents usage of dependency proxy
# This work around https://gitlab.com/gitlab-org/gitlab/-/issues/332411 which prevents usage of dependency proxy
# when pipeline is triggered by a project access token.
# when pipeline is triggered by a project access token.
# Example of project bot usernames (the format changed over time):
# Example of project bot usernames (the format changed over time):
...
@@ -104,30 +89,25 @@ workflow:
...
@@ -104,30 +89,25 @@ workflow:
# - project_278964_bot_7fb4d1cca8242cb399a0b8f483783120
# - project_278964_bot_7fb4d1cca8242cb399a0b8f483783120
-
if
:
'
$CI_MERGE_REQUEST_IID
&&
$GITLAB_USER_LOGIN
=~
/project_\d+_bot/'
-
if
:
'
$CI_MERGE_REQUEST_IID
&&
$GITLAB_USER_LOGIN
=~
/project_\d+_bot/'
variables
:
variables
:
<<
:
*default-ruby
-variables
<<
:
[
*next-ruby-variables
,
*default-merge-request
-variables
]
GITLAB_DEPENDENCY_PROXY_ADDRESS
:
"
"
GITLAB_DEPENDENCY_PROXY_ADDRESS
:
"
"
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
MR
(triggered
by
a
project
token)'
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
MR
(triggered
by
a
project
token)'
-
<<
:
*if-merge-request-security-canonical-sync
-
<<
:
*if-merge-request-security-canonical-sync
variables
:
variables
:
<<
:
*default-ruby
-variables
<<
:
[
*next-ruby-variables
,
*default-merge-request
-variables
]
PIPELINE_NAME
:
'
$CI_DEFAULT_BRANCH
security->canonical
sync'
PIPELINE_NAME
:
'
$CI_DEFAULT_BRANCH
security->canonical
sync'
SKIP_MESSAGE
:
'
MR
only
contains
changes
from
the
security
mirror,
which
have
already
been
reviewed,
tested
and
deployed.'
SKIP_MESSAGE
:
'
MR
only
contains
changes
from
the
security
mirror,
which
have
already
been
reviewed,
tested
and
deployed.'
# For (detached) merge request pipelines.
# For (detached) merge request pipelines.
-
if
:
'
$CI_MERGE_REQUEST_IID'
-
if
:
'
$CI_MERGE_REQUEST_IID'
variables
:
variables
:
<<
:
[
*
defaul
t-ruby-variables
,
*default-merge-request-variables
]
<<
:
[
*
nex
t-ruby-variables
,
*default-merge-request-variables
]
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
MR'
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
MR'
NO_SOURCEMAPS
:
'
true'
# For the scheduled pipelines, we set specific variables.
# For the scheduled pipelines, we set specific variables.
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH
&&
$CI_PIPELINE_SOURCE
==
"schedule"'
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH
&&
$CI_PIPELINE_SOURCE
==
"schedule"'
variables
:
variables
:
<<
:
[
*default-ruby-variables
,
*default-branch-pipeline-failure-variables
]
<<
:
[
*default-ruby-variables
,
*default-branch-pipeline-failure-variables
]
CRYSTALBALL
:
"
true"
CRYSTALBALL
:
"
true"
PIPELINE_NAME
:
'
Scheduled
Ruby
$RUBY_VERSION
$CI_COMMIT_BRANCH
branch'
PIPELINE_NAME
:
'
Scheduled
Ruby
$RUBY_VERSION
$CI_COMMIT_BRANCH
branch'
-
if
:
'
$CI_COMMIT_BRANCH
==
"ruby3_0"
&&
$CI_PIPELINE_SOURCE
==
"schedule"'
variables
:
<<
:
*old-ruby-variables
PIPELINE_NAME
:
'
Scheduled
Ruby
$RUBY_VERSION
$CI_COMMIT_BRANCH
branch'
-
if
:
'
$CI_COMMIT_BRANCH
==
"ruby3_2"
&&
$CI_PIPELINE_SOURCE
==
"schedule"'
-
if
:
'
$CI_COMMIT_BRANCH
==
"ruby3_2"
&&
$CI_PIPELINE_SOURCE
==
"schedule"'
variables
:
variables
:
<<
:
*next-ruby-variables
<<
:
*next-ruby-variables
...
...
此差异已折叠。
点击以展开。
.gitlab/ci/rules.gitlab-ci.yml
+
0
−
7
浏览文件 @
6c2c0ecf
...
@@ -62,9 +62,6 @@
...
@@ -62,9 +62,6 @@
.if-merge-request-targeting-stable-branch
:
&if-merge-request-targeting-stable-branch
.if-merge-request-targeting-stable-branch
:
&if-merge-request-targeting-stable-branch
if
:
'
($CI_MERGE_REQUEST_EVENT_TYPE
==
"merged_result"
||
$CI_MERGE_REQUEST_EVENT_TYPE
==
"detached")
&&
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
=~
/^[\d-]+-stable(-ee|-jh)?$/'
if
:
'
($CI_MERGE_REQUEST_EVENT_TYPE
==
"merged_result"
||
$CI_MERGE_REQUEST_EVENT_TYPE
==
"detached")
&&
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
=~
/^[\d-]+-stable(-ee|-jh)?$/'
.if-merge-request-labels-run-in-ruby
:
&if-merge-request-labels-run-in-ruby
if
:
'
$CI_MERGE_REQUEST_LABELS
=~
/pipeline:run-in-ruby\d+(_\d)*/'
.if-merge-request-labels-as-if-foss
:
&if-merge-request-labels-as-if-foss
.if-merge-request-labels-as-if-foss
:
&if-merge-request-labels-as-if-foss
if
:
'
$CI_MERGE_REQUEST_LABELS
=~
/pipeline:run-as-if-foss/'
if
:
'
$CI_MERGE_REQUEST_LABELS
=~
/pipeline:run-as-if-foss/'
...
@@ -2924,10 +2921,6 @@
...
@@ -2924,10 +2921,6 @@
-
<<
:
*if-default-refs
-
<<
:
*if-default-refs
changes
:
*code-backstage-patterns
changes
:
*code-backstage-patterns
.setup:rules:verify-default-ruby
:
rules
:
-
<<
:
*if-merge-request-labels-run-in-ruby
.setup:rules:set-pipeline-name
:
.setup:rules:set-pipeline-name
:
rules
:
rules
:
-
<<
:
*if-not-merge-request
# This is only designed to run in a merge request
-
<<
:
*if-not-merge-request
# This is only designed to run in a merge request
...
...
此差异已折叠。
点击以展开。
.gitlab/ci/setup.gitlab-ci.yml
+
0
−
9
浏览文件 @
6c2c0ecf
...
@@ -88,15 +88,6 @@ gitlab_git_test:
...
@@ -88,15 +88,6 @@ gitlab_git_test:
script
:
script
:
-
spec/support/prepare-gitlab-git-test-for-commit --check-for-changes
-
spec/support/prepare-gitlab-git-test-for-commit --check-for-changes
verify-default-ruby
:
extends
:
-
.absolutely-predictive-job
-
.setup:rules:verify-default-ruby
stage
:
prepare
script
:
-
echo 'Please remove label ~"pipeline:run-in-ruby3_2" or ~"pipeline:run-in-ruby3_0" so we do test against default Ruby version before merging the merge request'
-
exit
1
verify-tests-yml
:
verify-tests-yml
:
extends
:
extends
:
-
.setup:rules:verify-tests-yml
-
.setup:rules:verify-tests-yml
...
...
此差异已折叠。
点击以展开。
doc/development/pipelines/index.md
+
2
−
14
浏览文件 @
6c2c0ecf
...
@@ -648,8 +648,8 @@ Exceptions to this general guideline should be motivated and documented.
...
@@ -648,8 +648,8 @@ Exceptions to this general guideline should be motivated and documented.
### Ruby versions testing
### Ruby versions testing
We're running Ruby 3.1 on GitLab.com, as well as for the default branch.
We're running Ruby 3.1 on GitLab.com, as well as for the default branch.
To prepare for the next Ruby version, we
will
run merge requests in Ruby 3.2
,
To prepare for the next Ruby version, we run merge requests in Ruby 3.2
.
starting on February 2024.
Please see the roadmap at
Please see the roadmap at
[
Ruby 3.2 epic
](
https://gitlab.com/groups/gitlab-org/-/epics/9684#plan
)
[
Ruby 3.2 epic
](
https://gitlab.com/groups/gitlab-org/-/epics/9684#plan
)
for more details.
for more details.
...
@@ -659,19 +659,7 @@ suite on dedicated 2-hourly scheduled pipelines for each supported versions.
...
@@ -659,19 +659,7 @@ suite on dedicated 2-hourly scheduled pipelines for each supported versions.
For merge requests, you can add the following labels to run the respective
For merge requests, you can add the following labels to run the respective
Ruby version only:
Ruby version only:
-
`pipeline:run-in-ruby3_0`
-
`pipeline:run-in-ruby3_1`
-
`pipeline:run-in-ruby3_1`
-
`pipeline:run-in-ruby3_2`
Note that when you do this, the test suite will no longer run in the default
Ruby version for merge requests. In this case, an additional job
`verify-default-ruby`
will also run and always fail to remind us to remove
the label and run in default Ruby before merging the merge request.
This should let us:
-
Test changes for any supported Ruby versions
-
Make sure it will not break anything when it's merged into the default branch
### PostgreSQL versions testing
### PostgreSQL versions testing
...
...
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录