aws-delivlib
Version:
A fabulous library for defining continuous pipelines for building, testing and releasing code libraries.
97 lines (96 loc) • 3.33 kB
TypeScript
import { SecretsManagerSecretOptions, aws_codebuild as cbuild, aws_codecommit as ccommit, aws_codepipeline as cpipeline } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { ExternalSecret } from './permissions';
export interface IRepo {
repositoryUrlHttp: string;
repositoryUrlSsh: string;
readonly allowsBadge: boolean;
readonly tokenSecretArn?: string;
createBuildSource(parent: Construct, webhook: boolean, options?: BuildSourceOptions): cbuild.ISource;
createSourceStage(pipeline: cpipeline.Pipeline, branch: string): cpipeline.Artifact;
describe(): any;
}
export interface BuildSourceOptions {
/**
* Single branch
*
* Cannot be specified together with `branches`.
*
* @default - All branches
* @deprecated Use `branches` instead.
*/
branch?: string;
/**
* Multiple branches
*
* Cannot be specified together with `branch`.
*
* @default - All branches
*/
branches?: string[];
cloneDepth?: number;
}
export declare class CodeCommitRepo implements IRepo {
private readonly repository;
readonly allowsBadge = false;
readonly tokenSecretArn?: string;
constructor(repository: ccommit.IRepository);
createSourceStage(pipeline: cpipeline.Pipeline, branch: string): cpipeline.Artifact;
get repositoryUrlHttp(): string;
get repositoryUrlSsh(): string;
createBuildSource(_: Construct, _webhook: boolean, options?: BuildSourceOptions): cbuild.ISource;
describe(): any;
}
interface GitHubRepoProps {
/**
* Secrets Manager ARN of the OAuth token secret that allows access to your github repo.
*/
tokenSecretArn: string;
/**
* Options for referencing a secret value from Secrets Manager
*/
tokenSecretOptions?: SecretsManagerSecretOptions;
/**
* In the form "account/repo".
*/
repository: string;
}
export declare class GitHubRepo implements IRepo {
readonly allowsBadge = true;
readonly owner: string;
readonly repo: string;
readonly tokenSecretArn: string;
readonly tokenSecretOptions?: SecretsManagerSecretOptions;
constructor(props: GitHubRepoProps);
get repositoryUrlHttp(): string;
get repositoryUrlSsh(): string;
createSourceStage(pipeline: cpipeline.Pipeline, branch: string): cpipeline.Artifact;
createBuildSource(_: Construct, webhook: boolean, options?: BuildSourceOptions): cbuild.ISource;
describe(): string;
private createWebhookFilters;
}
export interface WritableGitHubRepoProps extends GitHubRepoProps {
/**
* SSH key associated with this repository.
*
* This is required if you wish to be able to use actions that write to the repo
* such as docs publishing and automatic bumps.
*/
sshKeySecret: ExternalSecret;
/**
* The username to use for the published commits
*/
commitUsername: string;
/**
* The email address to use for the published commits
*/
commitEmail: string;
}
export declare class WritableGitHubRepo extends GitHubRepo {
static isWritableGitHubRepo(repo: IRepo): repo is WritableGitHubRepo;
readonly sshKeySecret: ExternalSecret;
readonly commitEmail: string;
readonly commitUsername: string;
constructor(props: WritableGitHubRepoProps);
}
export {};