summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-11 13:34:12 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-11 13:37:31 +0100
commitcdd3a806825db480b9cc9dfd36f3cf58c84e0f61 (patch)
treeb4eaae50d3485609bc9c9615813559c5e74353af /app
parentf41b535ced0cdddb67661bdb0a6216216dc6b89c (diff)
downloadgitlab-ce-cdd3a806825db480b9cc9dfd36f3cf58c84e0f61.tar.gz
Allow subsequent validations in CI Linterfix/ci-linter-sequence-validations
Closes #5851
Diffstat (limited to 'app')
-rw-r--r--app/controllers/ci/lints_controller.rb6
-rw-r--r--app/views/ci/lints/show.html.haml6
2 files changed, 7 insertions, 5 deletions
diff --git a/app/controllers/ci/lints_controller.rb b/app/controllers/ci/lints_controller.rb
index e782a51e7eb..a7af3cb8345 100644
--- a/app/controllers/ci/lints_controller.rb
+++ b/app/controllers/ci/lints_controller.rb
@@ -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
diff --git a/app/views/ci/lints/show.html.haml b/app/views/ci/lints/show.html.haml
index a144c43be47..0044d779c31 100644
--- a/app/views/ci/lints/show.html.haml
+++ b/app/views/ci/lints/show.html.haml
@@ -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