gpt4 book ai didi

amazon-web-services - CodeBuild 不会将构建工件上传到 S3

转载 作者:行者123 更新时间:2023-12-01 08:22:06 25 4
gpt4 key购买 nike

我最近一直在玩 CodeBuild 和 CodePipeline 并遇到了这个问题。

CodeBuild 成功完成后,它应该将构建工件上传到 S3 存储桶。但我注意到,当我单击 View Artifacts 按钮时,它只是告诉我发生了错误,而我的 S3 存储桶也没有构建工件。

代码构建成功完成

Code Build success

但是单击“查看工件”链接会将我带到此错误消息。

S3 error message

不知何故,我的构建工件似乎没有上传到 S3

这是我的 Buildspec.yaml

version: 0.2

phases:
build:
commands:
- echo "Entering build"
- npm install
- echo "Finishing build"

最佳答案

我发现我还需要将工件添加到构建规范文件中。当我在 codebuild 上创建 Buildspec.yaml 文件时,默认情况下它没有添加到 Buildspec 中。

version: 0.2

phases:
build:
commands:
- npm install nodemon
- echo "Entering build"
- npm install
- echo "Finishing build"
artifacts:
files:
- '**/*'

添加此代码构建后,会按预期将构建工件自动上传到 S3 存储桶。

关于amazon-web-services - CodeBuild 不会将构建工件上传到 S3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53809090/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com