简体   繁体   中英

CodeBuild (AWS) from CodePipeline (AWS)

I'm trying to trigger multiple builds with CodePipeline (AWS) and when the pipeline trigger a CodeBuild, the CodeBuild fail with the next error:

[Container] 2018/02/07 19:30:20 Waiting for DOWNLOAD_SOURCE

Message: Access Denied

Extra information:

  • The source is coming from Github
  • If I start the CodeBuild manually works perfectly.

在此处输入图片说明

在此处输入图片说明

I just discovered this the other day. I'm not sure if it's documented anywhere, but it's definitely not clear in the Code Pipeline UI.

Any CodeBuild project that CodePipeline initiates must have been created through the CodePipeline UI. It cannot be a "standalone" CodeBuild project.

When you create a CodeBuild project from the CodePipeline UI, the "Source Provider" setting is "AWS CodePipeline", which is not an available choice when you create the CodeBuild project yourself.

CodePipeline retrieves it's own source code from GitHub. It then passes that source code to your CodeBuild project. If your project is getting it's own source code from GitHub, then that seems to cause the issue you describe:

[Container] 2018/02/06 14:58:37 Waiting for agent ping
[Container] 2018/02/06 14:58:37 Waiting for DOWNLOAD_SOURCE

To resolve this issue, you must edit your CodePipeline "build" stage, and choose "Create a new build project" under "AWS CodeBuild, Configure Your Project". You can copy most settings from your existing project and reuse the buildspec.yml file in your source code.

I had the same exact error. Codebuild worked fine when I ran it alone, but in order to make it work in CodePipeline I had to update my CodePipeline role to allow access to the S3 bucket.

The way to resolve this issue was creating the CodeBuild with the CodePipeline Wizard creation. In this way the wizard gives to the CodeBuild the necessary privileges.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM