import { awscdk } from 'projen'; import { CDKPipeline, CDKPipelineOptions, DeploymentStage, IndependentStage } from './base'; import { PipelineEngine } from '../engine'; /** * Extension of the base CDKPipeline options including specific configurations for GitHub. */ export interface GithubCDKPipelineOptions extends CDKPipelineOptions { /** * runner tags to use to select runners * * @default ['ubuntu-latest'] */ readonly runnerTags?: string[]; /** use GitHub Packages to store vesioned artifacts of cloud assembly; also needed for manual approvals */ readonly useGithubPackagesForAssembly?: boolean; /** * whether to use GitHub environments for deployment stages * * INFO: When using environments consider protection rules instead of using the manual option of projen-pipelines for stages * * @default false */ readonly useGithubEnvironments?: boolean; /** * whether to use GitHub environments for asset upload step * Create separate, parallel jobs for asset upload since GitHub Environments * require unique environment names per job * * WARNING: this parameter requires rebuilding the container assets for each stage and they will not * be the "same binary", so there is a (small) chance that it could produce different binaries per stage * * @default false */ readonly useGithubEnvironmentsForAssetUpload?: boolean; } /** * Implements a CDK Pipeline configured specifically for GitHub workflows. */ export declare class GithubCDKPipeline extends CDKPipeline { private options; /** Indicates if versioned artifacts are needed based on manual approval requirements. */ readonly needsVersionedArtifacts: boolean; /** The GitHub workflow associated with the pipeline. */ private deploymentWorkflow; /** List of deployment stages for the pipeline. */ private deploymentStages; /** The GitHub component used for adding workflows. */ private readonly gh; protected useGithubPackages: boolean; protected minNodeVersion: string | undefined; /** * Constructs a new GithubCDKPipeline instance. * @param app - The CDK app associated with this pipeline. * @param options - Configuration options for the pipeline. */ constructor(app: awscdk.AwsCdkTypeScriptApp, options: GithubCDKPipelineOptions); /** the type of engine this implementation of CDKPipeline is for */ engineType(): PipelineEngine; /** * Returns the paths filter array with the workflow file itself included. * This ensures that changes to the workflow file also trigger the pipeline. * @param workflowName - The name of the workflow (used to derive the file path). */ private pathsWithWorkflowFile; /** * Returns the artifact path prefixed with workingDirectory if set. * Artifact upload/download paths resolve against GITHUB_WORKSPACE, * not the job working-directory, so they must be prefixed explicitly. */ private artifactPath; /** * Returns job defaults for working directory when set. */ private jobDefaults; /** * Creates feature branch workflows for deploying and destroying feature environments. */ protected createFeatureWorkflows(): void; /** * Creates a workflow for deploying feature branches when PRs are labeled with 'feature-deployment'. */ private createFeatureDeployWorkflow; /** * Creates a workflow for destroying feature branches when PRs are closed or unlabeled. */ private createFeatureDestroyWorkflow; /** * Creates a synthesis job for the pipeline using GitHub Actions. */ private createSynth; /** * Creates a job to upload assets to AWS as part of the pipeline. */ createAssetUpload(stageName?: string, githubEnvironment?: string): void; /** * Creates a job to deploy the CDK application to AWS. * @param stage - The deployment stage to create. */ createDeployment(stage: DeploymentStage, useGithubEnvironmentsForAssetUpload?: boolean): void; private createDeployJob; /** * Creates a job to deploy the CDK application to AWS. * @param stage - The independent stage to create. */ createIndependentDeployment(stage: IndependentStage): void; }