Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
GitLab
管理
动态
成员
标记
计划
议题
议题看板
里程碑
迭代
需求
代码
合并请求
仓库
分支
提交
标签
仓库图
比较修订版本
代码片段
锁定的文件
构建
流水线
作业
流水线计划
测试用例
产物
部署
发布
Package registry
容器镜像库
模型注册表
运维
环境
Terraform 模块
监控
事件
服务台
分析
价值流分析
贡献者分析
CI/CD 分析
仓库分析
代码评审分析
议题分析
洞察
模型实验
效能分析
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
gitlab-cn
GitLab
提交
a8faf481
未验证
提交
a8faf481
编辑于
2 years ago
作者:
Rémy Coutable
浏览文件
操作
下载
补丁
差异文件
ci: Abstract Ruby-related definitions and variables
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
上级
05244a89
No related branches found
分支 包含提交
No related tags found
标签 包含提交
无相关合并请求
变更
1
隐藏空白变更内容
行内
左右并排
显示
1 个更改的文件
.gitlab-ci.yml
+26
-26
26 个添加, 26 个删除
.gitlab-ci.yml
有
26 个添加
和
26 个删除
.gitlab-ci.yml
+
26
−
26
浏览文件 @
a8faf481
...
@@ -26,12 +26,12 @@ default:
...
@@ -26,12 +26,12 @@ default:
# Default job timeout set to 90m https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/10520
# Default job timeout set to 90m https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/10520
timeout
:
90m
timeout
:
90m
.ruby
3
-variables
:
&ruby
3
-variables
.
default-
ruby-variables
:
&
default-
ruby-variables
RUBY_VERSION
:
"
3.0"
RUBY_VERSION
:
"
3.0"
OMNIBUS_GITLAB_RUBY3_BUILD
:
"
true"
OMNIBUS_GITLAB_RUBY3_BUILD
:
"
true"
OMNIBUS_GITLAB_CACHE_EDITION
:
"
GITLAB_RUBY3"
OMNIBUS_GITLAB_CACHE_EDITION
:
"
GITLAB_RUBY3"
.ruby
2
-variables
:
&ruby
2
-variables
.
backcompat-
ruby-variables
:
&
backcompat-
ruby-variables
RUBY_VERSION
:
"
2.7"
RUBY_VERSION
:
"
2.7"
OMNIBUS_GITLAB_RUBY2_BUILD
:
"
true"
OMNIBUS_GITLAB_RUBY2_BUILD
:
"
true"
OMNIBUS_GITLAB_CACHE_EDITION
:
"
GITLAB_RUBY2"
OMNIBUS_GITLAB_CACHE_EDITION
:
"
GITLAB_RUBY2"
...
@@ -49,8 +49,8 @@ workflow:
...
@@ -49,8 +49,8 @@ workflow:
# If `$FORCE_GITLAB_CI` is set, create a pipeline.
# If `$FORCE_GITLAB_CI` is set, create a pipeline.
-
if
:
'
$FORCE_GITLAB_CI'
-
if
:
'
$FORCE_GITLAB_CI'
variables
:
variables
:
<<
:
*ruby
3
-variables
<<
:
*
default-
ruby-variables
PIPELINE_NAME
:
'
Ruby
3
forced
pipeline'
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
forced
pipeline'
# As part of the process of creating RCs automatically, we update stable
# As part of the process of creating RCs automatically, we update stable
# branches with the changes of the most recent production deployment. The
# branches with the changes of the most recent production deployment. The
# merge requests used for this merge a branch release-tools/X into a stable
# merge requests used for this merge a branch release-tools/X into a stable
...
@@ -61,73 +61,73 @@ workflow:
...
@@ -61,73 +61,73 @@ workflow:
# For merge requests running exclusively in Ruby 2.7
# For merge requests running exclusively in Ruby 2.7
-
if
:
'
$CI_MERGE_REQUEST_LABELS
=~
/pipeline:run-in-ruby2/'
-
if
:
'
$CI_MERGE_REQUEST_LABELS
=~
/pipeline:run-in-ruby2/'
variables
:
variables
:
<<
:
*ruby
2
-variables
<<
:
*
backcompat-
ruby-variables
PIPELINE_NAME
:
'
Ruby
2
$CI_MERGE_REQUEST_EVENT_TYPE
MR
pipeline'
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
$CI_MERGE_REQUEST_EVENT_TYPE
MR
pipeline'
NO_SOURCEMAPS
:
'
true'
NO_SOURCEMAPS
:
'
true'
-
if
:
'
$CI_MERGE_REQUEST_LABELS
=~
/Community
contribution/'
-
if
:
'
$CI_MERGE_REQUEST_LABELS
=~
/Community
contribution/'
variables
:
variables
:
<<
:
*ruby
3
-variables
<<
:
*
default-
ruby-variables
GITLAB_DEPENDENCY_PROXY_ADDRESS
:
"
"
GITLAB_DEPENDENCY_PROXY_ADDRESS
:
"
"
PIPELINE_NAME
:
'
Ruby
3
$CI_MERGE_REQUEST_EVENT_TYPE
MR
pipeline
(community
contribution)'
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
$CI_MERGE_REQUEST_EVENT_TYPE
MR
pipeline
(community
contribution)'
NO_SOURCEMAPS
:
'
true'
NO_SOURCEMAPS
:
'
true'
# For (detached) merge request pipelines.
# For (detached) merge request pipelines.
-
if
:
'
$CI_MERGE_REQUEST_IID'
-
if
:
'
$CI_MERGE_REQUEST_IID'
variables
:
variables
:
<<
:
*ruby
3
-variables
<<
:
*
default-
ruby-variables
PIPELINE_NAME
:
'
Ruby
3
$CI_MERGE_REQUEST_EVENT_TYPE
MR
pipeline'
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
$CI_MERGE_REQUEST_EVENT_TYPE
MR
pipeline'
NO_SOURCEMAPS
:
'
true'
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
:
<<
:
*ruby
3
-variables
<<
:
*
default-
ruby-variables
<<
:
*default-branch-pipeline-failure-variables
<<
:
*default-branch-pipeline-failure-variables
CRYSTALBALL
:
"
true"
CRYSTALBALL
:
"
true"
PIPELINE_NAME
:
'
Scheduled
Ruby
3
$CI_COMMIT_BRANCH
branch
pipeline'
PIPELINE_NAME
:
'
Scheduled
Ruby
$RUBY_VERSION
$CI_COMMIT_BRANCH
branch
pipeline'
# Run pipelines for ruby2 branch
# Run pipelines for ruby2 branch
-
if
:
'
$CI_COMMIT_BRANCH
==
"ruby2"
&&
$CI_PIPELINE_SOURCE
==
"schedule"'
-
if
:
'
$CI_COMMIT_BRANCH
==
"ruby2"
&&
$CI_PIPELINE_SOURCE
==
"schedule"'
variables
:
variables
:
<<
:
*ruby
2
-variables
<<
:
*
backcompat-
ruby-variables
NOTIFY_PIPELINE_FAILURE_CHANNEL
:
"
f_ruby3"
NOTIFY_PIPELINE_FAILURE_CHANNEL
:
"
f_ruby3"
PIPELINE_NAME
:
'
Scheduled
Ruby
2
$CI_COMMIT_BRANCH
branch
pipeline'
PIPELINE_NAME
:
'
Scheduled
Ruby
$RUBY_VERSION
$CI_COMMIT_BRANCH
branch
pipeline'
# This work around https://gitlab.com/gitlab-org/gitlab/-/issues/332411 whichs prevents usage of dependency proxy
# This work around https://gitlab.com/gitlab-org/gitlab/-/issues/332411 whichs prevents usage of dependency proxy
# when pipeline is triggered by a project access token.
# when pipeline is triggered by a project access token.
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH
&&
$GITLAB_USER_LOGIN
=~
/project_\d+_bot\d*/'
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH
&&
$GITLAB_USER_LOGIN
=~
/project_\d+_bot\d*/'
variables
:
variables
:
<<
:
*ruby
3
-variables
<<
:
*
default-
ruby-variables
<<
:
*default-branch-pipeline-failure-variables
<<
:
*default-branch-pipeline-failure-variables
GITLAB_DEPENDENCY_PROXY_ADDRESS
:
"
"
GITLAB_DEPENDENCY_PROXY_ADDRESS
:
"
"
PIPELINE_NAME
:
'
Ruby
3
$CI_COMMIT_BRANCH
branch
pipeline
(triggered
by
a
project
token)'
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
$CI_COMMIT_BRANCH
branch
pipeline
(triggered
by
a
project
token)'
# For `$CI_DEFAULT_BRANCH` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
# For `$CI_DEFAULT_BRANCH` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH'
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH'
variables
:
variables
:
<<
:
*ruby
3
-variables
<<
:
*
default-
ruby-variables
<<
:
*default-branch-pipeline-failure-variables
<<
:
*default-branch-pipeline-failure-variables
PIPELINE_NAME
:
'
Ruby
3
$CI_COMMIT_BRANCH
branch
pipeline'
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
$CI_COMMIT_BRANCH
branch
pipeline'
# For tags, create a pipeline.
# For tags, create a pipeline.
-
if
:
'
$CI_COMMIT_TAG'
-
if
:
'
$CI_COMMIT_TAG'
variables
:
variables
:
<<
:
*ruby
3
-variables
<<
:
*
default-
ruby-variables
PIPELINE_NAME
:
'
Ruby
3
$CI_COMMIT_TAG
tag
pipeline'
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
$CI_COMMIT_TAG
tag
pipeline'
# If `$GITLAB_INTERNAL` isn't set, don't create a pipeline.
# If `$GITLAB_INTERNAL` isn't set, don't create a pipeline.
-
if
:
'
$GITLAB_INTERNAL
==
null'
-
if
:
'
$GITLAB_INTERNAL
==
null'
when
:
never
when
:
never
# For stable, auto-deploy, and security branches, create a pipeline.
# For stable, auto-deploy, and security branches, create a pipeline.
-
if
:
'
$CI_COMMIT_BRANCH
=~
/^[\d-]+-stable(-ee)?$/'
-
if
:
'
$CI_COMMIT_BRANCH
=~
/^[\d-]+-stable(-ee)?$/'
variables
:
variables
:
<<
:
*ruby
3
-variables
<<
:
*
default-
ruby-variables
NOTIFY_PIPELINE_FAILURE_CHANNEL
:
"
releases"
NOTIFY_PIPELINE_FAILURE_CHANNEL
:
"
releases"
PIPELINE_NAME
:
'
Ruby
3
$CI_COMMIT_BRANCH
branch
pipeline'
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
$CI_COMMIT_BRANCH
branch
pipeline'
CREATE_INCIDENT_FOR_PIPELINE_FAILURE
:
"
true"
CREATE_INCIDENT_FOR_PIPELINE_FAILURE
:
"
true"
BROKEN_BRANCH_INCIDENTS_PROJECT
:
"
gitlab-org/release/tasks"
BROKEN_BRANCH_INCIDENTS_PROJECT
:
"
gitlab-org/release/tasks"
BROKEN_BRANCH_INCIDENTS_PROJECT_TOKEN
:
"
${BROKEN_STABLE_INCIDENTS_PROJECT_TOKEN}"
BROKEN_BRANCH_INCIDENTS_PROJECT_TOKEN
:
"
${BROKEN_STABLE_INCIDENTS_PROJECT_TOKEN}"
-
if
:
'
$CI_COMMIT_BRANCH
=~
/^\d+-\d+-auto-deploy-\d+$/'
-
if
:
'
$CI_COMMIT_BRANCH
=~
/^\d+-\d+-auto-deploy-\d+$/'
variables
:
variables
:
<<
:
*ruby
3
-variables
<<
:
*
default-
ruby-variables
PIPELINE_NAME
:
'
Ruby
3
$CI_COMMIT_BRANCH
branch
pipeline'
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
$CI_COMMIT_BRANCH
branch
pipeline'
-
if
:
'
$CI_COMMIT_BRANCH
=~
/^security\//'
-
if
:
'
$CI_COMMIT_BRANCH
=~
/^security\//'
variables
:
variables
:
<<
:
*ruby
3
-variables
<<
:
*
default-
ruby-variables
PIPELINE_NAME
:
'
Ruby
3
$CI_COMMIT_BRANCH
branch
pipeline'
PIPELINE_NAME
:
'
Ruby
$RUBY_VERSION
$CI_COMMIT_BRANCH
branch
pipeline'
variables
:
variables
:
PG_VERSION
:
"
12"
PG_VERSION
:
"
12"
...
...
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录