-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.projenrc.ts
106 lines (94 loc) · 3.96 KB
/
.projenrc.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import {javascript, ReleasableCommits} from "projen";
import { monorepo } from "@aws/pdk";
import {NpmAccess} from "projen/lib/javascript";
import {AwsCdkConstructLibrary} from "projen/lib/awscdk";
const packagesDir = 'packages';
const scope = '@cloudkitect';
const packagesPath = `${packagesDir}/${scope}`;
const project = new monorepo.MonorepoTsProject({
devDeps: ["@aws/pdk"],
name: "freemium",
packageManager: javascript.NodePackageManager.PNPM,
projenrcTs: true,
github: true,
githubOptions: {
mergify: false
},
pnpmVersion: "8",
workspaceConfig: {
linkLocalWorkspaceBins: true,
},
});
const subProjectSettings = {
authorAddress: 'support@cloudkitect.com',
parent: project,
defaultReleaseBranch: 'main',
cdkVersion: '2.137.0',
constructsVersion: '10.3.0',
author: 'CloudKitect Inc',
authorOrganization: true,
repositoryUrl: 'https://github.com/cloudkitect/freemium',
jsiiVersion: '~5.3.0',
packageManager: project.package.packageManager,
github: true,
release: true,
buildWorkflow: true,
githubOptions: {
mergify: false,
},
majorVersion: 1,
releasableCommits: ReleasableCommits.featuresAndFixes(),
pnpmVersion: "8",
npmAccess: NpmAccess.PUBLIC,
npmProvenance: false,
}
const components = new AwsCdkConstructLibrary({
...subProjectSettings,
description: "CloudKitect Inc. freemium components are scaled down versions of CloudKitect enhanced components offered as monthly or yearly subscription. These are well architected components that offer" +
" out of the box monitoring, alerting and compliance to various standards.",
name: `${scope}/components`,
outdir: `${packagesPath}/components`,
keywords: ["cloudkitect", "cdk", "freemium", "infrastructure as code", "aws",
"cloud components", "cdk constructs", "components", "terraform", "cloud compliance", "well architected"],
publishToPypi: {
distName: 'cloudkitect.components',
module: 'cloudkitect.components'
},
publishToNuget: {
dotNetNamespace: 'CloudKitect.Components',
packageId: 'CloudKitect.Components'
}
});
components.synth()
const releaseYaml = project.tryFindObjectFile('.github/workflows/release_cloudkitect-components.yml');
releaseYaml!.addOverride('jobs.release_npm.steps.5.run', 'cd .repo && pnpm i --no-frozen-lockfile')
releaseYaml!.addOverride('jobs.release_pypi.steps.6.run', 'cd .repo && pnpm i --no-frozen-lockfile')
releaseYaml!.addOverride('jobs.release_nuget.steps.6.run', 'cd .repo && pnpm i --no-frozen-lockfile')
const patterns = new AwsCdkConstructLibrary({
...subProjectSettings,
description: "CloudKitect Inc freemium patterns are built on top of CloudKitect freemium components which comply to various standards. " +
"Using these patterns you can host your website, or run your containerized app using ECS Fargate within a couple hours",
name: `${scope}/patterns`,
outdir: `${packagesPath}/patterns`,
keywords: ["cloudkitect", "cloudkitect inc", "cdk", "freemium", "infrastructure as code", "aws",
"cloud components", "cdk constructs", "patterns", "terraform", "cloud compliance", "well architected"],
publishToPypi: {
distName: 'cloudkitect.patterns',
module: 'cloudkitect.patterns'
},
publishToNuget: {
dotNetNamespace: 'CloudKitect.Patterns',
packageId: 'CloudKitect.Patterns'
}
});
patterns.addDeps(`${scope}/components@^1.4.1`)
patterns.addPeerDeps(`${scope}/components@^1.4.1`)
patterns.addDevDeps(`${scope}/components@1.4.1`)
patterns.synth();
const patternReleaseYaml = project.tryFindObjectFile('.github/workflows/release_cloudkitect-patterns.yml');
patternReleaseYaml!.addOverride('jobs.release_npm.steps.5.run', 'cd .repo && pnpm i --no-frozen-lockfile')
patternReleaseYaml!.addOverride('jobs.release_pypi.steps.6.run', 'cd .repo && pnpm i --no-frozen-lockfile')
patternReleaseYaml!.addOverride('jobs.release_nuget.steps.6.run', 'cd .repo && pnpm i --no-frozen-lockfile')
const exclusions = ['.DS_Store', '.idea', '*.iml']
project.gitignore.exclude(...exclusions)
project.synth();