mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
构建流水线json测试
This commit is contained in:
@@ -23,9 +23,9 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController
|
||||
end
|
||||
|
||||
def build_yaml
|
||||
Rails.logger.info("pipeline===========#{params[:pipeline].present?}")
|
||||
if params[:pipeline].present?
|
||||
pipeline = params[:pipeline]
|
||||
Rails.logger.info("pipeline===========#{params[:pipeline_json].present?}")
|
||||
if params[:pipeline_json].present?
|
||||
pipeline = params[:pipeline_json]
|
||||
@name = params[:name]
|
||||
params_nodes = JSON.parse(pipeline)["nodes"].select { |node| !["on-push", "on-schedule"].include?(node["component_name"]) }
|
||||
on_nodes = JSON.parse(pipeline)["nodes"].select { |node| ["on-push", "on-schedule"].include?(node["component_name"]) }
|
||||
|
||||
Reference in New Issue
Block a user