Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can AWS CodePipeline trigger AWS CodeBuild without hijacking CodeBuild's artifact settings?

I setup AWS CodeBuild to write out a large number of artifacts files into S3. The CodeBuild yaml files defines which files and CodeBuild project settings define the S3 bucket. And all works correctly.

It appears that when you trigger AWS CodeBuild from AWS CodePipeline that CodePipeline ignores the artifact settings of AWS CodeBuild and instead forces the artifact into a zip file in a codepipline S3 bucket.

Is there a way to use CodePipeline but have it respect AWS CodeBuild's artifact settings?

like image 282
Mike Biglan MS Avatar asked Jan 24 '17 06:01

Mike Biglan MS


1 Answers

CodeBuild also gives you access to aws-cli.

You can edit the buildspec.yaml file and upload these artifacts to S3. You can also create a .sh file, give it the right execute permissions and then use shell script to upload the artifacts to S3 Bucket.

You will also need to give the right permissions to the S3 Bucket via the Service Role for CodeBuild.

like image 117
mmansoor Avatar answered Sep 27 '22 01:09

mmansoor