cloudcomponents.cdk-codepipeline-merge-action


Namecloudcomponents.cdk-codepipeline-merge-action JSON
Version 2.4.0 PyPI version JSON
download
home_pagehttps://github.com/cloudcomponents/cdk-constructs
SummaryCdk component that automatically merge branches in codepipelines
upload_time2024-05-16 19:28:45
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/af/60/ce68c2562de5568b1777b8633f7a85af939d685ac2d705fd00a0d53857eb/cloudcomponents.cdk-codepipeline-merge-action-2.4.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.4.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": "3cd14cffc630d2f128ecf421f94bd2e66666bc2c0ae9d46e98c5f0f4e1e45c82",
                "md5": "c5c3e3d7d9bb2d2a2c16817d98b51f97",
                "sha256": "9e461a61c224df827af531cb800ebcd2885db97a67192205784d3a67cfb90f4e"
            },
            "downloads": -1,
            "filename": "cloudcomponents.cdk_codepipeline_merge_action-2.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c5c3e3d7d9bb2d2a2c16817d98b51f97",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 144179,
            "upload_time": "2024-05-16T19:28:20",
            "upload_time_iso_8601": "2024-05-16T19:28:20.291552Z",
            "url": "https://files.pythonhosted.org/packages/3c/d1/4cffc630d2f128ecf421f94bd2e66666bc2c0ae9d46e98c5f0f4e1e45c82/cloudcomponents.cdk_codepipeline_merge_action-2.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "af60ce68c2562de5568b1777b8633f7a85af939d685ac2d705fd00a0d53857eb",
                "md5": "02bdcbe92ba2d876a3ace4c0995c0bf2",
                "sha256": "ce7157437f4dd7d111f045501cdbd9035736684945672f81de3c7c02138bdae3"
            },
            "downloads": -1,
            "filename": "cloudcomponents.cdk-codepipeline-merge-action-2.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "02bdcbe92ba2d876a3ace4c0995c0bf2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 145175,
            "upload_time": "2024-05-16T19:28:45",
            "upload_time_iso_8601": "2024-05-16T19:28:45.125029Z",
            "url": "https://files.pythonhosted.org/packages/af/60/ce68c2562de5568b1777b8633f7a85af939d685ac2d705fd00a0d53857eb/cloudcomponents.cdk-codepipeline-merge-action-2.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-16 19:28:45",
    "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: 1.09235s