CodeDeploy错误:“修订版大小太大.其最大大小为51200B. [英] CodeDeploy Error: "The revision size is too large. Its maximum size is 51200B."

查看:168
本文介绍了CodeDeploy错误:“修订版大小太大.其最大大小为51200B.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图按如下所示设置部署过程:Travis-CI.com抓取代码库(NodeJS),对其进行构建和测试,将其以zip格式上传到S3,然后启动CodeDeploy部署(ECS). .这是我的.travis.yml:

I'm trying to set up a deployment process as follows: Travis-CI.com grabs the codebase (NodeJS), builds and tests it, uploads it to S3 as a zip and then kicks off a CodeDeploy deployment (ECS). Here is my .travis.yml:

language: node_js
node_js:
- '12'

before_deploy:
  - zip -rq latest *
  - mkdir -p upload
  - mv latest.zip upload/latest.zip

deploy:
- provider: s3
  bucket: "myBucket"
  access_key_id:
    secure: keystuff
  secret_access_key:
    secure: keystuff
  local_dir: upload
  skip_cleanup: true
  on:
    branch: develop
- provider: codedeploy
  bucket: "myBucket"
  key: latest.zip
  bundle_type: zip
  application: "myApp"
  deployment_group: "myDeploymentGroup"
  region: "us-east-1"
  access_key_id:
    secure: keystuff
  secret_access_key:
    secure: keystuff
  on:
    branch: develop

我的appspec.yml(应该告诉我我不确定应该在这里输入什么.):

My appspec.yml (Truth be told I'm not sure what should go in here.):

version: 0.0
os: linux

成功上传到S3,但是部署任务失败,并出现以下错误:

The upload to S3 succeeds, but the deployment task fails with the following error:

The revision size is too large. Its maximum size is 51200B.

我在CodeDeploy>部署> DeploymentID下看到此错误.

I see this error under CodeDeploy > Deployments > DeploymentID.

不知道我在这里做错了吗-有见识吗?

Not sure what I'm doing wrong here - any insight?

推荐答案

我遇到了同样的问题.问题是因为我们在S3中的压缩代码超过了51kb的限制.我的压缩代码是62kb.我删除了一些文件,再次对其进行了测试,并且可以正常工作.

I had the same problem. The issue was because our zipped code in S3 passed the 51kb limit. My zipped code is 62kb. I deleted some files, tested it again, and it worked.

这篇关于CodeDeploy错误:“修订版大小太大.其最大大小为51200B.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆