I have two buildspec files:
buildspec.ymlbuildspectest.yml
And two Codebuild actions:
- Actions:
- ActionTypeId:
Category: "Build"
Owner: "AWS"
Provider: "CodeBuild"
Version: "1"
Configuration:
ProjectName: !Ref CodeBuild
InputArtifacts:
- Name: 'SourceArtifact'
Name: "Build"
Region: !Sub ${AWS::Region}
RunOrder: 1
- Actions:
- ActionTypeId:
Category: "Test"
Owner: "AWS"
Provider: "CodeBuild"
Version: "1"
Configuration:
ProjectName: !Ref CodeBuild
InputArtifacts:
- Name: 'SourceArtifact'
Name: "Test"
Region: !Sub ${AWS::Region}
RunOrder: 1
They are both referenced to the same build project. They both seem to load buildspec.yml file. How do I configure my second Codebuild Test action to use buildspectest.yml and the first one to use buildspec.yml?
You are referencing in both actions the same configuration with
!Ref CodeBuild. You would have to create two different configurations for the different buildspecs.