Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
GitLab
管理
动态
成员
标记
计划
议题
议题看板
里程碑
迭代
需求
代码
合并请求
仓库
分支
提交
标签
仓库图
比较修订版本
代码片段
锁定的文件
构建
流水线
作业
流水线计划
测试用例
产物
部署
发布
Package registry
Container registry
模型注册表
运维
环境
Terraform 模块
监控
事件
服务台
分析
价值流分析
贡献者分析
CI/CD 分析
仓库分析
代码评审分析
议题分析
洞察
模型实验
效能分析
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
gitlab-cn
GitLab
提交
efd5c645
未验证
提交
efd5c645
编辑于
1 year ago
作者:
Bojan Marjanovic
提交者:
GitLab
1 year ago
浏览文件
操作
下载
补丁
差异文件
Fix MockCI REST API
Changelog: fixed
上级
17227f0c
No related branches found
No related tags found
无相关合并请求
变更
4
隐藏空白变更内容
行内
左右并排
显示
4 个更改的文件
app/models/integrations/mock_ci.rb
+3
-2
3 个添加, 2 个删除
app/models/integrations/mock_ci.rb
doc/api/integrations.md
+1
-1
1 个添加, 1 个删除
doc/api/integrations.md
lib/api/integrations.rb
+1
-9
1 个添加, 9 个删除
lib/api/integrations.rb
locale/gitlab.pot
+7
-1
7 个添加, 1 个删除
locale/gitlab.pot
有
12 个添加
和
13 个删除
app/models/integrations/mock_ci.rb
+
3
−
2
浏览文件 @
efd5c645
...
@@ -8,7 +8,8 @@ class MockCi < BaseCi
...
@@ -8,7 +8,8 @@ class MockCi < BaseCi
ALLOWED_STATES
=
%w[failed canceled running pending success success-with-warnings skipped not_found]
.
freeze
ALLOWED_STATES
=
%w[failed canceled running pending success success-with-warnings skipped not_found]
.
freeze
field
:mock_service_url
,
field
:mock_service_url
,
title:
->
{
s_
(
'ProjectService|Mock service URL'
)
},
title:
->
{
s_
(
'ProjectService|Mock CI URL'
)
},
description:
->
{
_
(
'URL of the Mock CI integration.'
)
},
placeholder:
'http://localhost:4004'
,
placeholder:
'http://localhost:4004'
,
required:
true
required:
true
...
@@ -19,7 +20,7 @@ def self.title
...
@@ -19,7 +20,7 @@ def self.title
end
end
def
self
.
description
def
self
.
description
'Mock an external CI
'
_
(
'Mock an external CI
integration.'
)
end
end
def
self
.
to_param
def
self
.
to_param
...
...
此差异已折叠。
点击以展开。
doc/api/integrations.md
+
1
−
1
浏览文件 @
efd5c645
...
@@ -1258,7 +1258,7 @@ Parameters:
...
@@ -1258,7 +1258,7 @@ Parameters:
| Parameter | Type | Required | Description |
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| --------- | ---- | -------- | ----------- |
|
`mock_service_url`
| string | true |
`http://localhost:4004`
. |
|
`mock_service_url`
| string | true |
URL of the Mock CI integration
. |
|
`enable_ssl_verification`
| boolean | false | Enable SSL verification. Defaults to
`true`
(enabled). |
|
`enable_ssl_verification`
| boolean | false | Enable SSL verification. Defaults to
`true`
(enabled). |
### Disable Mock CI
### Disable Mock CI
...
...
此差异已折叠。
点击以展开。
lib/api/integrations.rb
+
1
−
9
浏览文件 @
efd5c645
...
@@ -9,15 +9,7 @@ class Integrations < ::API::Base
...
@@ -9,15 +9,7 @@ class Integrations < ::API::Base
integration_classes
=
Helpers
::
IntegrationsHelpers
.
integration_classes
integration_classes
=
Helpers
::
IntegrationsHelpers
.
integration_classes
if
Gitlab
.
dev_or_test_env?
if
Gitlab
.
dev_or_test_env?
integrations
[
'mock-ci'
]
=
[
integrations
[
'mock-ci'
]
=
::
Integrations
::
MockCi
.
api_fields
{
required:
true
,
name: :mock_service_url
,
type:
String
,
desc:
'URL to the mock integration'
}
]
integrations
[
'mock-deployment'
]
=
[]
integrations
[
'mock-monitoring'
]
=
[]
integrations
[
'mock-monitoring'
]
=
[]
integration_classes
+=
Helpers
::
IntegrationsHelpers
.
development_integration_classes
integration_classes
+=
Helpers
::
IntegrationsHelpers
.
development_integration_classes
...
...
此差异已折叠。
点击以展开。
locale/gitlab.pot
+
7
−
1
浏览文件 @
efd5c645
...
@@ -31587,6 +31587,9 @@ msgid_plural "MlModelRegistry|· %d versions"
...
@@ -31587,6 +31587,9 @@ msgid_plural "MlModelRegistry|· %d versions"
msgstr[0] ""
msgstr[0] ""
msgstr[1] ""
msgstr[1] ""
msgid "Mock an external CI integration."
msgstr ""
msgid "Modal updated"
msgid "Modal updated"
msgstr ""
msgstr ""
...
@@ -38588,7 +38591,7 @@ msgstr ""
...
@@ -38588,7 +38591,7 @@ msgstr ""
msgid "ProjectService|Leave blank to use your current token."
msgid "ProjectService|Leave blank to use your current token."
msgstr ""
msgstr ""
msgid "ProjectService|Mock
service
URL"
msgid "ProjectService|Mock
CI
URL"
msgstr ""
msgstr ""
msgid "ProjectService|Must have permission to trigger a manual build in TeamCity."
msgid "ProjectService|Must have permission to trigger a manual build in TeamCity."
...
@@ -52494,6 +52497,9 @@ msgstr ""
...
@@ -52494,6 +52497,9 @@ msgstr ""
msgid "URL of the Grafana instance to link to from the Metrics Dashboard menu item."
msgid "URL of the Grafana instance to link to from the Metrics Dashboard menu item."
msgstr ""
msgstr ""
msgid "URL of the Mock CI integration."
msgstr ""
msgid "URL of the Squash TM webhook."
msgid "URL of the Squash TM webhook."
msgstr ""
msgstr ""
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录