Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions modules/pipeline/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,21 @@ const executeRetryBodyFnID = "execute_retry_body"
func executePipelineBody(ctx *cmdctx.Ctx) (any, error) {
inputFile := cmdctx.GetString(ctx.FlagValues, "input-file")
inputPairs := cmdctx.GetStringSlice(ctx.FlagValues, "input")

inputSetIDs := cmdctx.GetStringSlice(ctx.FlagValues, "input-set")
if len(inputSetIDs) > 0 {
hlog.Debug("execute pipeline: input-set flags provided", "inputSetIDs", inputSetIDs)
body, err := executeInputSetBody(ctx)
if err != nil {
return nil, err
}
return body, nil
}
inputs, err := parseKeyValuePairs(inputPairs)
if err != nil {
return nil, err
}

if inputFile == "" && len(inputs) == 0 {
if inputFile == "" && len(inputs) == 0 && len(inputSetIDs) == 0 {
hlog.Debug("execute pipeline: no runtime inputs provided")
return nil, nil
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/spec/pipeline.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ commands:
description: Branch to execute (for remote pipelines)
- name: input-set
description: Input set identifier to apply when executing
is_multi: true
- name: input
description: "Runtime input as key=value (repeatable); e.g. --input loop_count=5"
is_multi: true
Expand All @@ -537,7 +538,7 @@ commands:
description: Stream logs live after execution starts; exits when the execution reaches a terminal state
endpoint:
method: POST
path: /pipeline/api/pipeline/execute/{{ctx.id}}
path: '{{len(flags["input-set"]) > 0 ? "/pipeline/api/pipeline/execute/" + ctx.id + "/inputSetList" : "/pipeline/api/pipeline/execute/" + ctx.id}}'
item_expr: it.data.planExecution
text_header: "\nExecution started successfully.\n"
text_footer: |
Expand All @@ -551,7 +552,6 @@ commands:
body_fn: execute_body
query_params:
branch: flags.branch
inputSetIdentifiers: flags["input-set"]

- command: execute pipeline:dynamic
verb: execute
Expand Down
Loading