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

File metadata

File hashes

Hashes for cloudcomponents.cdk-codepipeline-merge-action-1.11.0.tar.gz
Algorithm Hash digest
SHA256 b496b4c9b681bdf1344106fb70f690c88966787f97c4ce23d583a8397828fe1e
MD5 3b0a5db5cd1f57330b7fe1ea68df2629
BLAKE2b-256 3bfdd7ba4c036e846be93fd7f364ce0b4c0aa14ef55e8e11cb67cb069d35b7e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cloudcomponents.cdk_codepipeline_merge_action-1.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 02c41e7b45ec89a00bfaa8dca67147a5822a642a7ae6ad3807d8fe85c7f73093
MD5 1739180838ef767f0e1a889f248a2ec6
BLAKE2b-256 ca5be48e4779fe90a31e5f9e8388e86d791341c1596a234ced22a9a587cf74f7

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