sai*_*web 1 amazon-s3 amazon-web-services aws-codepipeline aws-codebuild buildspec
我正在使用 AWS CodePipeline,它从我的 git 存储库获取源代码,使用CodeBuildbuildSpec 构建输出工件并将其保存到 S3 存储桶,最终部署到Elastic BeanStalk(NodeJS 环境)。
一切正常,但我需要管道从我的AWS S3存储桶之一复制 1 个特定文件并将其添加到,output artifacts然后再将其部署到EB
可以使用 buildSpec 来完成吗?
artifacts:
files:
- '**/*'
# - How to add a file from S3 to the artifacts?
Run Code Online (Sandbox Code Playgroud)
我的建议是作为build或的一部分post_build,将所需的文件从 s3 复制到您的构建目录中。
build:
commands:
- echo "Build commands"
- aws s3 cp --region=xx-xxxx-x "s3://file/in/s3" "local-file-instance-to-include"
Run Code Online (Sandbox Code Playgroud)
然后,您将从 s3 复制文件,可用于您的构建,并且您可以将其添加到工件输出中。
| 归档时间: |
|
| 查看次数: |
1790 次 |
| 最近记录: |