How to use the @aws-cdk/aws-codepipeline.Pipeline function in @aws-cdk/aws-codepipeline

To help you get started, we’ve selected a few @aws-cdk/aws-codepipeline examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github humank / EventStormingWorkShop / deployment / coffeeshop-cdk / lib / coffee-shop-code-pipeline.ts View on Github external
grantPrincipal: (fargatesvc.service.taskDefinition.executionRole as iam.IRole)
        })

        // reduce the default deregistration delay timeout from 300 to 30 to accelerate the rolling update
        fargatesvc.targetGroup.setAttribute('deregistration_delay.timeout_seconds', '30')
        // customize the healthcheck to speed up the ecs rolling update
        fargatesvc.targetGroup.configureHealthCheck({
            interval: Duration.seconds(5),
            healthyHttpCodes: '200',
            healthyThresholdCount: 2,
            unhealthyThresholdCount: 3,
            timeout: Duration.seconds(4),
        })

        // CodePipeline
        const codePipeline = new codepipeline.Pipeline(this, 'CoffeeShopPipeline', {
            pipelineName: 'CoffeeShopPipeline',
        });

        const sourceOutputEcr = new codepipeline.Artifact();
        const sourceOutputCodeCommit = new codepipeline.Artifact();
        const sourceActionECR = new codepipeline_actions.EcrSourceAction({
            actionName: 'ECR',
            repository: this.ecrRepository,
            imageTag: 'latest', // optional, default: 'latest'
            output: sourceOutputEcr,
        });

        const codecommitRepo = new codecommit.Repository(this, 'GitRepo', {
            repositoryName: CODECOMMIT_REPO_NAME
        });
github cloudcomponents / cdk-components / examples / codepipeline-slack-approval-example / src / codepipeline-slack-approval-stack.ts View on Github external
const slackBotToken = process.env.SLACK_BOT_TOKEN as string;
        const slackSigningSecret = process.env.SLACK_SIGNING_SECRET as string;
        const slackChannel = process.env.SLACK_CHANNEL as string;

        const approvalAction = new SlackApprovalAction({
            actionName: 'SlackApproval',
            slackBotToken,
            slackSigningSecret,
            slackChannel,
            externalEntityLink: 'http://cloudcomponents.org',
            additionalInformation:
                'Would you like to promote the build to production?',
        });

        new Pipeline(this, 'MyPipeline', {
            pipelineName: 'MyPipeline',
            stages: [
                {
                    stageName: 'Source',
                    actions: [sourceAction],
                },
                {
                    stageName: 'Build',
                    actions: [buildAction],
                },
                {
                    stageName: 'Approval',
                    actions: [approvalAction],
                },
            ],
        });
github seagull-js / seagull / packages / deploy-aws / src / seagull_stack.ts View on Github external
addPipeline(pipelineName: string) {
    const name = `${this.id}-${pipelineName}`
    return new Pipeline(this, name, { pipelineName: name })
  }
github seagull-js / seagull / packages / pipeline / src / lib / cdk / stack.ts View on Github external
constructor(parent: App, pipelineName: string, props: ProjectStackProps) {
    super(parent, pipelineName, props)
    this.branchName = props.branchName
    this.mode = props.mode
    this.pipelineName = pipelineName
    this.pipeline = new Pipeline(this, pipelineName, { pipelineName })
    this.appPath = props.env.path
    this.addIAMRole()
    this.addSourceStage()
    this.addBuildStage()
  }
github cloudcomponents / cdk-components / examples / codepipeline-check-parameter-action-example / src / codepipeline-check-parameter-action-stack.ts View on Github external
const sourceAction = new CodeCommitSourceAction({
            actionName: 'CodeCommit',
            repository,
            output: sourceArtifact,
            branch: 'master',
        });

        const checkAction = new CodepipelineCheckParameterAction({
            actionName: 'Check',
            parameterName: '/test',
            regExp: /^The.*Spain$/,
            logParameter: true,
        });

        new Pipeline(this, 'MyPipeline', {
            pipelineName: 'MyPipeline',
            stages: [
                {
                    stageName: 'Source',
                    actions: [sourceAction],
                },
                {
                    stageName: 'Check',
                    actions: [checkAction],
                },
            ],
        });
    }
}