Browse Source

增加流水线节点名称,和标识区分label

pull/347/head
xxq250 2 years ago
parent
commit
e0fc959037
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      app/controllers/api/v1/projects/pipelines_controller.rb
  2. +1
    -1
      app/views/api/v1/projects/pipelines/build_pipeline.yaml.erb

+ 2
- 2
app/controllers/api/v1/projects/pipelines_controller.rb View File

@@ -110,7 +110,7 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController
# Rails.logger.info "input_node=====0===#{input_node["name"]}======#{input_node["inputs"]}"
node = Action::Node.find_by(name: input_node["name"])
next if node.blank?
node.cust_name = input_node["label"] if input_node["label"].present?
node.label = input_node["label"] if input_node["label"].present?
run_values = {}
input_values = {}
if input_node["inputs"].present?
@@ -173,7 +173,7 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController
params_nodes.each do |input_node|
node = Action::Node.find_by(name: input_node["name"])
next if node.blank?
node.cust_name = input_node["labelf"] if input_node["label"].present?
node.label = input_node["label"] if input_node["label"].present?
run_values = {}
input_values = {}
if input_node["inputs"].present?


+ 1
- 1
app/views/api/v1/projects/pipelines/build_pipeline.yaml.erb View File

@@ -44,7 +44,7 @@ jobs:
runs-on: 'ubuntu-latest'
steps:
<%@steps_nodes.each do |node| %>
- name: <%=node.cust_name || node.name %>
- name: <%=node.label || node.name %>
<% if node.name !="shell" %>
uses: <%=node.full_name %>
<% end %>


Loading…
Cancel
Save