Mike Biglan MS
Mike Biglan MS

Reputation: 1882

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?

Upvotes: 7

Views: 976

Answers (1)

mmansoor
mmansoor

Reputation: 620

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.

Upvotes: 1

Related Questions