debian-mirror-gitlab/app/controllers/ci/lints_controller.rb

24 lines
535 B
Ruby
Raw Normal View History

2015-09-25 12:07:36 +05:30
module Ci
2016-11-03 12:29:30 +05:30
class LintsController < ::ApplicationController
2015-09-25 12:07:36 +05:30
before_action :authenticate_user!
def show
end
def create
@content = params[:content]
2018-03-17 18:26:18 +05:30
@error = Gitlab::Ci::YamlProcessor.validation_message(@content)
2016-09-29 09:46:39 +05:30
@status = @error.blank?
2016-09-29 09:46:39 +05:30
if @error.blank?
2018-03-17 18:26:18 +05:30
@config_processor = Gitlab::Ci::YamlProcessor.new(@content)
2015-09-25 12:07:36 +05:30
@stages = @config_processor.stages
@builds = @config_processor.builds
2016-11-03 12:29:30 +05:30
@jobs = @config_processor.jobs
2015-09-25 12:07:36 +05:30
end
2018-03-17 18:26:18 +05:30
render :show
2015-09-25 12:07:36 +05:30
end
end
end