AWS CodePipeline不会将工件上传到AWS S3

编程入门 行业动态 更新时间:2024-10-17 02:49:33
本文介绍了AWS CodePipeline不会将工件上传到AWS S3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

为了使(Android)构建和测试过程自动化,我配置了 AWS代码管道,该管道将首先从 GitHub 获取代码并触发构建(通过 aws codebuild ),构建显示为成功完成,但是由于构建过程而生成的工件(apk文件)没有上载到s3存储桶(公共存储桶).日志清楚地表明上传成功,如所附的屏幕截图所示. 代码管道还会显示所有成功,如已附上

As an effort to automate the (Android) build and test process, I configured an AWS code pipeline that will 1st get the code from GitHub and trigger a build (via aws codebuild) Build is shown as completed successfully but the artifacts (apk file) generated as a result of the build process isn't uploaded to the s3 bucket (public bucket). The logs clearly say the upload is successful as seen in the screenshots attached The codepipeline as well shows everything is successful as attached

但是,如果我直接从AWS Codebuild屏幕运行 aws codebuild项目,它会成功将工件上传到s3存储桶!

However, if I run aws codebuild project directly from the aws codebuild screen, it does upload the artifact successfully to the s3 bucket!

我尝试将存储桶权限更改为public/non public,等等.到目前为止没有成功

I tried changing the bucket permissions to public/non public, etc. So far no success

推荐答案

CodePipeline将覆盖CodeBuild的工件存储桶,我想它会将工件移到了自己的存储桶中.您可以通过运行以下命令来查看CodePipeline的存储桶.

CodePipeline will override the CodeBuild's artifact bucket, I guess it's moving the artifacts to its own Bucket. you can see the CodePipeline's bucket by running the below command.

codepipeline get-pipeline --name PipelineName--query pipeline.[artifactStore] [ { "type": "S3", "location": "codepipeline-us-east-1-xxxxxxxx" } ]

如果您正在使用CloudFormation创建管道,则可以使用 ArtifactStore .

If you are using CloudFormation to create the pipeline you configure the bucket using ArtifactStore.

更新CodePipeline中的ArtifactStore: 目前,我没有找到通过控制台更新ArtifactStore的方法,但是可以通过update-pipeline命令来完成.

Update ArtifactStore in CodePipeline: Currently, I don't see a way to update the ArtifactStore through Console but it can be done with update-pipeline command.

获取pipleline详细信息:

Get the pipleline details:

aws codepipeline get-pipeline --name MyFirstPipeline >pipeline.json

编辑管道以更新artifactStore中的S3存储桶,然后运行命令.

Edit the pipeline to update the S3 Bucket in artifactStore and then run the command.

aws codepipeline update-pipeline --cli-input-json file://pipeline.json

更多推荐

AWS CodePipeline不会将工件上传到AWS S3

本文发布于:2023-11-24 04:47:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1624022.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:工件   会将   AWS   CodePipeline

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!