Configure Additional Build Actions
Open your recently created pipeline.
- In the Build section click Edit stage
- Click Add action group below the current Build action to configure a new AWS CodeBuild action.
- Name it UnitTest
- Select AWS CodeBuild as Action provider
- Select your current region
- Select SourceArtifact as Input artifacts
- Click Create project to configure your CodeBuild project. A pop-up will open.
- Name it serverless-test-project
- In the Environment section select Managed image as Environment image
- Select Amazon Linux 2 as Operating system
- Select Standard as Runtime(s)
- Select aws/codebuild/amazonlinux2-x86-64-standard:2.0 as Image
- For Service role, choose Existing service role
- Browse for service-catalog-wksp-build-role under Role ARN
- Uncheck the Allow AWS CodeBuild to modify this service role so it can be used with this build project box
- In the Buildspec section, type testspec.yml in the Buildspec name - optional textbox.
- Leave all other settings as default, click Continue to CodePipeline
- Click Done
Do not save your work just yet. We still need to configure the deployment stages of our pipeline in the next step.