public static build()

in lib/pipelines/code-pipeline.ts [182:204]


    public static build(scope: Construct, props: PipelineProps) : cdkpipelines.CodePipeline {
        const branch = props.repository.targetRevision ?? 'main';
        let githubProps : GitHubSourceOptions | undefined = undefined;

        if(props.repository.credentialsSecretName) {
            githubProps = {
                authentication: cdk.SecretValue.secretsManager(props.repository.credentialsSecretName!)
            };
        }

        return new cdkpipelines.CodePipeline(scope, props.name, {
            pipelineName: props.name,
            synth: new cdkpipelines.ShellStep(`${props.name}-synth`, {
              input: cdkpipelines.CodePipelineSource.gitHub(`${props.owner}/${props.repository.repoUrl}`, branch, githubProps), 
              installCommands: [
                'npm install --global npm',
                'npm install -g aws-cdk@1.135.0', 
                'npm install',
              ],
              commands: ['npm run build', 'npx cdk synth']
            })
          });
    }