Creating PR CodeBuild stages with CodeGuru Reviewer
In this section, we will create a CodeBuild project via the CLI that will get executed whenever a developer raises a PR from any feature
branch. The CodeBuild project will not be bounded to a specific feature
branch. It will execute the build steps for all PRs from the feature
branch to the develop
branch.
This CodeBuild project includes two steps—one is to scan the feature
branch code via CodeGuru Reviewer, and the other is to execute the build steps of the microservice code. To achieve this, perform the following steps:
- Create a Simple Storage Service (S3) bucket named
dsoawscicdbucket-<accountno>
, as follows:$ aws s3api create-bucket --bucket dsoawscicdbucket-$ACCOUNT_ID --create-bucket-configuration LocationConstraint=us-east-1
- Run the following command to create a CodeBuild project via the CLI using an input JavaScript Object Notation (JSON) file. Make sure to replace the S3 bucket and IAM ServiceRole...