import * as codepipeline from "aws-cdk-lib/aws-codepipeline"; import type * as s3 from "aws-cdk-lib/aws-s3"; import * as pipelines from "aws-cdk-lib/pipelines"; import * as constructs from "constructs"; import { type SlackNotificationProps } from "./slack-notification"; export interface LifligCdkPipelineProps { /** * Bucket holding pipeline configuration and trigger file. */ artifactsBucket: s3.IBucket; /** * Name of pipeline. This is used for the path where configuration * is stored in S3. */ pipelineName: string; /** * Type of uploaded artifact. This changes the behaviour of the * pipeline and what kind of process it performs. * * Two types are supported: * * - cdk-source: The uploaded artifact represents a CDK application * as source code. A build step will compile this into a * CDK Cloud Assembly. * * As part of synthesizing this into a CDK Cloud Assembly, * a file "variables.json" will be written for the * CDK application to parameterize the build if any * variables are found in the pipeline source. * * - cloud-assembly: The uploaded artifact represents a * CDK Cloud Assembly which is ready for deployment. * * This does not support reading variables at the current time * since CDK Pipelines don't support parameterized deploys. * See https://github.com/aws/aws-cdk/issues/9560 */ sourceType: "cdk-source" | "cloud-assembly"; /** * The namespace used for parameters in Parameter Store. * * Only relevant for sourceType of "cdk-soruce". * * @default default */ parametersNamespace?: string; } /** * CDK Pipeline for Liflig. * * Avoid putting multiple pipelines in a stack, since the pipeline * will also keep the hosting stack up-to-date. * * The pipeline is executed by writing an empty file to * s3:///pipelines//trigger * * Configuration files are read from S3 at the path * s3:///pipelines// * * For upload type "cdk-source": * * - cdk-source.json holding a pointer to the active CDK source * that should be used. Schema: * * { * bucketName: string * bucketKey: string * } * * - variables*.json which can be zero or more files * with string-string map holding variables that will * be written to variables.json and can be read by the * the CDK application during synthesize. * * For upload type "cloud-assembly": * * - cloud-assembly.json holding a pointer to the active * CDK Cloud Assembly that should be used: Schema: * * { * cloudAssemblyBucketName: string * cloudAssemblyBucketKey: string * } * * Variables enables separation of IaC code and application code if * they are not colocated in the same repository. */ export declare class LifligCdkPipeline extends constructs.Construct { /** * Path on S3 for pipeline configuration. */ static pipelineS3Prefix(pipelineName: string): string; /** * Key in S3 bucket used to trigger pipeline. * * This is an empty file within the pipeline path. */ static pipelineS3TriggerKey(pipelineName: string): string; readonly cdkPipeline: pipelines.CodePipeline; readonly codePipeline: codepipeline.Pipeline; readonly artifactsBucket: s3.IBucket; readonly triggerObjectKey: string; constructor(scope: constructs.Construct, id: string, props: LifligCdkPipelineProps); private static getAwsCdkPackageJsonFile; private cloudAssemblyStage; private cdkSourceStage; addSlackNotification(props: Omit): void; }