AWS代码部署 - 指定位置的脚本:脚本/validate_service.sh失败了出口代码1
我的部署在上一步中失败了错误消息:
整体部署失败了,因为部署失败了太多,部署失败,很少有健康实例可用于部署,或者部署组中的某些实例遇到了问题。
未选择行。
My validate_service.sh contain
#!/bin/bash
# verify we can access our webpage successfully
curl -v --silent localhost:80 2>&1 | grep Welcome
Can someone advice what should I change ?
My deployments fail on last step Validate Service with error message:
The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.
No lines are selected.
My validate_service.sh contain
#!/bin/bash
# verify we can access our webpage successfully
curl -v --silent localhost:80 2>&1 | grep Welcome
Can someone advice what should I change ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
脚本返回值很重要。你对我看起来不错。我刚刚添加了几秒钟才等到应用程序启动。
如果您将
bash -x
与命令管道一起使用,则最好添加shopt -s PipeFail
,因此当其中一个命令失败时,所有管道都会失败。结帐我的脚本:
Script return value matters. Yours looks good to me. I just added couple of seconds to wait until application starts up.
In case you use
bash -x
together with pipeline of commands, you better addshopt -s pipefail
so all pipeline fails when one of the commands fails.Checkout my script: