CDK version 2.3.0 written in TypeScript
I am using the more recent aws-cdk-lib.pipelines module and not the aws-cdk-lib.aws_codepipeline module.
CodePudding user response:
So, the way CDK figures out where to put the actions you create, is by their inputs and outputs. To add an action between the source and the build, you would need to create an action (or a sequence of actions) that take the source output as input, and produce an output that's used by the synth step as input.
Here's an example in Python, it works the same way in TS:
my_source_action = CodePipelineSource.code_commit(repo, "main")
my_intermediary_action = CodeBuildStep("myAction", input=my_source_action)
my_synth_action = ShellStep(
"Synth",
input=my_intermediary_action,
commands=['...']
)

