-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.projenrc.js
125 lines (120 loc) · 2.98 KB
/
.projenrc.js
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
const projen = require('projen');
const project = new projen.awscdk.AwsCdkConstructLibrary({
author: 'scott.hsieh',
authorName: 'Shu-Jeng Hsieh',
authorAddress: 'https://fantasticsie.medium.com/',
description: 'A construct for AWS Glue DataBrew wtih CICD',
keywords: [
'aws',
'cdk',
'cloudwatch',
'codecommit',
'codepipeline',
'databrew',
'lambda',
'cicd',
'serverless',
'scott.hsieh',
],
catalog: {
announce: true,
twitter: 'fantasticHsieh',
},
cdkVersion: '2.27.0',
defaultReleaseBranch: 'main',
majorVersion: 2,
name: 'cdk-databrew-cicd',
repositoryUrl: 'https://github.com/HsiehShuJeng/cdk-databrew-cicd.git',
deps: [
'aws-cdk-lib',
'constructs@^10.0.5',
],
devDeps: [
'aws-cdk-lib',
'constructs@^10.0.5',
'esbuild',
'source-map-support',
],
jsiiVersion: '5.4.x',
peerDeps: [
'aws-cdk-lib',
'constructs@^10.0.5',
],
eslint: true,
dependabotOptions: {
workflowOptions: {
labels: ['auto-approve', 'auto-merge'],
},
},
autoApproveUpgrades: true,
autoApproveOptions: {
secret: 'GITHUB_TOKEN',
allowedUsernames: ['HsiehShuJeng'],
},
releaseToNpm: true,
publishToPypi: {
distName: 'cdk_databrew_cicd',
module: 'cdk_databrew_cicd',
},
publishToMaven: {
mavenGroupId: 'io.github.hsiehshujeng',
mavenArtifactId: 'cdk-databrew-cicd',
javaPackage: 'io.github.hsiehshujeng.cdk.databrew.cicd',
mavenEndpoint: 'https://s01.oss.sonatype.org', // check https://central.sonatype.org/publish/release/#login-into-ossrh
},
publishToNuget: {
dotNetNamespace: 'ScottHsieh.Cdk',
packageId: 'Databrew.Cicd',
},
publishToGo: {
moduleName: 'github.com/HsiehShuJeng/cdk-databrew-cicd-go',
},
depsUpgradeOptions: {
exclude: ['yaml'],
},
});
project.eslint.addOverride({
files: ['*.ts'],
rules: { '@typescript-eslint/no-require-imports': 0 },
});
const mavenExclusions = ['public.pem', 'private.pem'];
const pythonDemoExclustions = [
'*.swp',
'package-lock.json',
'__pycache__',
'.pytest_cache',
'.env',
'.venv',
'*.egg-info',
];
const javaDemoExclustions = [
'.classpath.txt',
'target/',
'.classpath',
'.project',
'.idea',
'.settings',
'.vscode/',
'*.iml',
];
const commonExclusions = ['cdk.context.json', 'yarn-error.log', 'cdk.out', '.cdk.staging', '.DS_Store'];
const exclusionLists = [
commonExclusions,
mavenExclusions,
pythonDemoExclustions,
javaDemoExclustions,
];
excludeFilesFrom(project, exclusionLists);
project.synth();
/**
* Exclude files from the project's .npmignore and .gitignore.
*
* @param {Object} pjObject - The project object to apply the exclusions.
* @param {Array<Array<string>>} exclusionList - An array of arrays, where each inner array contains a list of file patterns to exclude.
*/
function excludeFilesFrom(pjObject, exclusionList) {
for (const exclusions of exclusionList) {
pjObject.npmignore.exclude(...exclusions);
pjObject.gitignore.exclude(...exclusions);
}
}