You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
371 B
11 lines
371 B
11 months ago
|
if [ $# -ne 2 ];
|
||
|
then echo "Expected 2 arguments: exec.sh env command"
|
||
|
fi
|
||
|
|
||
|
env=$1
|
||
|
command=$2
|
||
|
cluster="core-$env-app"
|
||
|
|
||
|
taskId=$(aws ecs list-tasks --cluster $cluster --service-name "core-$env-app" --query "taskArns[0]" | grep -o "/$cluster/\w*" | sed "s@/$cluster/@@g")
|
||
|
aws ecs execute-command --cluster "core-$env-app" --task $taskId --interactive --command "$command"
|