Skip to main content

Cdk component that automatically merge branches in codepipelines

Project description

cloudcomponents Logo

@cloudcomponents/cdk-codepipeline-merge-action

Build Status cdkdx typescript python

Cdk component that automatically merge branches in codepipelines

Install

TypeScript/JavaScript:

npm i @cloudcomponents/cdk-codepipeline-merge-action

Python:

pip install cloudcomponents.cdk-codepipeline-merge-action

How to use

# Example automatically generated from non-compiling source. May contain errors.
import { Construct, Stack, StackProps } from '@aws-cdk/core';
import { Repository } from '@aws-cdk/aws-codecommit';
import { Pipeline, Artifact } from '@aws-cdk/aws-codepipeline';
import { CodeCommitSourceAction } from '@aws-cdk/aws-codepipeline-actions';
import { CodePipelineMergeAction } from '@cloudcomponents/cdk-codepipeline-merge-action';

export class CodePipelineMergeActionStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);

    const repository = new Repository(this, 'Repository', {
      repositoryName: 'MyRepositoryName',
    });

    const sourceArtifact = new Artifact();

    const sourceAction = new CodeCommitSourceAction({
      actionName: 'CodeCommit',
      repository,
      output: sourceArtifact,
      branch: 'next',
    });

    const mergeAction = new CodePipelineMergeAction({
      actionName: 'Merge',
      repository,
      sourceCommitSpecifier: 'next',
      destinationCommitSpecifier: 'master',
    });

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

API Reference

See API.md.

Example

See more complete examples.

License

MIT

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file cloudcomponents.cdk-codepipeline-merge-action-1.50.0.tar.gz.

File metadata

  • Download URL: cloudcomponents.cdk-codepipeline-merge-action-1.50.0.tar.gz
  • Upload date:
  • Size: 76.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for cloudcomponents.cdk-codepipeline-merge-action-1.50.0.tar.gz
Algorithm Hash digest
SHA256 6b63e00f4198a2793f7aca542fc96b2488fa0c72a4d9ac0052d07b71580e64a0
MD5 8cddc3789ddd5059e259765082c6d44f
BLAKE2b-256 cf1fd691583f8c03de7eb3e8a12e497e1b832fda0c6b91875e1945a78e0ea72c

See more details on using hashes here.

File details

Details for the file cloudcomponents.cdk_codepipeline_merge_action-1.50.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cloudcomponents.cdk_codepipeline_merge_action-1.50.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ed9f16f06057f13e47754468163722657da2e25e2c1b10c4c5c370f304f1bc44
MD5 1cd523f421b1da68ea24a6cdc2b4fb2b
BLAKE2b-256 b1d1d5ba25883495ace63a46438047459059be13595713f70a6a7c15cab55297

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page