Skip to content
代码片段 群组 项目
未验证 提交 efd5c645 编辑于 作者: Bojan Marjanovic's avatar Bojan Marjanovic 提交者: GitLab
浏览文件

Fix MockCI REST API

Changelog: fixed
上级 17227f0c
No related branches found
No related tags found
无相关合并请求
...@@ -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
......
...@@ -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
......
...@@ -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
......
...@@ -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.
先完成此消息的编辑!
想要评论请 注册