Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
cdd3a806
Commit
cdd3a806
authored
Jan 11, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow subsequent validations in CI Linter
Closes #5851
parent
f41b535c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
5 deletions
+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
No files found.
CHANGELOG
View file @
cdd3a806
...
@@ -33,6 +33,7 @@ v 8.4.0 (unreleased)
...
@@ -33,6 +33,7 @@ v 8.4.0 (unreleased)
- Add file finder feature in tree view (Kyungchul Shin)
- Add file finder feature in tree view (Kyungchul Shin)
- Ajax filter by message for commits page
- Ajax filter by message for commits page
- API: Add support for deleting a tag via the API (Robert Schilling)
- API: Add support for deleting a tag via the API (Robert Schilling)
- Allow subsequent validations in CI Linter
v 8.3.3 (unreleased)
v 8.3.3 (unreleased)
- Preserve CE behavior with JIRA integration by only calling API if URL is set
- Preserve CE behavior with JIRA integration by only calling API if URL is set
...
...
app/controllers/ci/lints_controller.rb
View file @
cdd3a806
...
@@ -6,11 +6,13 @@ module Ci
...
@@ -6,11 +6,13 @@ module Ci
end
end
def
create
def
create
if
params
[
:content
].
blank?
@content
=
params
[
:content
]
if
@content
.
blank?
@status
=
false
@status
=
false
@error
=
"Please provide content of .gitlab-ci.yml"
@error
=
"Please provide content of .gitlab-ci.yml"
else
else
@config_processor
=
Ci
::
GitlabCiYamlProcessor
.
new
params
[
:content
]
@config_processor
=
Ci
::
GitlabCiYamlProcessor
.
new
(
@content
)
@stages
=
@config_processor
.
stages
@stages
=
@config_processor
.
stages
@builds
=
@config_processor
.
builds
@builds
=
@config_processor
.
builds
@status
=
true
@status
=
true
...
...
app/views/ci/lints/show.html.haml
View file @
cdd3a806
...
@@ -4,12 +4,12 @@
...
@@ -4,12 +4,12 @@
.row
.row
=
form_tag
ci_lint_path
,
method: :post
do
=
form_tag
ci_lint_path
,
method: :post
do
.form-group
.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
.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
.col-sm-12
.pull-left.prepend-top-10
.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
.row.prepend-top-20
.col-sm-12
.col-sm-12
...
...
spec/features/ci_lint_spec.rb
View file @
cdd3a806
...
@@ -35,5 +35,13 @@ describe 'CI Lint' do
...
@@ -35,5 +35,13 @@ describe 'CI Lint' do
expect
(
page
).
to
have_content
(
'Error: Please provide content of .gitlab-ci.yml'
)
expect
(
page
).
to
have_content
(
'Error: Please provide content of .gitlab-ci.yml'
)
end
end
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
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment