尝试从Travis部署到ECS时超时

时间:2018-09-03 09:13:01

标签: amazon-web-services deployment travis-ci continuous-deployment amazon-ecs

我正在尝试使用以下脚本通过https://github.com/silinternational/ecs-deploy通过travis进行ECS部署。基本上,这是我正在使用的脚本:

# login AWS ECR
eval $(aws ecr get-login --region us-east-1)

# build the docker image and push to an image repository
npm run docker:staging:build
docker tag jobboard.api-staging:latest $IMAGE_REPO_URL:latest
docker push $IMAGE_REPO_URL:latest

# update an AWS ECS service with the new image
ecs-deploy -c $CLUSTER_NAME -n $SERVICE_NAME -i $IMAGE_REPO_URL:latest -t 3000 --verbose

这是我遇到的错误和详细信息

+RUNNING_TASKS=arn:aws:ecs:eu-west-1:xxxxxxx:task/yyyyyy
+[[ ! -z arn:aws:ecs:eu-west-1:xxxxxxx:task/yyyyy ]]
++/home/travis/.local/bin/aws --output json ecs --region eu-west-1 describe-tasks --cluster jobboard-api-cluster-staging --tasks arn:aws:ecs:eu-west-1:xxxxxxx:task/yyyyyy
++grep -e RUNNING
++jq '.tasks[]| if .taskDefinitionArn == "arn:aws:ecs:eu-west-1:xxxxxxx:task-definition/jobboard-api-task-staging:7" then . else empty end|.lastStatus'
+i=2610
+'[' 2610 -lt 3000 ']'
++/home/travis/.local/bin/aws --output json ecs --region eu-west-1 list-tasks --cluster jobboard-api-cluster-staging --service-name jobboard-api-service-staging --desired-status RUNNING
++jq -r '.taskArns[]'
ERROR: New task definition not running within 3000 seconds

我不知道它是否可能与之相关,但是我也从python中得到了这个错误

/home/travis/.local/lib/python2.7/site-packages/urllib3/util/ssl_.py:369: SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  SNIMissingWarning

问题是,第一个部署可以正常工作,而第二个尝试后,它开始失败。我需要使某些字段动态化以避免这种情况吗?

您认为问题是什么?

谢谢

0 个答案:

没有答案