cloudcomponents.cdk-codepipeline-merge-action


Namecloudcomponents.cdk-codepipeline-merge-action JSON
Version 2.3.0 PyPI version JSON
download
home_pagehttps://github.com/cloudcomponents/cdk-constructs
SummaryCdk component that automatically merge branches in codepipelines
upload_time2024-04-17 18:36:00
maintainerNone
docs_urlNone
authorhupe1980
requires_python~=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![cloudcomponents Logo](https://raw.githubusercontent.com/cloudcomponents/cdk-constructs/master/logo.png)](https://github.com/cloudcomponents/cdk-constructs)

# @cloudcomponents/cdk-codepipeline-merge-action

[![Build Status](https://github.com/cloudcomponents/cdk-constructs/workflows/Build/badge.svg)](https://github.com/cloudcomponents/cdk-constructs/actions?query=workflow=Build)
[![cdkdx](https://img.shields.io/badge/buildtool-cdkdx-blue.svg)](https://github.com/hupe1980/cdkdx)
[![typescript](https://img.shields.io/badge/jsii-typescript-blueviolet.svg)](https://www.npmjs.com/package/@cloudcomponents/cdk-codepipeline-merge-action)
[![python](https://img.shields.io/badge/jsii-python-blueviolet.svg)](https://pypi.org/project/cloudcomponents.cdk-codepipeline-merge-action/)

> Cdk component that automatically merge branches in codepipelines

## Install

TypeScript/JavaScript:

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

Python:

```bash
pip install cloudcomponents.cdk-codepipeline-merge-action
```

## How to use

```python
import { CodePipelineMergeAction } from '@cloudcomponents/cdk-codepipeline-merge-action';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Repository } from 'aws-cdk-lib/aws-codecommit';
import { Pipeline, Artifact } from 'aws-cdk-lib/aws-codepipeline';
import { CodeCommitSourceAction } from 'aws-cdk-lib/aws-codepipeline-actions';
import { Construct } from 'constructs';

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

    const repository = new Repository(this, 'Repository', {
      repositoryName: 'merge-action-repository',
    });

    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, 'Pipeline', {
      pipelineName: 'merge-action-pipeline',
      stages: [
        {
          stageName: 'Source',
          actions: [sourceAction],
        },
        {
          stageName: 'Merge',
          actions: [mergeAction],
        },
      ],
    });
  }
}
```

## API Reference

See [API.md](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-codepipeline-merge-action/API.md).

## Example

See more complete [examples](https://github.com/cloudcomponents/cdk-constructs/tree/master/examples).

## License

[MIT](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-codepipeline-merge-action/LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/cloudcomponents/cdk-constructs",
    "name": "cloudcomponents.cdk-codepipeline-merge-action",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "hupe1980",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/90/88/d8bcb2e9839e962a650a54902cb877a7e918b2f8fc93b80def7b71f93fe2/cloudcomponents.cdk-codepipeline-merge-action-2.3.0.tar.gz",
    "platform": null,
    "description": "[![cloudcomponents Logo](https://raw.githubusercontent.com/cloudcomponents/cdk-constructs/master/logo.png)](https://github.com/cloudcomponents/cdk-constructs)\n\n# @cloudcomponents/cdk-codepipeline-merge-action\n\n[![Build Status](https://github.com/cloudcomponents/cdk-constructs/workflows/Build/badge.svg)](https://github.com/cloudcomponents/cdk-constructs/actions?query=workflow=Build)\n[![cdkdx](https://img.shields.io/badge/buildtool-cdkdx-blue.svg)](https://github.com/hupe1980/cdkdx)\n[![typescript](https://img.shields.io/badge/jsii-typescript-blueviolet.svg)](https://www.npmjs.com/package/@cloudcomponents/cdk-codepipeline-merge-action)\n[![python](https://img.shields.io/badge/jsii-python-blueviolet.svg)](https://pypi.org/project/cloudcomponents.cdk-codepipeline-merge-action/)\n\n> Cdk component that automatically merge branches in codepipelines\n\n## Install\n\nTypeScript/JavaScript:\n\n```bash\nnpm i @cloudcomponents/cdk-codepipeline-merge-action\n```\n\nPython:\n\n```bash\npip install cloudcomponents.cdk-codepipeline-merge-action\n```\n\n## How to use\n\n```python\nimport { CodePipelineMergeAction } from '@cloudcomponents/cdk-codepipeline-merge-action';\nimport { Stack, StackProps } from 'aws-cdk-lib';\nimport { Repository } from 'aws-cdk-lib/aws-codecommit';\nimport { Pipeline, Artifact } from 'aws-cdk-lib/aws-codepipeline';\nimport { CodeCommitSourceAction } from 'aws-cdk-lib/aws-codepipeline-actions';\nimport { Construct } from 'constructs';\n\nexport class CodePipelineMergeActionStack extends Stack {\n  constructor(scope: Construct, id: string, props?: StackProps) {\n    super(scope, id, props);\n\n    const repository = new Repository(this, 'Repository', {\n      repositoryName: 'merge-action-repository',\n    });\n\n    const sourceArtifact = new Artifact();\n\n    const sourceAction = new CodeCommitSourceAction({\n      actionName: 'CodeCommit',\n      repository,\n      output: sourceArtifact,\n      branch: 'next',\n    });\n\n    const mergeAction = new CodePipelineMergeAction({\n      actionName: 'Merge',\n      repository,\n      sourceCommitSpecifier: 'next',\n      destinationCommitSpecifier: 'master',\n    });\n\n    new Pipeline(this, 'Pipeline', {\n      pipelineName: 'merge-action-pipeline',\n      stages: [\n        {\n          stageName: 'Source',\n          actions: [sourceAction],\n        },\n        {\n          stageName: 'Merge',\n          actions: [mergeAction],\n        },\n      ],\n    });\n  }\n}\n```\n\n## API Reference\n\nSee [API.md](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-codepipeline-merge-action/API.md).\n\n## Example\n\nSee more complete [examples](https://github.com/cloudcomponents/cdk-constructs/tree/master/examples).\n\n## License\n\n[MIT](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-codepipeline-merge-action/LICENSE)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Cdk component that automatically merge branches in codepipelines",
    "version": "2.3.0",
    "project_urls": {
        "Homepage": "https://github.com/cloudcomponents/cdk-constructs",
        "Source": "https://github.com/cloudcomponents/cdk-constructs.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b24237f659cbbacf19cdfea8cc49810efed105d8a2a1644d01358bab62a815ba",
                "md5": "735c58bbe4bbe6a88c6bade4f3d26a49",
                "sha256": "80c39eeab641280914feb696597e140a91ea9f5a6b2eb81f3b729a1769a3bbbf"
            },
            "downloads": -1,
            "filename": "cloudcomponents.cdk_codepipeline_merge_action-2.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "735c58bbe4bbe6a88c6bade4f3d26a49",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 1346220,
            "upload_time": "2024-04-17T18:35:52",
            "upload_time_iso_8601": "2024-04-17T18:35:52.738033Z",
            "url": "https://files.pythonhosted.org/packages/b2/42/37f659cbbacf19cdfea8cc49810efed105d8a2a1644d01358bab62a815ba/cloudcomponents.cdk_codepipeline_merge_action-2.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9088d8bcb2e9839e962a650a54902cb877a7e918b2f8fc93b80def7b71f93fe2",
                "md5": "e5766e3481a7e18f24c818c8d80941da",
                "sha256": "beb9f43dc8b37e3871a6ca11ca562b98f4ed1dac36aa70a71fc202e06f8f37c4"
            },
            "downloads": -1,
            "filename": "cloudcomponents.cdk-codepipeline-merge-action-2.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e5766e3481a7e18f24c818c8d80941da",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 1347258,
            "upload_time": "2024-04-17T18:36:00",
            "upload_time_iso_8601": "2024-04-17T18:36:00.651666Z",
            "url": "https://files.pythonhosted.org/packages/90/88/d8bcb2e9839e962a650a54902cb877a7e918b2f8fc93b80def7b71f93fe2/cloudcomponents.cdk-codepipeline-merge-action-2.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-17 18:36:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cloudcomponents",
    "github_project": "cdk-constructs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cloudcomponents.cdk-codepipeline-merge-action"
}
        
Elapsed time: 0.23193s