For the complete documentation index, see llms.txt. This page is also available as Markdown.

Inputs & outputs

Use stage-level inputs, outputs, and environment variables to pass data into a stage, export values to downstream stages, and inject configuration into steps.

The Inputs & outputs section of a stage lets you define three types of data flow:

Field
What it does

Inputs

Typed parameters the stage accepts at runtime. Reference them in steps with ${{ inputs.<name> }}.

Outputs

Named values the stage exports after it finishes. Downstream stages reference them with ${{ stages.<stage-id>.outputs.<name> }}.

Environment variables

Key-value pairs injected as environment variables into every step in the stage. Reference them with $ENV_VAR_NAME.

To configure these, open a stage on the pipeline canvas and go to the Inputs & outputs tab.

What you will learn

  • How to define typed stage inputs and reference them in steps

  • How to export named values from a stage and consume them in downstream stages

  • How to inject shared environment variables into every step in a stage

  • How to wire inputs, outputs, and environment variables together in a multi-stage pipeline


Inputs

Stage inputs are typed parameters passed into the stage at runtime. They let you make a stage reusable; the same stage can behave differently depending on the values supplied each time.

Input fields

Field
Description

Name

Identifier for the input. Used to reference it in steps: ${{ inputs.<name> }}.

Type

Data type: string, number, boolean.

Input label

Optional display label shown in the run dialog.

Default value

Value used if no value is supplied at runtime.

Required

When true, the pipeline fails at runtime if this input is not provided.

Validation

Optional regex or allowed-values constraint on the input.

Description

Freeform text describing what the input is for.

YAML

Input names support hyphens (e.g. image-tag). Reference them in steps using the same name: ${{ inputs.image-tag }}.


Outputs

Stage outputs export named values that downstream stages can consume. Define an output by giving it a name and setting its value to an expression, typically a reference to a step output variable.

Output fields

Field
Description

Name

Identifier for the output. Used by downstream stages to reference it: ${{ stages.<stage-id>.outputs.<name> }}.

Value

Expression that resolves to the output value at runtime. Usually a step output expression.

YAML

The exports key is a map of output name to its value expression. Values are evaluated at the end of the stage after all steps complete.

Outputs are only available to stages that run after the exporting stage completes. They are not available within the same stage.


Environment variables

Environment variables are key-value pairs injected into every step that runs inside the stage. Use them to configure behavior that all steps share, for example, a log level or a target region, without repeating the value in each step's configuration.

YAML

Environment variable values can be fixed strings or expressions:

Environment variables set at the stage level are available to all steps in the stage. If a step defines its own environment variable with the same name, the step-level value takes precedence.


Pass data through a two-stage pipeline

The example below shows a pipeline where stage-a accepts runtime inputs (an image tag and release date), reads shared configuration from environment variables, and exports a result value. stage-b then consumes that exported value from stage-a to continue the workflow.


Next steps

Last updated

Was this helpful?