Cdk component that automatically merge branches in codepipelines
Project description
@cloudcomponents/cdk-codepipeline-merge-action
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
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
Close
Hashes for cloudcomponents.cdk-codepipeline-merge-action-1.9.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e252ce5d0ecd54fa5e39d508c4ea49772c9d74ddb26a3e67ba7284bcff56178 |
|
MD5 | fafd62b254712abf15368eded00e5ec8 |
|
BLAKE2b-256 | 746764be8d770925650747b2947ce9311986de52166d764eb50c39a549db207f |
Close
Hashes for cloudcomponents.cdk_codepipeline_merge_action-1.9.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8866109db3c7163fe8636644a8ede4147f3e6aff574b7e9db72e9579d51cfd28 |
|
MD5 | b41f9dfeb2a6fce52d865f91e806163e |
|
BLAKE2b-256 | 3e26b7d0a71deac7a3f8b4db7fce274e688d3f8c9f4f60767bcba2cd3c9c4520 |