forked from CloudSnorkel/cdk-github-runners
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.projenrc.js
127 lines (121 loc) · 3.62 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
126
127
const { awscdk } = require('projen');
const { Stability } = require('projen/lib/cdk/jsii-project');
const project = new awscdk.AwsCdkConstructLibrary({
author: 'Amir Szekely',
authorAddress: '[email protected]',
stability: Stability.EXPERIMENTAL,
cdkVersion: '2.50.0', // 2.21.1 for lambda url, 2.29.0 for Names.uniqueResourceName(), 2.50.0 for JsonPath.base64Encode
defaultReleaseBranch: 'main',
name: '@cloudsnorkel/cdk-github-runners',
repositoryUrl: 'https://github.com/CloudSnorkel/cdk-github-runners.git',
license: 'Apache-2.0',
description: 'CDK construct to create GitHub Actions self-hosted runners. A webhook listens to events and creates ephemeral runners on the fly.',
// packageName: undefined, /* The "name" in package.json. */
devDeps: [
'esbuild', // for faster NodejsFunction bundling
'@octokit/core',
'@octokit/auth-app',
'@octokit/request-error',
'@octokit/rest',
'aws-sdk',
'@aws-sdk/types',
'@types/aws-lambda',
'semver',
'@types/semver',
// for setup ui
'@sveltejs/vite-plugin-svelte@^1.0.1',
'@tsconfig/svelte@^3.0.0',
'bootstrap@^5.2.0',
'sass@^1.54.0',
'svelte@^3.49.0',
'svelte-check@^2.8.0',
'svelte-preprocess@^4.10.7',
//'tslib@^2.4.0',
//'typescript@^4.6.4',
'vite@^3.0.0',
'vite-plugin-singlefile@^0.11.0',
],
deps: [
],
releaseToNpm: true,
publishToPypi: {
distName: 'cloudsnorkel.cdk-github-runners',
module: 'cloudsnorkel.cdk_github_runners',
},
publishToGo: {
moduleName: 'github.com/CloudSnorkel/cdk-github-runners-go',
},
publishToMaven: {
mavenGroupId: 'com.cloudsnorkel',
mavenArtifactId: 'cdk.github.runners',
javaPackage: 'com.cloudsnorkel.cdk.github.runners',
mavenEndpoint: 'https://s01.oss.sonatype.org',
},
publishToNuget: {
dotNetNamespace: 'CloudSnorkel',
packageId: 'CloudSnorkel.Cdk.Github.Runners',
},
keywords: [
'aws',
'aws-cdk',
'aws-cdk-construct',
'cdk',
'codebuild',
'lambda',
'fargate',
'github',
'github-actions',
'self-hosted',
],
gitignore: [
'cdk.out',
'cdk.context.json',
'/.idea',
'status.json',
],
sampleCode: false,
compat: true,
autoApproveOptions: {
allowedUsernames: ['kichik', 'CloudSnorkelBot'],
},
depsUpgradeOptions: {
workflowOptions: {
labels: ['auto-approve'],
schedule: {
cron: ['0 0 * * 1'],
},
},
},
githubOptions: {
pullRequestLintOptions: {
semanticTitleOptions: {
types: [
'feat',
'fix',
'chore',
'docs',
],
},
},
},
pullRequestTemplate: false,
});
// disable automatic releases, but keep workflow that can be triggered manually
const releaseWorkflow = project.github.tryFindWorkflow('release');
releaseWorkflow.file.addDeletionOverride('on.push');
// bundle docker images
project.bundler.bundleTask.exec('cp -r src/providers/docker-images assets');
// set proper line endings
project.gitattributes.addAttributes('*.js', 'eol=lf');
project.gitattributes.addAttributes('*.json', 'eol=lf');
project.gitattributes.addAttributes('*.sh', 'eol=lf');
project.gitattributes.addAttributes('*.yml', 'eol=lf');
project.gitattributes.addAttributes('*.html', 'eol=lf');
project.gitattributes.addAttributes('*.svelte', 'eol=lf');
project.gitattributes.addAttributes('Dockerfile', 'eol=lf');
// setup ui
project.gitignore.addPatterns('/setup/dist');
project.addPackageIgnore('/setup');
project.bundler.bundleTask.exec('vite build setup');
project.bundler.bundleTask.exec('cp -r setup/dist/index.html assets/lambdas/setup.lambda/index.html');
project.synth();