diff options
Diffstat (limited to 'app/controllers/projects/pipelines_controller.rb')
-rw-r--r-- | app/controllers/projects/pipelines_controller.rb | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb index c1734d2cd8a..953dce4d63c 100644 --- a/app/controllers/projects/pipelines_controller.rb +++ b/app/controllers/projects/pipelines_controller.rb @@ -5,17 +5,19 @@ class Projects::PipelinesController < Projects::ApplicationController include Analytics::UniqueVisitsHelper before_action :whitelist_query_limiting, only: [:create, :retry] - before_action :pipeline, except: [:index, :new, :create, :charts] + before_action :pipeline, except: [:index, :new, :create, :charts, :config_variables] before_action :set_pipeline_path, only: [:show] before_action :authorize_read_pipeline! before_action :authorize_read_build!, only: [:index] - before_action :authorize_create_pipeline!, only: [:new, :create] + before_action :authorize_create_pipeline!, only: [:new, :create, :config_variables] before_action :authorize_update_pipeline!, only: [:retry, :cancel] before_action do push_frontend_feature_flag(:filter_pipelines_search, project, default_enabled: true) push_frontend_feature_flag(:dag_pipeline_tab, project, default_enabled: true) push_frontend_feature_flag(:pipelines_security_report_summary, project) - push_frontend_feature_flag(:new_pipeline_form) + push_frontend_feature_flag(:new_pipeline_form, project) + push_frontend_feature_flag(:graphql_pipeline_header, project, type: :development, default_enabled: false) + push_frontend_feature_flag(:new_pipeline_form_prefilled_vars, project, type: :development) end before_action :ensure_pipeline, only: [:show] @@ -30,6 +32,8 @@ class Projects::PipelinesController < Projects::ApplicationController POLLING_INTERVAL = 10_000 + feature_category :continuous_integration + def index @pipelines = Ci::PipelinesFinder .new(project, current_user, index_params) @@ -206,6 +210,14 @@ class Projects::PipelinesController < Projects::ApplicationController end end + def config_variables + respond_to do |format| + format.json do + render json: Ci::ListConfigVariablesService.new(@project).execute(params[:sha]) + end + end + end + private def serialize_pipelines |