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 without compilation. See https://github.com/aws/jsii/issues/826
from aws_cdk.core import Construct, Stack, StackProps
from aws_cdk.aws_codecommit import Repository
from aws_cdk.aws_codepipeline import Pipeline, Artifact
from aws_cdk.aws_codepipeline_actions import CodeCommitSourceAction
from cloudcomponents.cdk_codepipeline_merge_action import CodePipelineMergeAction

class CodePipelineMergeActionStack(Stack):
    def __init__(self, scope, id, *, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None, analyticsReporting=None):
        super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting)

        repository = Repository(self, "Repository",
            repository_name="MyRepositoryName"
        )

        source_artifact = Artifact()

        source_action = CodeCommitSourceAction(
            action_name="CodeCommit",
            repository=repository,
            output=source_artifact,
            branch="next"
        )

        merge_action = CodePipelineMergeAction(
            action_name="Merge",
            repository=repository,
            source_commit_specifier="next",
            destination_commit_specifier="master"
        )

        Pipeline(self, "MyPipeline",
            pipeline_name="MyPipeline",
            stages=[StageProps(
                stage_name="Source",
                actions=[source_action]
            ), StageProps(
                stage_name="Merge",
                actions=[merge_action]
            )
            ]
        )

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.42.1.tar.gz.

File metadata

  • Download URL: cloudcomponents.cdk-codepipeline-merge-action-1.42.1.tar.gz
  • Upload date:
  • Size: 71.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.6

File hashes

Hashes for cloudcomponents.cdk-codepipeline-merge-action-1.42.1.tar.gz
Algorithm Hash digest
SHA256 eeeb2eef6719378a94afbd4e4bec4533b8659869369465fa579eedc880ecbc14
MD5 1c190f09cf8e7b73af05863ec72d7b55
BLAKE2b-256 13c8fdedca18f6c69ae5f6342189498c86cd64b111288180184dbd5ef9c9cdcb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cloudcomponents.cdk_codepipeline_merge_action-1.42.1-py3-none-any.whl
Algorithm Hash digest
SHA256 57c2ba9d7b1d2ae09befba8f8f0e068fea379ad0928430506f41400bc3aa6040
MD5 4e79a1ba1dec132acee703cde02524a1
BLAKE2b-256 8a867b270d474523bffebd43f1a7ce55311517eff72f175d796d98beaa43bc3b

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