Adding the 'Render Amazon ECS task definition'
action
Use the following instructions to add the Render Amazon ECS task
definition action to your workflow.
Prerequisite
Before you begin, make sure you have a workflow that includes a build action that
dynamically generates a Docker image. See the preceding example workflow for details.
- Visual
-
To add the 'Render Amazon ECS task definition' action using the visual editor
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 Visual.
-
At the top-left, choose + Actions to open the action
catalog.
-
From the drop-down list, choose Amazon CodeCatalyst.
-
Search for the Render Amazon ECS task definition action, and do
one of the following:
-
In the Inputs and Configuration tabs,
complete the fields according to your needs. For a description of each field, see
the 'Render Amazon ECS task definition' action YAML.
This reference provides detailed information about each field (and corresponding
YAML property value) as it appears in both the YAML and visual editors.
-
(Optional) Choose Validate to validate the workflow's YAML
code before committing.
-
Choose Commit, enter a commit message, and choose
Commit again.
- YAML
-
To add the 'Render Amazon ECS task definition' action using the YAML editor
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.
-
At the top-left, choose + Actions to open the action
catalog.
-
From the drop-down list, choose Amazon CodeCatalyst.
-
Search for the Render Amazon ECS task definition action, and do
one of the following:
-
Modify the properties in the YAML code according to your needs. An explanation
of each available property is provided in the 'Render Amazon ECS task definition' action YAML.
-
(Optional) Choose Validate to validate the workflow's YAML
code before committing.
-
Choose Commit, enter a commit message, and choose
Commit again.
Next steps
After adding the render action, add the Deploy to Amazon ECS action to
your workflow following the instructions in Deploying to Amazon ECS with a workflow. While adding the deploy action, do the
following:
-
In the Inputs tab of the deploy action, in Artifacts -
optional, select the artifact that was generated by the render action. It
contains the updated task definition file.
For more information about artifacts, see Sharing artifacts and files between
actions.
-
In the Configuration tab of the deploy action, in the
Task definition field, specify the following action variable:
${action-name
.task-definition}
where
action-name
is the name of your render action, for example,
RenderTaskDef
. The render action sets this variable to the new name of the
task definition file.
For more information about variables, see Using variables in workflows.
For more information about how to configure the deploy action, see the preceding example workflow.