我正在尝试构建和Angular7项目并部署到S3,但是遇到以下错误。我该如何解决?
[Container] 2019/05/21 04:08:49 Waiting for agent ping
[Container] 2019/05/21 04:08:51 Waiting for DOWNLOAD_SOURCE
[Container] 2019/05/21 04:08:56 Phase is DOWNLOAD_SOURCE
[Container] 2019/05/21 04:08:56 CODEBUILD_SRC_DIR=/codebuild/output/src345798432/src/git-codecommit.us-east-1.amazonaws.com/v1/repos/CodeCommit-May20
[Container] 2019/05/21 04:08:56 YAML location is /codebuild/readonly/buildspec.yml
[Container] 2019/05/21 04:08:56 Processing environment variables
[Container] 2019/05/21 04:08:56 Moving to directory /codebuild/output/src345798432/src/git-codecommit.us-east-1.amazonaws.com/v1/repos/CodeCommit-May20
[Container] 2019/05/21 04:08:56 Phase complete: DOWNLOAD_SOURCE State: FAILED
[Container] 2019/05/21 04:08:56 Phase context status code: YAML_FILE_ERROR Message: This build image requires selecting at least one runtime version.
答案 0 :(得分:5)
如果您使用
aws/codebuild/standard:2.0
CodeBuild托管映像,则您 必须在以下内容的runtime-versions
部分中指定运行时版本 buildspec文件。
这是您指定runtime-versions:
https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#runtime-versions-buildspec-file
答案 1 :(得分:1)
就我而言,我有相同的错误消息,因为我将adjustSize
文件放在子文件夹中,而不在项目根目录中。
在这种情况下,您需要在代码构建项目控制台中手动配置buildspec.yml
文件的位置。