Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional doc for Return task #6154

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
14 changes: 13 additions & 1 deletion core/src/main/java/io/kestra/plugin/core/debug/Return.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
@Schema(
title = "Return a value for debugging purposes.",
description = "This task is mostly useful for troubleshooting.\n\n" +
"It allows you to return some templated functions, inputs or outputs."
"It allows you to return some templated functions, inputs or outputs. In some cases you might want to trim all white spaces from the rendered values so downstream tasks can use them properly"
)
@Plugin(
examples = {
Expand All @@ -39,6 +39,18 @@
type: io.kestra.plugin.core.debug.Return
format: "{{ task.id }} > {{ taskrun.startDate }}"
"""
),
@Example(
code = """
id: compute_header
type: io.kestra.plugin.core.debug.Return
format: >-
{%- if inputs.token is not empty -%}
Bearer {{ inputs.token }}
{%- elseif inputs.username is not empty and inputs.password is not empty -%}
Basic {{ (inputs.username + ':' + inputs.password) | base64encode }}
{%- endif -%}
"""
)
},
metrics = {
Expand Down
Loading