Skip to content

Script for running ECS tasks, wait for result and exits accordingly to the task result

License

Notifications You must be signed in to change notification settings

Fretadao/run-ecs-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Run ECS task

Run a given ECS task, wait for result and exits accordingly to the task result. The original motivation to create this script was to run tasks on ECS during Continuous integration pipelines.

Installation

curl https://raw.githubusercontent.com/fretadao/run-ecs-task/master/run-ecs-task -o ./run-ecs-task
chmod +x run-ecs-task

Usage

Script for running ECS tasks, wait for result and exits accordingly to the task result.

Required arguments:
    -c | --cluster             Name of ECS cluster
    -d | --task-definition     Name of task definition to run
    -m | --command             Command to execute on the task deploy(overrides image CMD). Command args must be separated by comma, eg.:  "sh,echo,\$FOO"
    -n | --container-name      Container name defined by the task
    -r | --region              Cluster region
    -l | --launch-type         Task launch type, supported values: "EC2", "FARGATE"
    --capacity-provider        Capacity provider strategy in the format: '[{"capacityProvider": "Name", "weight": value, "base": value}, ...]'. When capacity provider is specified,
                               launch-type must be empty

Optional arguments:
    --subnets                  Subnets IDS for the task execution, supported only if the task network mode is "awsvpc". IDS must be separated by comma, eg.: "subnet-id1,subnet-id2"
    --security-groups          Security groups IDS for the task execution, supported only if the task network mode is "awsvpc". IDS must be separated by comma, eg.: "sg-id1,sg-id2"
    -v | --version             Display script version

About

Script for running ECS tasks, wait for result and exits accordingly to the task result

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages