@rio-cloud/cdk-v2-constructs 2.0.6 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/.jsii +411 -66
  2. package/CHANGELOG.md +35 -0
  3. package/CONTRIBUTION.md +122 -9
  4. package/MIGRATION_GUIDE.md +1 -1
  5. package/lib/contributions/team-transport-two/pipeline/application-stage.d.ts +12 -0
  6. package/lib/contributions/team-transport-two/pipeline/application-stage.js +16 -0
  7. package/lib/contributions/team-transport-two/pipeline/build-project.d.ts +13 -0
  8. package/lib/contributions/team-transport-two/pipeline/build-project.js +31 -0
  9. package/lib/contributions/team-transport-two/pipeline/buildspec-vulnerability-checks.yaml +19 -0
  10. package/lib/contributions/team-transport-two/pipeline/buildspec.yaml +58 -0
  11. package/lib/contributions/team-transport-two/pipeline/datadog-monitors.d.ts +15 -0
  12. package/lib/contributions/team-transport-two/pipeline/datadog-monitors.js +42 -0
  13. package/lib/contributions/team-transport-two/pipeline/index.d.ts +1 -0
  14. package/lib/contributions/team-transport-two/pipeline/index.js +14 -0
  15. package/lib/contributions/team-transport-two/pipeline/pipeline-stack.d.ts +105 -0
  16. package/lib/contributions/team-transport-two/pipeline/pipeline-stack.js +173 -0
  17. package/lib/fargate/datadog.js +2 -2
  18. package/lib/fargate/rio-fargate-service.d.ts +6 -0
  19. package/lib/fargate/rio-fargate-service.js +16 -12
  20. package/lib/index.d.ts +1 -0
  21. package/lib/index.js +2 -1
  22. package/lib/rio-claidometer.d.ts +4 -1
  23. package/lib/rio-claidometer.js +4 -1
  24. package/lib/watchful/lambda.d.ts +1 -0
  25. package/lib/watchful/lambda.js +18 -1
  26. package/package.json +4 -2
  27. package/scripts/.jsii-doc.mjs +11 -0
  28. package/version.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,41 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [2.3.0](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/compare/commits?targetBranch=refs%2Ftags%2Fv2.2.0&sourceBranch=refs%2Ftags%2Fv2.3.0) (2022-06-21)
6
+
7
+
8
+ ### Features
9
+
10
+ * **contributions:** Provide more information on contributions in general ([535b600](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/commits/535b60081f90914b0519f8ade15b4c5b49aac01a))
11
+ * **contributions:** Provide more information on contributions in general ([f87d671](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/commits/f87d67157029bc5f8e9d35b7feaea205b4914e28))
12
+ * **fargate-template:** Support ARM ([b451bc2](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/commits/b451bc2c05b0988183288669dec79947c89a22de))
13
+ * **fargate-template:** Support ARM ([cc3e84f](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/commits/cc3e84f8f6521d20c110be2b3a3cd9a481b2619d))
14
+
15
+ ## [2.2.0](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/compare/commits?targetBranch=refs%2Ftags%2Fv2.1.0&sourceBranch=refs%2Ftags%2Fv2.2.0) (2022-06-14)
16
+
17
+
18
+ ### Features
19
+
20
+ * New construct - Opinionated RIO pipeline ([7f6fd07](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/commits/7f6fd0778d498f4d62a9b5def6ac476b95f3ab4e))
21
+ * New construct - Opinionated RIO pipeline ([a290a92](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/commits/a290a92ace145966537e51546449fd64cddd99ad))
22
+ * New construct - Opinionated RIO pipeline ([0e16395](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/commits/0e16395374a83d6a5ff05abc7c68f9141a73c991))
23
+ * New construct - Opinionated RIO pipeline ([ca831c2](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/commits/ca831c2321c0a68ad24ecf80d76dc1d857a72868))
24
+ * New construct - Opinionated RIO pipeline ([e1e5bbf](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/commits/e1e5bbf7444745702fd3cee65ecbf2820e1f4d26))
25
+ * New construct - Opinionated RIO pipeline ([c79b5ba](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/commits/c79b5bad900db68fb06aed8606852618c58cae6f))
26
+ * New construct - Opinionated RIO pipeline ([9a3e471](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/commits/9a3e471508966faa9c0fa391518de6a817545698))
27
+ * New construct - Opinionated RIO pipeline ([5bebea5](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/commits/5bebea5ebec06fbc8c8b637310f9d98a0e98cc48))
28
+ * New construct - Opinionated RIO pipeline ([3f6ac5d](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/commits/3f6ac5d673c083643f5831d52b6a9ff7eacc9698))
29
+ * New construct - Opinionated RIO pipeline ([744d9b9](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/commits/744d9b93bd3816d1f8c588f05456cdbadbdb035f))
30
+ * New construct - Opinionated RIO pipeline ([8872869](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/commits/88728697b502be5e383a91627af4bdc0eff34366))
31
+ * New construct - Opinionated RIO pipeline ([89ac4d8](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/commits/89ac4d84315326b326b0b56e2317ec6f6af03490))
32
+
33
+ ## [2.1.0](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/compare/commits?targetBranch=refs%2Ftags%2Fv2.0.6&sourceBranch=refs%2Ftags%2Fv2.1.0) (2022-06-02)
34
+
35
+
36
+ ### Features
37
+
38
+ * :sparkles: Added log monitor error for lambda in watchful ([2e01032](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/commits/2e010327cd11b92f455aace32d10ce47f0afb503))
39
+
5
40
  ### [2.0.6](https://collaboration.msi.audi.com/stash/projects/RIODEV/repos/cdk-v2-constructs/compare/commits?targetBranch=refs%2Ftags%2Fv2.0.5&sourceBranch=refs%2Ftags%2Fv2.0.6) (2022-05-31)
6
41
 
7
42
 
package/CONTRIBUTION.md CHANGED
@@ -1,15 +1,128 @@
1
- ## Developing CDK libraries
1
+ # Developing CDK libraries
2
+
3
+ We generally distinguish between two kinds of constructs: "core constructs" and "contributions".
4
+ Core constructs are officially provided and maintained by team CLAID while contributions are provided and maintained by teams/groups of developers at RIO/MAN.
5
+
6
+ ## Difference between core constructs and contributions
7
+
8
+ ### Core constructs
9
+
10
+ * Are officially provided and maintained by team CLAID.
11
+ * You can safely use any of them if there is no explicit deprecation and beta warning available.
12
+ * If you miss a feature or functionality, simply create a ticket at [team CLAID's feature request board](https://collaboration.msi.audi.com/jira/secure/RapidBoard.jspa?rapidView=7682).
13
+ * If you find a bug or have general question on the usage of the constructs, please create a platform support request in the [#rio-platform-support Slack channel](https://my-rio.slack.com/archives/C034WAG3QUA).
14
+
15
+ ### Contributions
16
+
17
+ * Are provided by third parties, e.g., teams or groups of developer at RIO.
18
+ * Usage of these constructs is at you own risk. Get in contact with the owning team/group to find out if the construct stable and thus ready to use for you.
19
+ * For any feedback, improvements, or bug tickets, please read the construct's `CONTRIBUTION.md` file.
20
+ * Team CLAID does not guarantee any backward compatibility/stability for these constructs. We will try our very best to avoid any breaking changes, but if we are blocked by such a construct, we will simply (temporarily) remove it from a new version.
21
+
22
+ ## Committing code
2
23
 
3
24
  Provide commit messages according to [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). This library uses [standard-version](https://github.com/conventional-changelog/standard-version) to generate the changelog and publish a new version.
4
- Example commit message:
5
- ```shell
6
- fix(watchful): :bug: removing toggle rioclaid-1857-datadog-threshold; removed threshold
7
- rioclaid-1857
25
+ Example commit message are
26
+ ```text
27
+ feat(pipeline): added new stage for secrets deployment
28
+
29
+ * RIOCLAID-1932 RIOCLAID-1934
30
+ ```
31
+ and
32
+ ```text
33
+ chore: Relax CDK dependency resolution to ease usage for customers
34
+
35
+ * Now the teams can use their own CDK version (at least 2.20.0) and must not explicitly use ours
36
+ * RIOCLAID-2510
8
37
  ```
9
38
 
10
- ## Releasing a new version
39
+ Moreover, you need to sign your commits using GPG, see the [Bitbucket documentation](https://confluence.atlassian.com/bitbucketserver/using-gpg-keys-913477014.html#UsingGPGkeys-SigncommitsandtagswithaGPGkey).
40
+
41
+ ## Contributions
42
+
43
+ First of all, thank you for considering a contribution to the CDK constructs library.
44
+ We as team CLAID welcome any contribution and are happy to help you with building the construct.
45
+
46
+ We support providing custom constructs provided by you.
47
+ You can, of course, always use any other mechanism to share commonly used constructs, but adding them to the RIO CDK constructs removes some burden from you.
48
+ * We take care of the release process for you, i.e., we release the project to `npm` and make sure that the construct is `jsii`-compatible (which allows us to eventually release the constructs in another language, e.g., Java, later if needed).
49
+ * We run all the tests in our CI/CD pipeline and make sure that the construct works well with core constructs.
50
+ * You can use our Claidometer infrastructure to track the usage of your constructs for free, e.g., how often is it currently being used and which versions are out there.
51
+ * If needed, we consult you in building the construct as early as in the design phase.
52
+ * You get a peer review by a developer from team CLAID.
53
+
54
+ There is no free lunch and thus providing contributions also comes with some (hopefully neglectable) costs compared to the benefits.
55
+ In the case of contributions, we ask you to follow some rules.
56
+
57
+ ### Respect the folder structure
58
+
59
+ We require you to define a team/group owning the construct and use that name as the top-level folder in the `src/contributions` folder.
60
+ For each high-level construct you provide, we recommend adding a separate folder named by the construct.
61
+
62
+ As an example, you team/group's folder structure might look as follows (only showing the mandatory files).
63
+ ```text
64
+ src/contributions # the place for all contributions
65
+ └── team-super-awesome # the name of the team/group providing the construct
66
+ ├── CONTRIBUTION.md # contribution information, e.g., contact details
67
+ ├── super-awesome-construct # the name of the construct
68
+ │ ├── .
69
+ │ ├── .
70
+ │ ├── .
71
+ │ ├── CHANGELOG.md # a changelog for the semantically versioned releases
72
+ │ └── README.md # general information for the construct, e.g., how to use it
73
+ └── yet-another-construct # the name of the construct
74
+ ├── .
75
+ ├── .
76
+ ├── .
77
+ ├── CHANGELOG.md # a changelog for the semantically versioned releases
78
+ └── README.md # general information for the construct, e.g., how to use it
79
+ ```
80
+
81
+ #### Provide a `CONTRIBUTION.md` file
82
+
83
+ The file must contain the following information.
84
+ * Who are you?
85
+ * How can persons contact you if they want to contribute to the construct?
86
+ * What is the preferred way of contributing? Do you, e.g., prefer PRs or a ticket?
87
+
88
+ #### Provide a `CHANGELOG.md` file
89
+
90
+ * Use [semantic versioning](https://semver.org/) (make sure to update the `Claidometer` construct accordingly on new relases)
91
+ * Describe the changes, e.g.,
92
+ > * 🎉 new feature released
93
+ > * 🐛 bug squashed
94
+ > * 📚 documentation improved
95
+ > * ⚠️ deprecation warning/breaking change including steps how to resolve it
96
+
97
+ ### Use Claidometer to track the usage of your constructs
98
+
99
+ Simply add the `Claidometer` construct and provide the following information.
100
+ * `product`: Use `ClaidometerProduct.CDK_CONTRIBUTION` here
101
+ * `packageName`: We recommend to use the owning team/group here
102
+ * `feature`: We recommend to use the name of the feature
103
+ * `version`: The current version of the construct (should be aligned with the `CHANGELOG.md`)
104
+ If you follow the recommended folder structure, you can derive both the `packageName` and the `feature` from it, e.g.
105
+ ```typescript
106
+ const [feature, packageName] = __dirname.split(path.sep).reverse();
107
+ new Claidometer(this, 'Claidometer', {
108
+ product: ClaidometerProduct.CDK_CONTRIBUTION,
109
+ packageName,
110
+ feature,
111
+ version: '0.0.1',
112
+ });
113
+ ```
114
+
115
+ This enables you to track the usage of the construct and the versions in use over time.
116
+ Claidometer makes sure that each usage of the construct is stored in the data lake and allows CLAID to query/visualize the Data in Athena and/or Quicksight.
117
+ Contact team CLAID if you want to get insights into the data or need access to it.
118
+
119
+ ### Think about your commitment
11
120
 
12
- Make sure that the parameter store `/config/npm/token` having the npm token to publish is added before releasing.
121
+ Be aware that, even though it is hopefully quite easy to release a CDK contribution, other developers can see the code and might want to use it or improve upon it.
122
+ Therefore, clearly state the usage and your expectations in the `README.md` and `CONTRIBUTION.md`.
123
+ If your intention is to share some highly team-specific code between your team's CDK services but do not want others to use that solution, clearly state it there.
124
+ (Though we highly discourage you from doing that as we think that the option to collaborate and share constructs is one of the key benefits from CDK.)
125
+ Please also react to any feedback of developers using the stated feedback channels.
13
126
 
14
- 1. Create locally a new release by running `npm run release`. (e.g. `npm run release -- --release-as minor`)
15
- 2. Check the generated `CHANGELOG.md` file and adjust thing when necessary
127
+ Finally, we as team CLAID might need to change or even remove your constructs in future CDK releases if it blocks us, e.g., to release a critical feature.
128
+ We will try to contact you upfront in case of non-trivial changes and do our best to avoid removing the construct.
@@ -13,7 +13,7 @@
13
13
  3. **add `constructs`**: `npm install constructs@10`
14
14
  4. **replace imports**: `$ npx -p aws-cdk-migration rewrite-imports-v2 <your-source-root-here>/**/*.ts`
15
15
  5. update `cdk.json` (e.g., by generating a new CDKv2 app in another folder with `npx cdk@2 init app --language=typescript` and comparing its `cdk.json` with yours)
16
- 6. replace `@aws-cdk/assert` with `aws-cdk-lib/assertions` ando migrate expectations to `Template.fromStack(...).hasResource`
16
+ 6. replace `@aws-cdk/assert` with `aws-cdk-lib/assertions` and migrate expectations to `Template.fromStack(...).hasResource`
17
17
  * additional information: [Official Migration Guide](https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html)
18
18
  5. Replace `@rioclaid/cdk-constructs` with `@rio-cloud/cdk-v2-constructs`
19
19
  * **add `@rio-cloud/cdk-v2-constructs`**: `npm install @rio-cloud/cdk-v2-constructs`
@@ -0,0 +1,12 @@
1
+ import { Stage, StageProps } from 'aws-cdk-lib';
2
+ import { Construct } from 'constructs';
3
+ import { IAppStackFactory } from './pipeline-stack';
4
+ interface ApplicationProps extends StageProps {
5
+ readonly serviceName: string;
6
+ readonly version: string;
7
+ readonly appStackFactory: IAppStackFactory;
8
+ }
9
+ export declare class Application extends Stage {
10
+ constructor(scope: Construct, id: string, props: ApplicationProps);
11
+ }
12
+ export {};
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Application = void 0;
4
+ const aws_cdk_lib_1 = require("aws-cdk-lib");
5
+ class Application extends aws_cdk_lib_1.Stage {
6
+ constructor(scope, id, props) {
7
+ super(scope, id, props);
8
+ props.appStackFactory.create(this, {
9
+ serviceName: props.serviceName,
10
+ stackName: props.serviceName,
11
+ version: props.version,
12
+ });
13
+ }
14
+ }
15
+ exports.Application = Application;
16
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwbGljYXRpb24tc3RhZ2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29udHJpYnV0aW9ucy90ZWFtLXRyYW5zcG9ydC10d28vcGlwZWxpbmUvYXBwbGljYXRpb24tc3RhZ2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNkNBQWdEO0FBVWhELE1BQWEsV0FBWSxTQUFRLG1CQUFLO0lBQ3BDLFlBQVksS0FBZ0IsRUFBRSxFQUFVLEVBQUUsS0FBdUI7UUFDL0QsS0FBSyxDQUFDLEtBQUssRUFBRSxFQUFFLEVBQUUsS0FBSyxDQUFDLENBQUM7UUFFeEIsS0FBSyxDQUFDLGVBQWUsQ0FBQyxNQUFNLENBQUMsSUFBSSxFQUFFO1lBQ2pDLFdBQVcsRUFBRSxLQUFLLENBQUMsV0FBVztZQUM5QixTQUFTLEVBQUUsS0FBSyxDQUFDLFdBQVc7WUFDNUIsT0FBTyxFQUFFLEtBQUssQ0FBQyxPQUFPO1NBQ3ZCLENBQUMsQ0FBQztJQUNMLENBQUM7Q0FDRjtBQVZELGtDQVVDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgU3RhZ2UsIFN0YWdlUHJvcHMgfSBmcm9tICdhd3MtY2RrLWxpYic7XG5pbXBvcnQgeyBDb25zdHJ1Y3QgfSBmcm9tICdjb25zdHJ1Y3RzJztcbmltcG9ydCB7IElBcHBTdGFja0ZhY3RvcnkgfSBmcm9tICcuL3BpcGVsaW5lLXN0YWNrJztcblxuaW50ZXJmYWNlIEFwcGxpY2F0aW9uUHJvcHMgZXh0ZW5kcyBTdGFnZVByb3BzIHtcbiAgcmVhZG9ubHkgc2VydmljZU5hbWU6IHN0cmluZztcbiAgcmVhZG9ubHkgdmVyc2lvbjogc3RyaW5nO1xuICByZWFkb25seSBhcHBTdGFja0ZhY3Rvcnk6IElBcHBTdGFja0ZhY3Rvcnk7XG59XG5cbmV4cG9ydCBjbGFzcyBBcHBsaWNhdGlvbiBleHRlbmRzIFN0YWdlIHtcbiAgY29uc3RydWN0b3Ioc2NvcGU6IENvbnN0cnVjdCwgaWQ6IHN0cmluZywgcHJvcHM6IEFwcGxpY2F0aW9uUHJvcHMpIHtcbiAgICBzdXBlcihzY29wZSwgaWQsIHByb3BzKTtcblxuICAgIHByb3BzLmFwcFN0YWNrRmFjdG9yeS5jcmVhdGUodGhpcywge1xuICAgICAgc2VydmljZU5hbWU6IHByb3BzLnNlcnZpY2VOYW1lLFxuICAgICAgc3RhY2tOYW1lOiBwcm9wcy5zZXJ2aWNlTmFtZSxcbiAgICAgIHZlcnNpb246IHByb3BzLnZlcnNpb24sXG4gICAgfSk7XG4gIH1cbn1cbiJdfQ==
@@ -0,0 +1,13 @@
1
+ import * as pipelines from 'aws-cdk-lib/pipelines';
2
+ import { Construct } from 'constructs';
3
+ export interface RioGradleCodeBuildProjectProps {
4
+ input: pipelines.IFileSetProducer;
5
+ cdkOutDirectory?: string;
6
+ buildSpecPath: string;
7
+ serviceName: string;
8
+ hostedZoneName: string;
9
+ env?: Record<string, string>;
10
+ }
11
+ export declare class RioGradleCodeBuildProject extends pipelines.CodeBuildStep {
12
+ constructor(scope: Construct, id: string, props: RioGradleCodeBuildProjectProps);
13
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RioGradleCodeBuildProject = void 0;
4
+ const fs = require("fs");
5
+ const aws_cdk_lib_1 = require("aws-cdk-lib");
6
+ const codebuild = require("aws-cdk-lib/aws-codebuild");
7
+ const pipelines = require("aws-cdk-lib/pipelines");
8
+ const yaml = require("js-yaml");
9
+ class RioGradleCodeBuildProject extends pipelines.CodeBuildStep {
10
+ constructor(scope, id, props) {
11
+ var _a;
12
+ super(id, {
13
+ input: props.input,
14
+ partialBuildSpec: codebuild.BuildSpec.fromObject(yaml.load(fs.readFileSync(props.buildSpecPath, { encoding: 'utf-8' }))),
15
+ commands: [],
16
+ buildEnvironment: {
17
+ buildImage: codebuild.LinuxBuildImage.AMAZON_LINUX_2_3,
18
+ computeType: codebuild.ComputeType.LARGE,
19
+ environmentVariables: {
20
+ AWS_ACCOUNT_ID: { value: aws_cdk_lib_1.Stack.of(scope).account },
21
+ SERVICE_NAME: { value: props.serviceName },
22
+ HOSTED_ZONE: { value: props.hostedZoneName },
23
+ },
24
+ },
25
+ primaryOutputDirectory: (_a = props.cdkOutDirectory) !== null && _a !== void 0 ? _a : './',
26
+ env: props.env,
27
+ });
28
+ }
29
+ }
30
+ exports.RioGradleCodeBuildProject = RioGradleCodeBuildProject;
31
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQtcHJvamVjdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb250cmlidXRpb25zL3RlYW0tdHJhbnNwb3J0LXR3by9waXBlbGluZS9idWlsZC1wcm9qZWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHlCQUF5QjtBQUN6Qiw2Q0FBb0M7QUFDcEMsdURBQXV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W5jb2Rpbmc6ICd1dGYtOCcgfSkpIGFzIE9iamVjdCksXG4gICAgICBjb21tYW5kczogW10sXG4gICAgICBidWlsZEVudmlyb25tZW50OiB7XG4gICAgICAgIGJ1aWxkSW1hZ2U6IGNvZGVidWlsZC5MaW51eEJ1aWxkSW1hZ2UuQU1BWk9OX0xJTlVYXzJfMyxcbiAgICAgICAgY29tcHV0ZVR5cGU6IGNvZGVidWlsZC5Db21wdXRlVHlwZS5MQVJHRSxcbiAgICAgICAgZW52aXJvbm1lbnRWYXJpYWJsZXM6IHtcbiAgICAgICAgICBBV1NfQUNDT1VOVF9JRDogeyB2YWx1ZTogU3RhY2sub2Yoc2NvcGUpLmFjY291bnQgfSxcbiAgICAgICAgICBTRVJWSUNFX05BTUU6IHsgdmFsdWU6IHByb3BzLnNlcnZpY2VOYW1lIH0sXG4gICAgICAgICAgSE9TVEVEX1pPTkU6IHsgdmFsdWU6IHByb3BzLmhvc3RlZFpvbmVOYW1lIH0sXG4gICAgICAgIH0sXG4gICAgICB9LFxuICAgICAgcHJpbWFyeU91dHB1dERpcmVjdG9yeTogcHJvcHMuY2RrT3V0RGlyZWN0b3J5ID8/ICcuLycsXG4gICAgICBlbnY6IHByb3BzLmVudixcbiAgICB9LFxuICAgICk7XG4gIH1cbn1cbiJdfQ==
@@ -0,0 +1,19 @@
1
+ version: 0.2
2
+ env:
3
+ variables:
4
+ LANG: C.UTF-8
5
+ JAVA_HOME: /usr/lib/jvm/java-17-amazon-corretto.x86_64
6
+ phases:
7
+ pre_build:
8
+ commands:
9
+ - yum install --assumeyes --quiet java-17-amazon-corretto-devel
10
+ - alternatives --set java /usr/lib/jvm/java-17-amazon-corretto.x86_64/bin/java
11
+ build:
12
+ commands:
13
+ - ./gradlew dependencyCheckAnalyze
14
+ cache:
15
+ paths:
16
+ - /root/.cache/**/*
17
+ - /root/.gradle/caches/**/*
18
+ - /root/.gradle/wrapper/**/*
19
+ - /root/.gradle/dependency-check-data/**/*
@@ -0,0 +1,58 @@
1
+ version: '0.2'
2
+ env:
3
+ parameter-store:
4
+ SERVICE_KEYSTORE_PASSWORD: /config/${SERVICE_NAME}/service-keystore-password
5
+ LICENSE_BUCKET_NAME: /config/oss-licenses/bucket-name
6
+ ACCOUNT_NAME: /config/account/name
7
+ variables:
8
+ JAVA_HOME: /usr/lib/jvm/java-17-amazon-corretto.x86_64
9
+ phases:
10
+ pre_build:
11
+ commands:
12
+ - yum install --assumeyes --quiet java-17-amazon-corretto-devel
13
+ - alternatives --set java /usr/lib/jvm/java-17-amazon-corretto.x86_64/bin/java
14
+ build:
15
+ commands:
16
+ # Keep this echo statement for identifying the default buildspec in our test
17
+ - echo "Using standard gradle build spec..."
18
+
19
+ # BUILD AND TEST
20
+ - ./gradlew clean build
21
+
22
+ # LICENSE CHECKING
23
+ - set -u; aws s3 cp s3://${LICENSE_BUCKET_NAME}/whitelist-gradle.txt licenses/approved_licenses.txt
24
+ - ./gradlew checkLicenses
25
+ - set -u; aws s3 cp licenses/licenses.txt s3://${LICENSE_BUCKET_NAME}/reports/${ACCOUNT_NAME}/${SERVICE_NAME}.txt
26
+
27
+ # SELF CERT SIGNING
28
+ - keytool -genkey -alias InternalServiceCertificate -keyalg RSA -keystore containerfiles/service-keystore.p12 -validity 3650 -storetype PKCS12 -dname "CN=internal.service.${SERVICE_NAME}.${HOSTED_ZONE_NAME}, OU=Logistics, O=Rio, L=Munich, ST=BY, C=DE" -keypass ${SERVICE_KEYSTORE_PASSWORD} -storepass ${SERVICE_KEYSTORE_PASSWORD}
29
+
30
+ # DOCKER IMAGE BUILD
31
+ - ./gradlew jibBuildTar --quiet
32
+
33
+ # npm synth action
34
+ - cd infrastructure
35
+ - npm install npm@8.12.1 --global
36
+ - npm ci
37
+ # mute stdout of cdk synth to not dump the resulting Cfn template in logs
38
+ - npm run cdk synth 1> /dev/null
39
+
40
+ # In pipeline: Error parsing reference: is not a valid repository/tag: invalid reference format.
41
+ # workaround due to https://github.com/aws/aws-cdk/issues/18044',
42
+ - find ./ -type f -name "*DeployApplicationStacks*.assets.json" -print0 | xargs -0 sed --in-place 's|docker load -i asset.|docker load -i ../asset.|g'
43
+
44
+ - cd ..
45
+ reports:
46
+ JunitTestResults:
47
+ files:
48
+ - '**/*'
49
+ base-directory: build/test-results
50
+
51
+ cache:
52
+ paths:
53
+ - /cert/**/*
54
+ - /root/.cache/**/*
55
+ - /root/.gradle/caches/**/*
56
+ - /root/.gradle/wrapper/**/*
57
+ - /root/google-cloud-tools-java/jib/**/*
58
+ - target/jib-cache/**/*
@@ -0,0 +1,15 @@
1
+ import { Reference } from 'aws-cdk-lib';
2
+ import { Construct } from 'constructs';
3
+ import { DatadogMonitor } from '../../../datadog/datadogMonitor';
4
+ interface DatadogPipelineMonitorProps {
5
+ pipelineName: string | Reference;
6
+ serviceName: string;
7
+ accountId: string;
8
+ }
9
+ export declare class DatadogPipelineErrorAlert extends DatadogMonitor {
10
+ constructor(scope: Construct, id: string, props: DatadogPipelineMonitorProps);
11
+ }
12
+ export declare class DataDogPipelineErrorAlertForVulnerabilityChecks extends DatadogMonitor {
13
+ constructor(scope: Construct, id: string, props: DatadogPipelineMonitorProps);
14
+ }
15
+ export {};
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DataDogPipelineErrorAlertForVulnerabilityChecks = exports.DatadogPipelineErrorAlert = void 0;
4
+ const datadogMonitor_1 = require("../../../datadog/datadogMonitor");
5
+ class DatadogPipelineErrorAlert extends datadogMonitor_1.DatadogMonitor {
6
+ constructor(scope, id, props) {
7
+ super(scope, id, {
8
+ serviceName: props.serviceName,
9
+ monitor: {
10
+ type: 'query alert',
11
+ tags: ['cicd'],
12
+ query: `min(last_5m):min:deployment.codepipeline.executions{pipeline_name:${props.pipelineName},account_id:${props.accountId}} < 1`,
13
+ name: 'CI pipeline status',
14
+ message: '[P5] {{#is_alert}}\\nThe CI build is broken\\n{{/is_alert}} \\n\\n{{#is_alert_recovery}}\\nThe CI build works again.\\n{{/is_alert_recovery}}',
15
+ options: {
16
+ require_full_window: false,
17
+ },
18
+ },
19
+ });
20
+ }
21
+ }
22
+ exports.DatadogPipelineErrorAlert = DatadogPipelineErrorAlert;
23
+ class DataDogPipelineErrorAlertForVulnerabilityChecks extends datadogMonitor_1.DatadogMonitor {
24
+ constructor(scope, id, props) {
25
+ super(scope, id, {
26
+ serviceName: props.serviceName,
27
+ alertTypes: ['opsgenie'],
28
+ monitor: {
29
+ type: 'query alert',
30
+ tags: ['cicd'],
31
+ query: `min(last_5m):min:deployment.codepipeline.executions{pipeline_name:${props.pipelineName},account_id:${props.accountId}} < 1`,
32
+ name: 'Vulnerability checks',
33
+ message: '[P3] Vulnerabilities detected',
34
+ options: {
35
+ require_full_window: false,
36
+ },
37
+ },
38
+ });
39
+ }
40
+ }
41
+ exports.DataDogPipelineErrorAlertForVulnerabilityChecks = DataDogPipelineErrorAlertForVulnerabilityChecks;
42
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YWRvZy1tb25pdG9ycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb250cmlidXRpb25zL3RlYW0tdHJhbnNwb3J0LXR3by9waXBlbGluZS9kYXRhZG9nLW1vbml0b3JzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUVBLG9FQUFpRTtBQVFqRSxNQUFhLHlCQUEwQixTQUFRLCtCQUFjO0lBQzNELFlBQVksS0FBZ0IsRUFBRSxFQUFVLEVBQUUsS0FBa0M7UUFDMUUsS0FBSyxDQUFDLEtBQUssRUFBRSxFQUFFLEVBQUU7WUFDZixXQUFXLEVBQUUsS0FBSyxDQUFDLFdBQVc7WUFDOUIsT0FBTyxFQUFFO2dCQUNQLElBQUksRUFBRSxhQUFhO2dCQUNuQixJQUFJLEVBQUUsQ0FBQyxNQUFNLENBQUM7Z0JBQ2QsS0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bnM6IHtcbiAgICAgICAgICByZXF1aXJlX2Z1bGxfd2luZG93OiBmYWxzZSxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgfSk7XG4gIH1cbn1cblxuZXhwb3J0IGNsYXNzIERhdGFEb2dQaXBlbGluZUVycm9yQWxlcnRGb3JWdWxuZXJhYmlsaXR5Q2hlY2tzIGV4dGVuZHMgRGF0YWRvZ01vbml0b3Ige1xuICBjb25zdHJ1Y3RvcihzY29wZTogQ29uc3RydWN0LCBpZDogc3RyaW5nLCBwcm9wczogRGF0YWRvZ1BpcGVsaW5lTW9uaXRvclByb3BzKSB7XG4gICAgc3VwZXIoc2NvcGUsIGlkLCB7XG4gICAgICBzZXJ2aWNlTmFtZTogcHJvcHMuc2VydmljZU5hbWUsXG4gICAgICBhbGVydFR5cGVzOiBbJ29wc2dlbmllJ10sXG4gICAgICBtb25pdG9yOiB7XG4gICAgICAgIHR5cGU6ICdxdWVyeSBhbGVydCcsXG4gICAgICAgIHRhZ3M6IFsnY2ljZCddLFxuICAgICAgICBxdWVyeTogYG1pbihsYXN0XzVtKTptaW46ZGVwbG95bWVudC5jb2RlcGlwZWxpbmUuZXhlY3V0aW9uc3twaXBlbGluZV9uYW1lOiR7cHJvcHMucGlwZWxpbmVOYW1lfSxhY2NvdW50X2lkOiR7cHJvcHMuYWNjb3VudElkfX0gPCAxYCxcbiAgICAgICAgbmFtZTogJ1Z1bG5lcmFiaWxpdHkgY2hlY2tzJyxcbiAgICAgICAgbWVzc2FnZTogJ1tQM10gVnVsbmVyYWJpbGl0aWVzIGRldGVjdGVkJyxcbiAgICAgICAgb3B0aW9uczoge1xuICAgICAgICAgIHJlcXVpcmVfZnVsbF93aW5kb3c6IGZhbHNlLFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICB9KTtcbiAgfVxufVxuIl19
@@ -0,0 +1 @@
1
+ export * from './pipeline-stack';
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./pipeline-stack"), exports);
14
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29udHJpYnV0aW9ucy90ZWFtLXRyYW5zcG9ydC10d28vcGlwZWxpbmUvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEsbURBQWlDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9waXBlbGluZS1zdGFjayc7XG4iXX0=
@@ -0,0 +1,105 @@
1
+ import { Stack, StackProps } from 'aws-cdk-lib';
2
+ import { Construct } from 'constructs';
3
+ /**
4
+ * @struct
5
+ */
6
+ export interface PipelineStackProps extends StackProps {
7
+ /**
8
+ * The name of the service
9
+ * - This has to be the same name as the repository as the s3 trigger file created by the bitbucket-integration uses this as a prefix
10
+ * - The serviceName is available as an environment variable SERVICE_NAME in the CodeBuildStep
11
+ * - The serviceName is available in the AppStackProps in the appStackFactory
12
+ * - The serviceName is available as stackName property in the AppStackProps in the appStackFactory. I.e. the stack is named after the service
13
+ * - The serviceName is handed over to all Datadog monitors
14
+ * - RIO convention is that uploaded license-check-files are named after the service, i.e. serviceName.txt
15
+ */
16
+ readonly serviceName: string;
17
+ /**
18
+ * Provider for appStack to be deployed.
19
+ *
20
+ * This acts as a wrapper for all resources you want to deploy via the pipeline.
21
+ */
22
+ readonly appStackFactory: IAppStackFactory;
23
+ /**
24
+ * Defines which kind of pipeline is deployed.
25
+ */
26
+ readonly pipelineType: PipelineType;
27
+ /**
28
+ * Path to a custom buildspec.yaml that is used if provided.
29
+ *
30
+ * A pre-defined buildspec.yaml fitting the pipelineType is used if not provided.
31
+ */
32
+ readonly customBuildspecPath?: string;
33
+ /**
34
+ * Path to secrets file containing encrypted secrets.
35
+ *
36
+ * The RioSecretsDeployStep is added prior to deployment of the AppStack if a path is provided.
37
+ *
38
+ * No secrets are deployed if no path is provided.
39
+ */
40
+ readonly secretsDeployStepProps?: PipelineStackRioSecretsDeployStepProps;
41
+ }
42
+ /**
43
+ * Provider interface to create the AppStack within the specific scope
44
+ *
45
+ * Simply place the AppStack creation into the create-method:
46
+ * @example
47
+ *
48
+ * // Use e.g. within ApplicationProps as JSONObject:
49
+ * { create: (construct, props) => new Stack(construct, 'AppStack', props) }
50
+ *
51
+ * // or simply as class interface within your stack implementation:
52
+ * class PipelineStage extends Stage implements IAppStackFactory {
53
+ * constructor(scope: Construct, id: string, props: StageProps) {
54
+ * super(scope, id, props);
55
+ * // your stage definitiom
56
+ * }
57
+ *
58
+ * create(scope: Construct, props: AppStackProps): void {
59
+ * // app stack initiation goes in here
60
+ * }
61
+ * }
62
+ */
63
+ export interface IAppStackFactory {
64
+ /**
65
+ * Factory method, being invoked with the specific scope during pipeline instantiation
66
+ *
67
+ * @param scope the parent construct for the app stack
68
+ * @param props the app stacks properties
69
+ */
70
+ create(scope: Construct, props: AppStackProps): void;
71
+ }
72
+ export interface AppStackProps extends StackProps {
73
+ readonly serviceName: string;
74
+ readonly version: string;
75
+ }
76
+ /**
77
+ * Selected properties being handed over to RioSecretsDeployStep.
78
+ *
79
+ * @see rio.RioSecretsDeployStep
80
+ * @see rio.RioSecretsDeployStepProps
81
+ */
82
+ export interface PipelineStackRioSecretsDeployStepProps {
83
+ readonly secretsFilePath: string;
84
+ }
85
+ export declare enum PipelineType {
86
+ /**
87
+ * Self-mutating codepipeline deploying the provided AppStack. Be aware: The provided service won't have access to Kafka.
88
+ *
89
+ * Comes with a pre-defined buildspec.yaml for a gradle project. This buildspec.yaml is used for both the main and
90
+ * branch pipeline and includes the following steps
91
+ * - build and test of the artifact via command "./gradlew clean build".
92
+ * <p> This gradle command must be provided by the gradle project.
93
+ * - license-check and upload of license-check-file via command "./gradlew checkLicenses".
94
+ * <p> This gradle command must be provided by the gradle project.
95
+ * - create a self-signed certificate to make TLS communication possible, e.g. with a loadbalancer.
96
+ * - build the container image via command "./gradlew jibBuildTar".
97
+ * <p> This gradle command must be provided by the gradle project.
98
+ */
99
+ STANDARD_GRADLE = "STANDARD_GRADLE"
100
+ }
101
+ export declare class PipelineStack extends Stack {
102
+ private static addLifecycleRuleArtifactBucket;
103
+ constructor(scope: Construct, id: string, props: PipelineStackProps);
104
+ private renamePipelineToLowerCase;
105
+ }