Hi All,

I am trying to 
integrate https://github.com/silinternational/ecs-deploy/tree/master with 
Jenkins to make deployment to ECS easier.
By default Jenkins builds all project using user "jenkins". I have 
installed ecs-deploy using "jenkins" user and configured aws cli as well.

Below is the script I have written: -

#!/bin/bash
cd ecs-deploy/

SERVICE_NAME="xxxxx"

aws ecs list-services --cluster $SERVICE_NAME > services.json
for ecs_services in `cat services.json | grep arn | tr -d '", ' | awk -F'/' 
'{print $2}'`;
do
./ecs-deploy -c $SERVICE_NAME -n $ecs_services -i 
xxxxxxx/yyyyy:${GIT_BRANCH} > output.json
    done
    
if [ $? -eq 0 ]
then
echo "Successfully deployed ECS for $SERVICE_NAME" >> output.json
else
echo "Deployment failed"   
fi

But the script fails on first line it self and runs perfectly when I run 
the commands manually from the terminal.
Please suggest what am I missing here. Let me know if any more information 
is required.

Kind Regards,
Jigar Shah

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4f121281-0764-4bf7-b799-f4ec502ffda4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to