Amazon CodeCatalyst is no longer open to new customers. Existing customers can continue to use the service as normal. For more information, see How to migrate from CodeCatalyst.
Use the following instructions to reference a variable in the action that defines
it.
For more information about variables, see Using variables in workflows.
Prerequisite
Make sure you have defined the variable you want to reference. For more
information, see Defining a
variable.
- Visual
-
Not available. Choose YAML to view the YAML
instructions.
- YAML
-
To reference a variable in the action that defines it
Open the CodeCatalyst console at https://codecatalyst.aws/.
-
Choose your project.
-
In the navigation pane, choose CI/CD, and then choose Workflows.
-
Choose the name of your workflow. You can filter by the source
repository or branch name where the workflow is defined, or
filter by workflow name or status.
-
Choose Edit.
-
Choose YAML.
-
In the CodeCatalyst action that defines the variable that you want
to refer to, add the variable using the following bash
syntax:
$variable-name
For example:
MyAction:
Configuration:
Steps:
- Run: $variable-name
For more examples, see Examples of
variables. For
more information, see the reference information for your action
in the Workflow YAML definition.
-
(Optional) Choose Validate to validate
the workflow's YAML code before committing.
-
Choose Commit, enter a commit message,
and choose Commit again.