Workflow output variable reference
Certain Amazon CodeCatalyst workflow actions, as well as the input source, emit variables automatically and make them available for you to
use in other workflow actions. These variables are called workflow output
variables, or simply output variables. There is no need
for you to define or set these variables; they are output without requiring any
configuration on your part. An example of such a variable is the CommitId
variable.
Consult the following sections to view the workflow output variables produced automatically by each workflow action.
Note
For information about how to use these variables in a workflow, see Working with variables.
Note
This reference only lists output variables emitted by actions authored by the CodeCatalyst development team. If you're using a third-party action, see instead Determining which workflow output variables an action emits.
Topics
- WorkflowSource output variables
- Build and test action output variables
- "Amazon S3 publish" action output variables
- "AWS CDK bootstrap" action output variables
- "AWS CDK deploy" action output variables
- "AWS Lambda invoke" action output variables
- "Deploy AWS CloudFormation stack" action output variables
- "Deploy to Amazon ECS" action output variables
- "Render Amazon ECS task definition" action output variables
- "GitHub Actions" action output variables
WorkflowSource output variables
The WorkflowSource input source produces the following output variables.
Key | Value |
---|---|
CommitId |
The commit ID representing the state of the repository at the time the workflow run started. Example: See also: Example: Referencing the "CommitId" workflow output variable |
BranchName |
The name of the branch against which the workflow run started. Examples: See also: Example: Referencing the "BranchName" workflow output variable |
Build and test action output variables
The build and test actions do not produce output variables automatically.
"Amazon S3 publish" action output variables
The Amazon S3 publish action does not produce output variables automatically.
"AWS CDK bootstrap" action output variables
The AWS CDK bootstrap action produces the following output variables.
Key | Value |
---|---|
deployment-platform |
The name of the deployment platform. Hardcoded to |
region |
The region code of the AWS Region that the AWS CDK bootstrap stack was deployed to during the workflow run. Example: |
stack-id |
The Amazon Resource Name (ARN) of the deployed AWS CDK bootstrap stack. Example:
|
SKIP-DEPLOYMENT |
A value of This variable is only produced if its value is
Hardcoded to |
"AWS CDK deploy" action output variables
The AWS CDK deploy action produces the following output variables.
Key | Value |
---|---|
stack-id |
The Amazon Resource Name (ARN) of the AWS CDK application stack that was deployed to during the workflow run. Example:
|
deployment-platform |
The name of the deployment platform. Hardcoded to |
region |
The region code of the AWS Region that was deployed to during the workflow run. Example: |
SKIP-DEPLOYMENT |
A value of This variable is only produced if its value is
Hardcoded to |
AWS CloudFormation output variables |
In addition to generating the variables listed previously, the
AWS CDK deploy action also exposes
CloudFormation output variables as
workflow output variables for use in
subsequent workflow actions. By default, the action only exposes the
first four (or fewer) CloudFormation output variables that it finds. To
determine which ones are exposed, run the AWS CDK
deploy action once, and then look in the
Variables tab of the run details page. If
the variables listed on the Variables tab are
not what you want, you can configure different ones using the
|
"AWS Lambda invoke" action output variables
By default, the AWS Lambda invoke action produces one variable per top-level key in the Lambda response payload.
For example, if the response payload looks like this:
responsePayload = { "name": "Saanvi", "location": "Seattle", "department": { "company": "Amazon", "team": "AWS" } }
...then the action would generate the following output variables.
Key | Value |
---|---|
name |
Saanvi |
location |
Seattle |
department |
{"company": "Amazon", "team": "AWS"} |
Note
You can change which output variables are generated using the
ResponseFilters
YAML property. For more information, see the ResponseFilters in the "AWS Lambda invoke" action reference.
"Deploy AWS CloudFormation stack" action output variables
The Deploy AWS CloudFormation stack action produces the following output variables.
Key | Value |
---|---|
deployment-platform |
The name of the deployment platform. Hardcoded to |
region |
The region code of the AWS Region that was deployed to during the workflow run. Example: |
stack-id |
The Amazon Resource Name (ARN) of the deployed stack. Example:
|
"Deploy to Amazon ECS" action output variables
The Deploy to Amazon ECS action produces the following output variables.
Key | Value |
---|---|
cluster |
The name of the Amazon ECS cluster that was deployed to during the workflow run. Example: |
deployment-platform |
The name of the deployment platform. Hardcoded to |
service |
The name of the Amazon ECS service that was deployed to during the workflow run. Example: |
task-definition-arn |
The Amazon Resource Name (ARN) of the task definition that was registered during the workflow run. Example:
The
|
deployment-url |
A link to the Amazon ECS console's Events tab, where you can view details of the Amazon ECS deployment associated with the workflow run. Example:
|
region |
The region code of the AWS Region that was deployed to during the workflow run. Example: |
"Render Amazon ECS task definition" action output variables
The Render Amazon ECS task definition action produces the following output variables.
Key | Value |
---|---|
task-definition |
The name given to the task definition file that was updated by the
Render Amazon ECS task definition action. The
name follows the format
Example:
|
"GitHub Actions" action output variables
The "GitHub Actions" action does not produce output variables automatically.