I am trying to implement an AWS Code-Pipeline using aws-cdk v2. Here is my code which does not have any errors but errors out while doing a cdk synth.
const pipeline = new CodePipeline(this, "MyPipeline", {
pipelineName: "my-pipeline",
synth: new CodeBuildStep("SynthStep", {
input: CodePipelineSource.codeCommit(repo, "mainline"),
buildEnvironment: {
computeType: CodeBuild.ComputeType.MEDIUM,
buildImage: CodeBuild.LinuxBuildImage.STANDARD_5_0,
},
partialBuildSpec: buildSpec,
commands: [],
role: codeBuildSynthRole,
}),
crossAccountKeys: true,
selfMutation: true,
dockerEnabledForSelfMutation: true,
});
I get an error - 'Only one build spec is allowed to specify artifacts.' What am i doing wrong?