I am building a cloudformation script for codepipeline and am stuck at codebuild stage.
This is how my CodeBuild script looks like
CodeBuildProject:
Type: AWS::CodeBuild::Project
Properties:
Name: Dev-Build
ServiceRole: !Ref ServiceRoleForCodepipeline
Artifacts:
Type: CODEPIPELINE
Environment:
Type: LINUX_CONTAINER
ComputeType: BUILD_GENERAL1_SMALL
Image: aws/codebuild/standard:3.0
EnvironmentVariables:
- Name: stage
Type: PLAINTEXT
Value: dev
Source:
Type: CODEPIPELINE
BuildSpec: buildspec.yml
This works fine. My doubt is how do I setup Source item to accept custom command instead of a BuildSpec file here
Source:
Type: CODEPIPELINE
BuildSpec: buildspec.yml
In the console here we can specify custom commands.

I have gone through the documentation here the Source reference doesnt say anything about adding custom commands. Any help is appreciated. Stuck on this for sometime now.