Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
cdd3a806
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
cdd3a806
编写于
1月 11, 2016
作者:
G
Grzegorz Bizon
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Allow subsequent validations in CI Linter
Closes #5851
上级
f41b535c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
5 deletion
+16
-5
CHANGELOG
CHANGELOG
+1
-0
app/controllers/ci/lints_controller.rb
app/controllers/ci/lints_controller.rb
+4
-2
app/views/ci/lints/show.html.haml
app/views/ci/lints/show.html.haml
+3
-3
spec/features/ci_lint_spec.rb
spec/features/ci_lint_spec.rb
+8
-0
未找到文件。
CHANGELOG
浏览文件 @
cdd3a806
...
...
@@ -33,6 +33,7 @@ v 8.4.0 (unreleased)
- Add file finder feature in tree view (Kyungchul Shin)
- Ajax filter by message for commits page
- API: Add support for deleting a tag via the API (Robert Schilling)
- Allow subsequent validations in CI Linter
v 8.3.3 (unreleased)
- Preserve CE behavior with JIRA integration by only calling API if URL is set
...
...
app/controllers/ci/lints_controller.rb
浏览文件 @
cdd3a806
...
...
@@ -6,11 +6,13 @@ module Ci
end
def
create
if
params
[
:content
].
blank?
@content
=
params
[
:content
]
if
@content
.
blank?
@status
=
false
@error
=
"Please provide content of .gitlab-ci.yml"
else
@config_processor
=
Ci
::
GitlabCiYamlProcessor
.
new
params
[
:content
]
@config_processor
=
Ci
::
GitlabCiYamlProcessor
.
new
(
@content
)
@stages
=
@config_processor
.
stages
@builds
=
@config_processor
.
builds
@status
=
true
...
...
app/views/ci/lints/show.html.haml
浏览文件 @
cdd3a806
...
...
@@ -4,12 +4,12 @@
.row
=
form_tag
ci_lint_path
,
method: :post
do
.form-group
=
label_tag
:content
,
'Content of .gitlab-ci.yml'
,
class:
'control-label text-nowrap'
=
label_tag
(
:content
,
'Content of .gitlab-ci.yml'
,
class:
'control-label text-nowrap'
)
.col-sm-12
=
text_area_tag
:content
,
nil
,
class:
'form-control span1'
,
rows:
7
,
require:
true
=
text_area_tag
(
:content
,
@content
,
class:
'form-control span1'
,
rows:
7
,
require:
true
)
.col-sm-12
.pull-left.prepend-top-10
=
submit_tag
'Validate'
,
class:
'btn btn-success submit-yml'
=
submit_tag
(
'Validate'
,
class:
'btn btn-success submit-yml'
)
.row.prepend-top-20
.col-sm-12
...
...
spec/features/ci_lint_spec.rb
浏览文件 @
cdd3a806
...
...
@@ -35,5 +35,13 @@ describe 'CI Lint' do
expect
(
page
).
to
have_content
(
'Error: Please provide content of .gitlab-ci.yml'
)
end
end
describe
'YAML revalidate'
do
let
(
:yaml_content
)
{
'my yaml content'
}
it
'loads previous YAML content after validation'
do
expect
(
page
).
to
have_field
(
'content'
,
with:
'my yaml content'
,
type:
'textarea'
)
end
end
end
end
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录