summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-05 11:07:13 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-05 11:07:13 +0000
commit1ad13f93126cd5c563c867cf226fdbe5f121d7cd (patch)
tree1e43b60a42bac66848b16dedff8a0f985409bf86
parent3aa41e777c577acc13f6a1b52257ba35e0b8d9a1 (diff)
automatic import of python-cloudcomponents-cdk-codecommit-backupopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-cloudcomponents-cdk-codecommit-backup.spec361
-rw-r--r--sources1
3 files changed, 363 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..a2843d6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/cloudcomponents.cdk-codecommit-backup-2.0.0.tar.gz
diff --git a/python-cloudcomponents-cdk-codecommit-backup.spec b/python-cloudcomponents-cdk-codecommit-backup.spec
new file mode 100644
index 0000000..3a9f100
--- /dev/null
+++ b/python-cloudcomponents-cdk-codecommit-backup.spec
@@ -0,0 +1,361 @@
+%global _empty_manifest_terminate_build 0
+Name: python-cloudcomponents.cdk-codecommit-backup
+Version: 2.0.0
+Release: 1
+Summary: Backup CodeCommit repositories to S3
+License: MIT
+URL: https://github.com/cloudcomponents/cdk-constructs
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/c7/a7/4082a694deb5fb2e4e95426a7d0a36709c45992270cf4a9901a1260ee058/cloudcomponents.cdk-codecommit-backup-2.0.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-aws-cdk-lib
+Requires: python3-constructs
+Requires: python3-jsii
+Requires: python3-publication
+
+%description
+[![cloudcomponents Logo](https://raw.githubusercontent.com/cloudcomponents/cdk-constructs/master/logo.png)](https://github.com/cloudcomponents/cdk-constructs)
+
+# @cloudcomponents/cdk-codecommit-backup
+
+[![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-codecommit-backup)
+[![python](https://img.shields.io/badge/jsii-python-blueviolet.svg)](https://pypi.org/project/cloudcomponents.cdk-codecommit-backup/)
+[![Mentioned in Awesome CDK](https://awesome.re/mentioned-badge.svg)](https://github.com/kolomied/awesome-cdk)
+
+> Backup CodeCommit repositories to S3
+
+## Install
+
+TypeScript/JavaScript:
+
+```bash
+npm i @cloudcomponents/cdk-codecommit-backup
+```
+
+Python:
+
+```bash
+pip install cloudcomponents.cdk-codecommit-backup
+```
+
+## How to use
+
+```python
+import { BackupBucket, S3CodeCommitBackup } from '@cloudcomponents/cdk-codecommit-backup';
+import { Duration, Stack, StackProps } from 'aws-cdk-lib';
+import { Repository } from 'aws-cdk-lib/aws-codecommit';
+import { Schedule } from 'aws-cdk-lib/aws-events';
+import { SnsTopic } from 'aws-cdk-lib/aws-events-targets';
+import { Topic } from 'aws-cdk-lib/aws-sns';
+import { EmailSubscription } from 'aws-cdk-lib/aws-sns-subscriptions';
+import { Construct } from 'constructs';
+
+export class CodeCommitBackupStack extends Stack {
+ constructor(scope: Construct, id: string, props?: StackProps) {
+ super(scope, id, props);
+
+ if (typeof process.env.REPOSITORY_NAME === 'undefined') {
+ throw new Error('environment variable REPOSITORY_NAME undefined');
+ }
+ const repository = Repository.fromRepositoryName(this, 'Repository', process.env.REPOSITORY_NAME);
+
+ const backupBucket = new BackupBucket(this, 'BackupBuckt', {
+ retentionPeriod: Duration.days(90),
+ });
+
+ // The following example runs a task every day at 4am
+ const backup = new S3CodeCommitBackup(this, 'S3CodeCommitBackup', {
+ backupBucket,
+ repository,
+ schedule: Schedule.cron({
+ minute: '0',
+ hour: '4',
+ }),
+ });
+
+ const backupTopic = new Topic(this, 'BackupTopic');
+
+ if (process.env.DEVSECOPS_TEAM_EMAIL) {
+ backupTopic.addSubscription(new EmailSubscription(process.env.DEVSECOPS_TEAM_EMAIL));
+ }
+
+ backup.onBackupStarted('started', {
+ target: new SnsTopic(backupTopic),
+ });
+
+ backup.onBackupSucceeded('succeeded', {
+ target: new SnsTopic(backupTopic),
+ });
+
+ backup.onBackupFailed('failed', {
+ target: new SnsTopic(backupTopic),
+ });
+ }
+}
+```
+
+## API Reference
+
+See [API.md](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-codecommit-backup/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-codecommit-backup/LICENSE)
+
+
+
+
+%package -n python3-cloudcomponents.cdk-codecommit-backup
+Summary: Backup CodeCommit repositories to S3
+Provides: python-cloudcomponents.cdk-codecommit-backup
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-cloudcomponents.cdk-codecommit-backup
+[![cloudcomponents Logo](https://raw.githubusercontent.com/cloudcomponents/cdk-constructs/master/logo.png)](https://github.com/cloudcomponents/cdk-constructs)
+
+# @cloudcomponents/cdk-codecommit-backup
+
+[![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-codecommit-backup)
+[![python](https://img.shields.io/badge/jsii-python-blueviolet.svg)](https://pypi.org/project/cloudcomponents.cdk-codecommit-backup/)
+[![Mentioned in Awesome CDK](https://awesome.re/mentioned-badge.svg)](https://github.com/kolomied/awesome-cdk)
+
+> Backup CodeCommit repositories to S3
+
+## Install
+
+TypeScript/JavaScript:
+
+```bash
+npm i @cloudcomponents/cdk-codecommit-backup
+```
+
+Python:
+
+```bash
+pip install cloudcomponents.cdk-codecommit-backup
+```
+
+## How to use
+
+```python
+import { BackupBucket, S3CodeCommitBackup } from '@cloudcomponents/cdk-codecommit-backup';
+import { Duration, Stack, StackProps } from 'aws-cdk-lib';
+import { Repository } from 'aws-cdk-lib/aws-codecommit';
+import { Schedule } from 'aws-cdk-lib/aws-events';
+import { SnsTopic } from 'aws-cdk-lib/aws-events-targets';
+import { Topic } from 'aws-cdk-lib/aws-sns';
+import { EmailSubscription } from 'aws-cdk-lib/aws-sns-subscriptions';
+import { Construct } from 'constructs';
+
+export class CodeCommitBackupStack extends Stack {
+ constructor(scope: Construct, id: string, props?: StackProps) {
+ super(scope, id, props);
+
+ if (typeof process.env.REPOSITORY_NAME === 'undefined') {
+ throw new Error('environment variable REPOSITORY_NAME undefined');
+ }
+ const repository = Repository.fromRepositoryName(this, 'Repository', process.env.REPOSITORY_NAME);
+
+ const backupBucket = new BackupBucket(this, 'BackupBuckt', {
+ retentionPeriod: Duration.days(90),
+ });
+
+ // The following example runs a task every day at 4am
+ const backup = new S3CodeCommitBackup(this, 'S3CodeCommitBackup', {
+ backupBucket,
+ repository,
+ schedule: Schedule.cron({
+ minute: '0',
+ hour: '4',
+ }),
+ });
+
+ const backupTopic = new Topic(this, 'BackupTopic');
+
+ if (process.env.DEVSECOPS_TEAM_EMAIL) {
+ backupTopic.addSubscription(new EmailSubscription(process.env.DEVSECOPS_TEAM_EMAIL));
+ }
+
+ backup.onBackupStarted('started', {
+ target: new SnsTopic(backupTopic),
+ });
+
+ backup.onBackupSucceeded('succeeded', {
+ target: new SnsTopic(backupTopic),
+ });
+
+ backup.onBackupFailed('failed', {
+ target: new SnsTopic(backupTopic),
+ });
+ }
+}
+```
+
+## API Reference
+
+See [API.md](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-codecommit-backup/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-codecommit-backup/LICENSE)
+
+
+
+
+%package help
+Summary: Development documents and examples for cloudcomponents.cdk-codecommit-backup
+Provides: python3-cloudcomponents.cdk-codecommit-backup-doc
+%description help
+[![cloudcomponents Logo](https://raw.githubusercontent.com/cloudcomponents/cdk-constructs/master/logo.png)](https://github.com/cloudcomponents/cdk-constructs)
+
+# @cloudcomponents/cdk-codecommit-backup
+
+[![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-codecommit-backup)
+[![python](https://img.shields.io/badge/jsii-python-blueviolet.svg)](https://pypi.org/project/cloudcomponents.cdk-codecommit-backup/)
+[![Mentioned in Awesome CDK](https://awesome.re/mentioned-badge.svg)](https://github.com/kolomied/awesome-cdk)
+
+> Backup CodeCommit repositories to S3
+
+## Install
+
+TypeScript/JavaScript:
+
+```bash
+npm i @cloudcomponents/cdk-codecommit-backup
+```
+
+Python:
+
+```bash
+pip install cloudcomponents.cdk-codecommit-backup
+```
+
+## How to use
+
+```python
+import { BackupBucket, S3CodeCommitBackup } from '@cloudcomponents/cdk-codecommit-backup';
+import { Duration, Stack, StackProps } from 'aws-cdk-lib';
+import { Repository } from 'aws-cdk-lib/aws-codecommit';
+import { Schedule } from 'aws-cdk-lib/aws-events';
+import { SnsTopic } from 'aws-cdk-lib/aws-events-targets';
+import { Topic } from 'aws-cdk-lib/aws-sns';
+import { EmailSubscription } from 'aws-cdk-lib/aws-sns-subscriptions';
+import { Construct } from 'constructs';
+
+export class CodeCommitBackupStack extends Stack {
+ constructor(scope: Construct, id: string, props?: StackProps) {
+ super(scope, id, props);
+
+ if (typeof process.env.REPOSITORY_NAME === 'undefined') {
+ throw new Error('environment variable REPOSITORY_NAME undefined');
+ }
+ const repository = Repository.fromRepositoryName(this, 'Repository', process.env.REPOSITORY_NAME);
+
+ const backupBucket = new BackupBucket(this, 'BackupBuckt', {
+ retentionPeriod: Duration.days(90),
+ });
+
+ // The following example runs a task every day at 4am
+ const backup = new S3CodeCommitBackup(this, 'S3CodeCommitBackup', {
+ backupBucket,
+ repository,
+ schedule: Schedule.cron({
+ minute: '0',
+ hour: '4',
+ }),
+ });
+
+ const backupTopic = new Topic(this, 'BackupTopic');
+
+ if (process.env.DEVSECOPS_TEAM_EMAIL) {
+ backupTopic.addSubscription(new EmailSubscription(process.env.DEVSECOPS_TEAM_EMAIL));
+ }
+
+ backup.onBackupStarted('started', {
+ target: new SnsTopic(backupTopic),
+ });
+
+ backup.onBackupSucceeded('succeeded', {
+ target: new SnsTopic(backupTopic),
+ });
+
+ backup.onBackupFailed('failed', {
+ target: new SnsTopic(backupTopic),
+ });
+ }
+}
+```
+
+## API Reference
+
+See [API.md](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-codecommit-backup/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-codecommit-backup/LICENSE)
+
+
+
+
+%prep
+%autosetup -n cloudcomponents.cdk-codecommit-backup-2.0.0
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-cloudcomponents.cdk-codecommit-backup -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 2.0.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..3eb6e22
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+d8c35d11de9782abaefe8014b5c78622 cloudcomponents.cdk-codecommit-backup-2.0.0.tar.gz