2

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. enter image description here

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.

1 Answer 1

1

BuildSpec is used for that:

if this value is provided, it can be either a single string containing the entire build specification

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.