简体   繁体   English

AWS Codepipeline

[英]aws codepipeline

I am new to AWS CodePipeline. 我是AWS CodePipeline的新手。 When trying to deploy an application using docker images and ECS services, I am getting the following error using my buildspec.yml file: 尝试使用docker映像和ECS服务部署应用程序时,使用buildspec.yml文件遇到以下错误:

[Container] 2018/08/14 06:20:36 Phase context status code: Message:
[Container] 2018/08/14 06:20:36 Entering phase INSTALL
[Container] 2018/08/14 06:20:36 Phase complete: INSTALL Success: true
[Container] 2018/08/14 06:20:36 Phase context status code: Message:
[Container] 2018/08/14 06:20:36 Entering phase PRE_BUILD
[Container] 2018/08/14 06:20:36 Running command echo Logging in to Amazon ECR... Logging in to Amazon ECR...
[Container] 2018/08/14 06:20:36 Running command aws --version aws-cli/1.15.41 Python/2.7.6 Linux/4.14.47-56.37.amzn1.x86_64 botocore/1.10.41
[Container] 2018/08/14 06:20:39 Running command $(aws ecr get-login --no-include-email --region us-east-xxx) WARNING! Using --password via the CLI is insecure. Use --password-stdin. Login Succeeded
[Container] 2018/08/14 06:20:40 Running command REPOSITORY_URI= xxxx.xxxx.ecr.us-east-xxx.amazonaws.com/python /codebuild/output/tmp/script.sh: 4: /codebuild/output/tmp/script.sh: xxxx.xxxx.ecr.us-east-xxx.amazonaws.com/python: not found
[Container] 2018/08/14 06:20:40 Command did not exit successfully REPOSITORY_URI= xxxx.xxxx.ecr.us-east-xxx.amazonaws.com/python exit status 127
[Container] 2018/08/14 06:20:40 Phase complete: PRE_BUILD Success: false
[Container] 2018/08/14 06:20:40 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: REPOSITORY_URI= xxxx.xxxx.ecr.us-east-xxx.amazonaws.com/python. Reason: exit status 127

Any assistance is appreciated. 任何帮助表示赞赏。 If it helps, I can attach my buildspec.yml and taskdefinition.json files. 如果有帮助,我可以附加我的buildspec.ymltaskdefinition.json文件。 Is there a recommended way to do that? 有推荐的方法吗?

It seems you have a space between = and xxxx.xxxx.ecr.us-east-xxx.amazonaws.com/python . 看来您在=xxxx.xxxx.ecr.us-east-xxx.amazonaws.com/python之间有一个空格。

This means you're evaluating xxxx.xxxx.ecr.us-east-xxx.amazonaws.com/python as a command, and since this URI is not a valid command, it exits with status code 127. 这意味着您正在将xxxx.xxxx.ecr.us-east-xxx.amazonaws.com/python评估为命令,并且由于此URI无效,因此它以状态码127退出。

Simply deleting the space should help. 只需删除空格将有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM