Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
GitLab
管理
动态
成员
标记
计划
议题
议题看板
里程碑
迭代
需求
代码
合并请求
仓库
分支
提交
标签
仓库图
比较修订版本
代码片段
锁定的文件
构建
流水线
作业
流水线计划
测试用例
产物
部署
发布
Package registry
容器镜像库
模型注册表
运维
环境
Terraform 模块
监控
事件
服务台
分析
价值流分析
贡献者分析
CI/CD 分析
仓库分析
代码评审分析
议题分析
洞察
模型实验
效能分析
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
gitlab-cn
GitLab
提交
9e9b6f30
未验证
提交
9e9b6f30
编辑于
11 months ago
作者:
Stan Hu
提交者:
GitLab
11 months ago
浏览文件
操作
下载
补丁
差异文件
Revert "Merge branch 'allow-secure-files-bucket-optional' into 'master'"
This reverts merge request !131819
上级
f5389a5f
No related branches found
No related tags found
1 合并请求
!2419
Fix TanukiBot spec relying on outdated code
变更
2
隐藏空白变更内容
行内
左右并排
显示
2 个更改的文件
config/object_store_settings.rb
+3
-4
3 个添加, 4 个删除
config/object_store_settings.rb
spec/config/object_store_settings_spec.rb
+0
-30
0 个添加, 30 个删除
spec/config/object_store_settings_spec.rb
有
3 个添加
和
34 个删除
config/object_store_settings.rb
+
3
−
4
浏览文件 @
9e9b6f30
...
@@ -2,8 +2,7 @@
...
@@ -2,8 +2,7 @@
# Set default values for object_store settings
# Set default values for object_store settings
class
ObjectStoreSettings
class
ObjectStoreSettings
SUPPORTED_TYPES
=
%w[artifacts external_diffs lfs uploads packages dependency_proxy terraform_state pages
SUPPORTED_TYPES
=
%w[artifacts external_diffs lfs uploads packages dependency_proxy terraform_state pages]
.
freeze
ci_secure_files]
.
freeze
ALLOWED_OBJECT_STORE_OVERRIDES
=
%w[bucket enabled proxy_download cdn]
.
freeze
ALLOWED_OBJECT_STORE_OVERRIDES
=
%w[bucket enabled proxy_download cdn]
.
freeze
# To ensure the one Workhorse credential matches the Rails config, we
# To ensure the one Workhorse credential matches the Rails config, we
...
@@ -13,9 +12,9 @@ class ObjectStoreSettings
...
@@ -13,9 +12,9 @@ class ObjectStoreSettings
# the future.
# the future.
WORKHORSE_ACCELERATED_TYPES
=
SUPPORTED_TYPES
-
%w[pages]
WORKHORSE_ACCELERATED_TYPES
=
SUPPORTED_TYPES
-
%w[pages]
# pages
and ci_secure_files
may be enabled but use legacy disk storage
# pages may be enabled but use legacy disk storage
# we don't need to raise an error in that case
# we don't need to raise an error in that case
ALLOWED_INCOMPLETE_TYPES
=
%w[pages
ci_secure_files
]
.
freeze
ALLOWED_INCOMPLETE_TYPES
=
%w[pages]
.
freeze
attr_accessor
:settings
attr_accessor
:settings
...
...
此差异已折叠。
点击以展开。
spec/config/object_store_settings_spec.rb
+
0
−
30
浏览文件 @
9e9b6f30
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
'artifacts'
=>
{
'enabled'
=>
true
},
'artifacts'
=>
{
'enabled'
=>
true
},
'external_diffs'
=>
{
'enabled'
=>
false
},
'external_diffs'
=>
{
'enabled'
=>
false
},
'pages'
=>
{
'enabled'
=>
true
},
'pages'
=>
{
'enabled'
=>
true
},
'ci_secure_files'
=>
{
'enabled'
=>
true
},
'object_store'
=>
{
'object_store'
=>
{
'enabled'
=>
true
,
'enabled'
=>
true
,
'connection'
=>
connection
,
'connection'
=>
connection
,
...
@@ -149,13 +148,6 @@
...
@@ -149,13 +148,6 @@
expect
(
settings
.
pages
[
'object_store'
]).
to
eq
(
nil
)
expect
(
settings
.
pages
[
'object_store'
]).
to
eq
(
nil
)
end
end
it
'does not raise error if ci_secure_files config is missing'
do
config
[
'object_store'
][
'objects'
].
delete
(
'ci_secure_files'
)
expect
{
subject
}.
not_to
raise_error
expect
(
settings
.
ci_secure_files
[
'object_store'
]).
to
eq
(
nil
)
end
context
'GitLab Pages'
do
context
'GitLab Pages'
do
let
(
:pages_connection
)
{
{
'provider'
=>
'Google'
,
'google_application_default'
=>
true
}
}
let
(
:pages_connection
)
{
{
'provider'
=>
'Google'
,
'google_application_default'
=>
true
}
}
...
@@ -203,28 +195,6 @@
...
@@ -203,28 +195,6 @@
end
end
end
end
context
'when object storage is disabled for ci_secure_files with no bucket'
do
before
do
config
[
'ci_secure_files'
]
=
{
'enabled'
=>
true
,
'object_store'
=>
{}
}
config
[
'object_store'
][
'objects'
][
'ci_secure_files'
]
=
{
'enabled'
=>
false
}
end
it
'does not enable consolidated settings for ci_secure_files'
do
subject
expect
(
settings
.
ci_secure_files
[
'enabled'
]).
to
be
true
expect
(
settings
.
ci_secure_files
[
'object_store'
][
'remote_directory'
]).
to
be_nil
expect
(
settings
.
ci_secure_files
[
'object_store'
][
'bucket_prefix'
]).
to
be_nil
expect
(
settings
.
ci_secure_files
[
'object_store'
][
'enabled'
]).
to
be_falsey
expect
(
settings
.
ci_secure_files
[
'object_store'
][
'consolidated_settings'
]).
to
be_falsey
end
end
context
'with legacy config'
do
context
'with legacy config'
do
let
(
:legacy_settings
)
do
let
(
:legacy_settings
)
do
{
{
...
...
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录