I am using a cdk code pipeline and i would like to specify for it to only trigger if a directory within the repo has changed.
const pipeline = new CodePipeline(this, 'Pipeline', {
pipelineName: 'BackEndPipeline',
synth: new CodeBuildStep('SynthStep', {
input: CodePipelineSource.codeCommit(repo, 'master'),
installCommands: [
'npm install -g aws-cdk'
],
commands: [
'cd mydir',
'ls',
'npm install',
'ls',
'npm run build',
'ls',
'npx cdk synth'
],
primaryOutputDirectory: 'mydir/cdk.out'
})
});