-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy path.projenrc.js
77 lines (64 loc) · 2.56 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
const { awscdk, JsonPatch } = require('projen');
const { DependabotScheduleInterval } = require('projen/lib/github');
const PROJECT_NAME = 'cdk-eks-karpenter';
const project = new awscdk.AwsCdkConstructLibrary({
author: 'Andreas Lindh',
authorAddress: '[email protected]',
description: 'CDK construct library that allows you install Karpenter in an AWS EKS cluster',
keywords: ['eks', 'karpenter'],
cdkVersion: '2.104.0',
majorVersion: 1,
devDeps: [
'@aws-cdk/lambda-layer-kubectl-v24',
'@aws-cdk/lambda-layer-kubectl-v25',
'@aws-cdk/lambda-layer-kubectl-v26',
'@aws-cdk/lambda-layer-kubectl-v27',
'@aws-cdk/lambda-layer-kubectl-v28',
'@aws-cdk/lambda-layer-kubectl-v29',
'@aws-cdk/lambda-layer-kubectl-v30',
'@aws-cdk/lambda-layer-kubectl-v31',
],
bundledDeps: [
'semver',
],
defaultReleaseBranch: 'main',
name: PROJECT_NAME,
repositoryUrl: 'https://github.com/aws-samples/cdk-eks-karpenter.git',
pullRequestTemplateContents: [
'---',
'*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*',
],
publishToPypi: {
distName: PROJECT_NAME,
module: 'cdk_eks_karpenter',
},
dependabot: true,
dependabotOptions: {
scheduleInterval: DependabotScheduleInterval.MONTHLY,
},
});
const common_excludes = [
'cdk.out/',
'cdk.context.json',
'.env',
];
project.gitignore.exclude(...common_excludes);
project.npmignore.exclude(...common_excludes);
project.addTask('test:deploy', {
exec: 'npx cdk deploy -a "npx ts-node -P tsconfig.dev.json --prefer-ts-exts test/integ.karpenter.ts"',
});
project.addTask('test:destroy', {
exec: 'npx cdk destroy -a "npx ts-node -P tsconfig.dev.json --prefer-ts-exts test/integ.karpenter.ts"',
});
project.addTask('test:synth', {
exec: 'npx cdk synth -a "npx ts-node -P tsconfig.dev.json --prefer-ts-exts test/integ.karpenter.ts"',
});
project.github.actions.set('actions/download-artifact', 'actions/[email protected]');
project.github.actions.set('actions/upload-artifact', 'actions/[email protected]');
// https://github.com/actions/upload-artifact/issues/602
build_workflow = project.tryFindObjectFile('.github/workflows/build.yml');
build_workflow.patch(JsonPatch.add('/jobs/build/steps/5/with/include-hidden-files', true));
build_workflow.patch(JsonPatch.add('/jobs/build/steps/8/with/include-hidden-files', true));
release_workflow = project.tryFindObjectFile('.github/workflows/release.yml');
release_workflow.patch(JsonPatch.add('/jobs/release/steps/7/with/include-hidden-files', true));
project.synth();