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 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
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.50.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b63e00f4198a2793f7aca542fc96b2488fa0c72a4d9ac0052d07b71580e64a0 |
|
MD5 | 8cddc3789ddd5059e259765082c6d44f |
|
BLAKE2b-256 | cf1fd691583f8c03de7eb3e8a12e497e1b832fda0c6b91875e1945a78e0ea72c |
Close
Hashes for cloudcomponents.cdk_codepipeline_merge_action-1.50.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed9f16f06057f13e47754468163722657da2e25e2c1b10c4c5c370f304f1bc44 |
|
MD5 | 1cd523f421b1da68ea24a6cdc2b4fb2b |
|
BLAKE2b-256 | b1d1d5ba25883495ace63a46438047459059be13595713f70a6a7c15cab55297 |