constructor()

in lib/pipelines/code-pipeline.ts [133:149]


    constructor(scope: Construct, pipelineProps: PipelineProps, id: string,  props?: StackProps) {
        super(scope, id, withUsageTracking(CodePipelineStack.USAGE_ID, props));
        const pipeline  = CodePipeline.build(this, pipelineProps);

        const promises : Promise<ApplicationStage>[] = [];

        for(let stage of pipelineProps.stages) {
            const appStage = new ApplicationStage(this, stage.id, stage.stackBuilder);
            promises.push(appStage.waitForAsyncTasks());
        }

        Promise.all(promises).then(stages => {
            for(let i in stages) {
                pipeline.addStage(stages[i], pipelineProps.stages[i].stageProps);
            }
        });
    }