amazon-web-services - YAML_FILE_ERROR 消息 : Wrong number of container tags, 应为 1

标签 amazon-web-services aws-codebuild

我是 AWS CodePipeline 新手,在 AWS CodeBuild 上遇到此错误

“YAML_FILE_ERROR 消息:容器标签数量错误,应为 1”

我已经为 aspnet core 2.1 项目设置了带有 CodeBuild 和 CloudFormation 的 AWS CodePipeline。这是我的 buildspec.yml

 {
  "name": "Utility",
  "source": {
    "type": "S3",
     "location": "<location>/windows-dotnetcore.zip"
 },
    "artifacts": {
    "type": "S3",
    "location": "<location>",
    "packaging": "ZIP",
    "name": "Utility.zip"
  },
  "environment": {
  "type": "LINUX_CONTAINER",
  "image": "aws/codebuild/dot-net:core-2.1",
  "computeType": "BUILD_GENERAL1_SMALL"
 },
 "serviceRole": "<value>",
 "encryptionKey": "<value>"
 }

最佳答案

当我省略 yml 中的第一个“版本”行时,这发生在我身上:

version: 0.2

关于amazon-web-services - YAML_FILE_ERROR 消息 : Wrong number of container tags, 应为 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52407882/

相关文章:

c# - 如何在 AWS .NET 开发工具包中打开详细日志记录?

amazon-web-services - 多云kubernetes联合的方法

aws-codebuild - CodeBuild 命令中的条件语句 - JSON

aws-codebuild - AWS Sam 包命令在构建规范期间失败

aws-cloudformation - AWS CDK 管道错误 - 未找到匹配的堆栈 "xxxxx"

node.js - 使用 AWS CodeBuild 构建角度项目

amazon-web-services - 适用于具有多个谓词条件的 Glue 的 AWS CloudFormation 模板

javascript - Node.js AWS S3 上传从不调用 End 函数

amazon-web-services - ecs 容器定义内的环境变量与 Dockerfile 中定义的相同环境变量。将使用哪一个?

amazon-web-services - 无法运行 AWS CodeBuild 本地构建脚本