aws-delivlib
Version:
A fabulous library for defining continuous pipelines for building, testing and releasing code libraries.
91 lines (90 loc) • 2.68 kB
TypeScript
import { aws_codebuild as codebuild } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { BuildEnvironmentProps } from './build-env';
import { IRepo } from './repo';
export interface AutoBuildOptions {
/**
* Build environment.
* @default - see defaults in `BuildEnvironmentProps`
*/
readonly environment?: BuildEnvironmentProps;
/**
* The name of the CodeBuild project.
*
* @default - a name will be generated by CloudFormation.
*/
readonly projectName?: string;
/**
* Make build logs public and publishes a link to GitHub PR discussion.
*
* @see https://github.com/jlhood/github-codebuild-logs
*
* @default false
*/
readonly publicLogs?: boolean;
/**
* Configure the project to respond to webhooks.
*
* @default true
*/
readonly webhook?: boolean;
/**
* Whether to publish a link to build logs when build is successful.
*
* @see https://github.com/jlhood/github-codebuild-logs#app-parameters
*
* @default true
*/
readonly publicLogsOnSuccess?: boolean;
/**
* Whether to delete previously published links to build logs
* before posting a new one.
*
* @see https://github.com/jlhood/github-codebuild-logs#app-parameters
*
* @default true
*/
readonly deletePreviousPublicLogsLinks?: boolean;
/**
* Build spec file to use for AutoBuild
*
* @default @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-buildspec
*/
readonly buildSpec?: codebuild.BuildSpec;
/**
* ARTIFACTS
*/
readonly artifacts?: codebuild.IArtifacts;
}
export interface AutoBuildProps extends AutoBuildOptions {
/**
* The repository to monitor.
*
* Must be a GitHub repository for `publicLogs` to have any effect.
*/
readonly repo: IRepo;
/**
* The specific branch to be considered for auto-builds.
*
* Specify at most one of `branch` and `branches`.
*
* @default - any & all branches.
* @deprecated Use `branches` instead.
*/
readonly branch?: string;
/**
* The specific branch to be considered for auto-builds.
*
* Specify at most one of `branch` and `branches`.
*
* @default - any & all branches.
*/
readonly branches?: string[];
}
export declare class AutoBuild extends Construct {
/**
* The underlying `CodeBuild` project.
*/
readonly project: codebuild.Project;
constructor(scope: Construct, id: string, props: AutoBuildProps);
}