import * as ecr from "aws-cdk-lib/aws-ecr"; import * as iam from "aws-cdk-lib/aws-iam"; import * as constructs from "constructs"; import { type Props as GithubActionsRoleProps } from "./github-actions-role"; interface Props { /** * The name to use for the S3 Bucket. * * NOTE: Should include both account and region so that it will * not conflict with other accounts/regions. */ bucketName: string; /** * The name to use for the ECR Repository. */ ecrRepositoryName: string; /** * Create a role that can be assumed by Liflig Jenkins. * * @deprecated * @default - no role will be created */ ciRoleName?: string; /** * The lifecycle rules to apply to images stored in the ECR repository. * * @default - Expire untagged images after 10 days and any image older than 180 days */ ecrRepositoryLifecycleRules?: ecr.LifecycleRule[]; /** * ID of AWS accounts that will be granted permission to read from * the artifact repos. */ targetAccountIds?: string[]; /** * Configuration for creating IAM roles that can be assumed * by GitHub Actions in specific GitHub repositories. * * @default - no roles are created. */ githubActions?: Omit & { /** * A list of trusted GitHub repository owners. * * @default ["capralifecycle"] */ trustedOwners?: string[]; /** * The name of the role to create. * * @default "github-actions-role" */ roleName?: string; /** * The name of the default branch in all repositories. * * @default "master" */ defaultBranch?: string; /** * Configuration for a limited role that can be used on non-default * branches with less IAM permissions than the main role. * * @default - a limited role is created. */ limitedRoleConfiguration?: { /** * Whether to create the role or not. * * @default true */ enabled?: boolean; /** * The name of the role to create. * * @default "github-actions-limited-role" */ roleName?: string; }; }; } /** * Utility function for validating the construct properties. * * Returns a list of validation error messages. An empty list means the props are valid. */ export declare const validateProps: (props: Props) => string[]; /** * Create various artifacts used as part of Continuous Integration (CI). * * This includes artifact repositories such as S3 bucket and ECR * repository, as well as IAM role(s) that grant the CI server write * access to these repositories. * * TODO: How can we cleanup stuff that goes into this S3 Bucket and * ECR Repository? Can we ever reliably cleanup? We probably need * some strategy for how we put stuff here to be able to do it. * * @experimental */ export declare class BuildArtifacts extends constructs.Construct { readonly bucketName: string | undefined; readonly ecrRepositoryArn: string; readonly ecrRepositoryName: string; readonly role?: iam.Role; readonly limitedRole?: iam.Role; constructor(scope: constructs.Construct, id: string, props: Props); } export {};