@cloudsnorkel/cdk-github-runners 0.1.0 → 0.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.
- package/.gitattributes +6 -1
- package/.jsii +1663 -596
- package/API.md +1105 -107
- package/README.md +63 -48
- package/SETUP_GITHUB.md +56 -19
- package/demo-thumbnail.jpg +0 -0
- package/lib/index.d.ts +3 -2
- package/lib/index.js +7 -1
- package/lib/lambdas/build-image/index.js +121 -0
- package/lib/lambdas/delete-runner/index.js +29 -15
- package/lib/lambdas/setup/index.js +9103 -0
- package/lib/lambdas/status/index.js +33 -14
- package/lib/lambdas/token-retriever/index.js +20 -10
- package/lib/lambdas/update-lambda/index.js +55 -0
- package/lib/lambdas/webhook-handler/index.js +21 -8
- package/lib/providers/codebuild.d.ts +32 -3
- package/lib/providers/codebuild.js +58 -13
- package/lib/providers/common.d.ts +87 -7
- package/lib/providers/common.js +64 -4
- package/lib/providers/docker-images/codebuild/linux-arm64/Dockerfile +59 -0
- package/lib/providers/docker-images/codebuild/{Dockerfile → linux-x64/Dockerfile} +10 -5
- package/lib/providers/docker-images/fargate/linux-arm64/Dockerfile +41 -0
- package/lib/providers/docker-images/fargate/{runner.sh → linux-arm64/runner.sh} +0 -0
- package/lib/providers/docker-images/fargate/{Dockerfile → linux-x64/Dockerfile} +10 -5
- package/lib/providers/docker-images/fargate/linux-x64/runner.sh +5 -0
- package/lib/providers/docker-images/lambda/linux-arm64/Dockerfile +32 -0
- package/lib/providers/docker-images/lambda/{runner.js → linux-arm64/runner.js} +0 -0
- package/lib/providers/docker-images/lambda/{runner.sh → linux-arm64/runner.sh} +0 -0
- package/lib/providers/docker-images/lambda/linux-x64/Dockerfile +31 -0
- package/lib/providers/docker-images/lambda/linux-x64/runner.js +29 -0
- package/lib/providers/docker-images/lambda/linux-x64/runner.sh +12 -0
- package/lib/providers/fargate.d.ts +46 -2
- package/lib/providers/fargate.js +65 -10
- package/lib/providers/image-builders/codebuild.d.ts +170 -0
- package/lib/providers/image-builders/codebuild.js +340 -0
- package/lib/providers/image-builders/static.d.ts +29 -0
- package/lib/providers/image-builders/static.js +58 -0
- package/lib/providers/lambda.d.ts +27 -2
- package/lib/providers/lambda.js +88 -9
- package/lib/runner.d.ts +5 -16
- package/lib/runner.js +38 -26
- package/lib/secrets.d.ts +4 -1
- package/lib/secrets.js +12 -2
- package/lib/utils.d.ts +2 -2
- package/lib/utils.js +14 -3
- package/lib/webhook.d.ts +0 -1
- package/lib/webhook.js +2 -1
- package/package.json +12 -10
- package/changelog.md +0 -11
- package/lib/index.d.ts.map +0 -1
- package/lib/providers/codebuild.d.ts.map +0 -1
- package/lib/providers/common.d.ts.map +0 -1
- package/lib/providers/docker-images/lambda/Dockerfile +0 -27
- package/lib/providers/fargate.d.ts.map +0 -1
- package/lib/providers/lambda.d.ts.map +0 -1
- package/lib/runner.d.ts.map +0 -1
- package/lib/secrets.d.ts.map +0 -1
- package/lib/utils.d.ts.map +0 -1
- package/lib/webhook.d.ts.map +0 -1
- package/releasetag.txt +0 -1
- package/version.txt +0 -1
package/API.md
CHANGED
|
@@ -2,6 +2,253 @@
|
|
|
2
2
|
|
|
3
3
|
## Constructs <a name="Constructs" id="Constructs"></a>
|
|
4
4
|
|
|
5
|
+
### CodeBuildImageBuilder <a name="CodeBuildImageBuilder" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder"></a>
|
|
6
|
+
|
|
7
|
+
- *Implements:* <a href="#@cloudsnorkel/cdk-github-runners.IImageBuilder">IImageBuilder</a>
|
|
8
|
+
|
|
9
|
+
An image builder that uses CodeBuild to build Docker images pre-baked with all the GitHub Actions runner requirements.
|
|
10
|
+
|
|
11
|
+
Builders can be used with runner providers.
|
|
12
|
+
|
|
13
|
+
Each builder re-runs automatically at a set interval to make sure the images contain the latest versions of everything.
|
|
14
|
+
|
|
15
|
+
You can create an instance of this construct to customize the image used to spin-up runners. Each provider has its own requirements for what an image should do. That's why they each provide their own Dockerfile.
|
|
16
|
+
|
|
17
|
+
For example, to set a specific runner version, rebuild the image every 2 weeks, and add a few packages for the Fargate provider, use:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
const builder = new CodeBuildImageBuilder(this, 'Builder', {
|
|
21
|
+
dockerfilePath: FargateProvider.LINUX_X64_DOCKERFILE_PATH,
|
|
22
|
+
runnerVersion: RunnerVersion.specific('2.293.0'),
|
|
23
|
+
rebuildInterval: Duration.days(14),
|
|
24
|
+
});
|
|
25
|
+
builder.setBuildArg('EXTRA_PACKAGES', 'nginx xz-utils');
|
|
26
|
+
new FargateProvider(this, 'Fargate provider', {
|
|
27
|
+
label: 'customized-fargate',
|
|
28
|
+
imageBuilder: builder,
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
#### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.Initializer"></a>
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
import { CodeBuildImageBuilder } from '@cloudsnorkel/cdk-github-runners'
|
|
36
|
+
|
|
37
|
+
new CodeBuildImageBuilder(scope: Construct, id: string, props: CodeBuildImageBuilderProps)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
| **Name** | **Type** | **Description** |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
|
|
43
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
|
|
44
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.Initializer.parameter.props">props</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps">CodeBuildImageBuilderProps</a></code> | *No description.* |
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
##### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.Initializer.parameter.scope"></a>
|
|
49
|
+
|
|
50
|
+
- *Type:* constructs.Construct
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
##### `id`<sup>Required</sup> <a name="id" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.Initializer.parameter.id"></a>
|
|
55
|
+
|
|
56
|
+
- *Type:* string
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
##### `props`<sup>Required</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.Initializer.parameter.props"></a>
|
|
61
|
+
|
|
62
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps">CodeBuildImageBuilderProps</a>
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
67
|
+
|
|
68
|
+
| **Name** | **Description** |
|
|
69
|
+
| --- | --- |
|
|
70
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
71
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addFiles">addFiles</a></code> | Uploads a folder to the build server at a given folder name. |
|
|
72
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addPolicyStatement">addPolicyStatement</a></code> | Add a policy statement to the builder to access resources required to the image build. |
|
|
73
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addPostBuildCommand">addPostBuildCommand</a></code> | Adds a command that runs after `docker build` and `docker push`. |
|
|
74
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addPreBuildCommand">addPreBuildCommand</a></code> | Adds a command that runs before `docker build`. |
|
|
75
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.bind">bind</a></code> | Called by IRunnerProvider to finalize settings and create the image builder. |
|
|
76
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.setBuildArg">setBuildArg</a></code> | Adds a build argument for Docker. |
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
##### `toString` <a name="toString" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.toString"></a>
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
public toString(): string
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Returns a string representation of this construct.
|
|
87
|
+
|
|
88
|
+
##### `addFiles` <a name="addFiles" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addFiles"></a>
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
public addFiles(sourcePath: string, destName: string): void
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Uploads a folder to the build server at a given folder name.
|
|
95
|
+
|
|
96
|
+
###### `sourcePath`<sup>Required</sup> <a name="sourcePath" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addFiles.parameter.sourcePath"></a>
|
|
97
|
+
|
|
98
|
+
- *Type:* string
|
|
99
|
+
|
|
100
|
+
path to source directory.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
###### `destName`<sup>Required</sup> <a name="destName" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addFiles.parameter.destName"></a>
|
|
105
|
+
|
|
106
|
+
- *Type:* string
|
|
107
|
+
|
|
108
|
+
name of destination folder.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
##### `addPolicyStatement` <a name="addPolicyStatement" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addPolicyStatement"></a>
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
public addPolicyStatement(statement: PolicyStatement): void
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Add a policy statement to the builder to access resources required to the image build.
|
|
119
|
+
|
|
120
|
+
###### `statement`<sup>Required</sup> <a name="statement" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addPolicyStatement.parameter.statement"></a>
|
|
121
|
+
|
|
122
|
+
- *Type:* aws-cdk-lib.aws_iam.PolicyStatement
|
|
123
|
+
|
|
124
|
+
IAM policy statement.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
##### `addPostBuildCommand` <a name="addPostBuildCommand" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addPostBuildCommand"></a>
|
|
129
|
+
|
|
130
|
+
```typescript
|
|
131
|
+
public addPostBuildCommand(command: string): void
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Adds a command that runs after `docker build` and `docker push`.
|
|
135
|
+
|
|
136
|
+
###### `command`<sup>Required</sup> <a name="command" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addPostBuildCommand.parameter.command"></a>
|
|
137
|
+
|
|
138
|
+
- *Type:* string
|
|
139
|
+
|
|
140
|
+
command to add.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
##### `addPreBuildCommand` <a name="addPreBuildCommand" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addPreBuildCommand"></a>
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
public addPreBuildCommand(command: string): void
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Adds a command that runs before `docker build`.
|
|
151
|
+
|
|
152
|
+
###### `command`<sup>Required</sup> <a name="command" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addPreBuildCommand.parameter.command"></a>
|
|
153
|
+
|
|
154
|
+
- *Type:* string
|
|
155
|
+
|
|
156
|
+
command to add.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
##### `bind` <a name="bind" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.bind"></a>
|
|
161
|
+
|
|
162
|
+
```typescript
|
|
163
|
+
public bind(): RunnerImage
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Called by IRunnerProvider to finalize settings and create the image builder.
|
|
167
|
+
|
|
168
|
+
##### `setBuildArg` <a name="setBuildArg" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.setBuildArg"></a>
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
public setBuildArg(name: string, value: string): void
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Adds a build argument for Docker.
|
|
175
|
+
|
|
176
|
+
See the documentation for the Dockerfile you're using for a list of supported build arguments.
|
|
177
|
+
|
|
178
|
+
###### `name`<sup>Required</sup> <a name="name" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.setBuildArg.parameter.name"></a>
|
|
179
|
+
|
|
180
|
+
- *Type:* string
|
|
181
|
+
|
|
182
|
+
build argument name.
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
###### `value`<sup>Required</sup> <a name="value" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.setBuildArg.parameter.value"></a>
|
|
187
|
+
|
|
188
|
+
- *Type:* string
|
|
189
|
+
|
|
190
|
+
build argument value.
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
195
|
+
|
|
196
|
+
| **Name** | **Description** |
|
|
197
|
+
| --- | --- |
|
|
198
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
##### ~~`isConstruct`~~ <a name="isConstruct" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.isConstruct"></a>
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
import { CodeBuildImageBuilder } from '@cloudsnorkel/cdk-github-runners'
|
|
206
|
+
|
|
207
|
+
CodeBuildImageBuilder.isConstruct(x: any)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Checks if `x` is a construct.
|
|
211
|
+
|
|
212
|
+
###### `x`<sup>Required</sup> <a name="x" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.isConstruct.parameter.x"></a>
|
|
213
|
+
|
|
214
|
+
- *Type:* any
|
|
215
|
+
|
|
216
|
+
Any object.
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
221
|
+
|
|
222
|
+
| **Name** | **Type** | **Description** |
|
|
223
|
+
| --- | --- | --- |
|
|
224
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
225
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.property.props">props</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps">CodeBuildImageBuilderProps</a></code> | *No description.* |
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
##### `node`<sup>Required</sup> <a name="node" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.property.node"></a>
|
|
230
|
+
|
|
231
|
+
```typescript
|
|
232
|
+
public readonly node: Node;
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
- *Type:* constructs.Node
|
|
236
|
+
|
|
237
|
+
The tree node.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
##### `props`<sup>Required</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.property.props"></a>
|
|
242
|
+
|
|
243
|
+
```typescript
|
|
244
|
+
public readonly props: CodeBuildImageBuilderProps;
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps">CodeBuildImageBuilderProps</a>
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
|
|
5
252
|
### CodeBuildRunner <a name="CodeBuildRunner" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunner"></a>
|
|
6
253
|
|
|
7
254
|
- *Implements:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>
|
|
@@ -205,6 +452,58 @@ VPC used for hosting the project.
|
|
|
205
452
|
|
|
206
453
|
---
|
|
207
454
|
|
|
455
|
+
#### Constants <a name="Constants" id="Constants"></a>
|
|
456
|
+
|
|
457
|
+
| **Name** | **Type** | **Description** |
|
|
458
|
+
| --- | --- | --- |
|
|
459
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.property.LINUX_ARM64_DOCKERFILE_PATH">LINUX_ARM64_DOCKERFILE_PATH</a></code> | <code>string</code> | Path to Dockerfile for Linux ARM64 with all the requirements for CodeBuild runner. |
|
|
460
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.property.LINUX_X64_DOCKERFILE_PATH">LINUX_X64_DOCKERFILE_PATH</a></code> | <code>string</code> | Path to Dockerfile for Linux x64 with all the requirements for CodeBuild runner. |
|
|
461
|
+
|
|
462
|
+
---
|
|
463
|
+
|
|
464
|
+
##### `LINUX_ARM64_DOCKERFILE_PATH`<sup>Required</sup> <a name="LINUX_ARM64_DOCKERFILE_PATH" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunner.property.LINUX_ARM64_DOCKERFILE_PATH"></a>
|
|
465
|
+
|
|
466
|
+
```typescript
|
|
467
|
+
public readonly LINUX_ARM64_DOCKERFILE_PATH: string;
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
- *Type:* string
|
|
471
|
+
|
|
472
|
+
Path to Dockerfile for Linux ARM64 with all the requirements for CodeBuild runner.
|
|
473
|
+
|
|
474
|
+
Use this Dockerfile unless you need to customize it further than allowed by hooks.
|
|
475
|
+
|
|
476
|
+
Available build arguments that can be set in the image builder:
|
|
477
|
+
* `BASE_IMAGE` sets the `FROM` line. This should be an Ubuntu compatible image.
|
|
478
|
+
* `EXTRA_PACKAGES` can be used to install additional packages.
|
|
479
|
+
* `DOCKER_CHANNEL` overrides the channel from which Docker will be downloaded. Defaults to `"stsable"`.
|
|
480
|
+
* `DIND_COMMIT` overrides the commit where dind is found.
|
|
481
|
+
* `DOCKER_VERSION` overrides the installed Docker version.
|
|
482
|
+
* `DOCKER_COMPOSE_VERSION` overrides the installed docker-compose version.
|
|
483
|
+
|
|
484
|
+
---
|
|
485
|
+
|
|
486
|
+
##### `LINUX_X64_DOCKERFILE_PATH`<sup>Required</sup> <a name="LINUX_X64_DOCKERFILE_PATH" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunner.property.LINUX_X64_DOCKERFILE_PATH"></a>
|
|
487
|
+
|
|
488
|
+
```typescript
|
|
489
|
+
public readonly LINUX_X64_DOCKERFILE_PATH: string;
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
- *Type:* string
|
|
493
|
+
|
|
494
|
+
Path to Dockerfile for Linux x64 with all the requirements for CodeBuild runner.
|
|
495
|
+
|
|
496
|
+
Use this Dockerfile unless you need to customize it further than allowed by hooks.
|
|
497
|
+
|
|
498
|
+
Available build arguments that can be set in the image builder:
|
|
499
|
+
* `BASE_IMAGE` sets the `FROM` line. This should be an Ubuntu compatible image.
|
|
500
|
+
* `EXTRA_PACKAGES` can be used to install additional packages.
|
|
501
|
+
* `DOCKER_CHANNEL` overrides the channel from which Docker will be downloaded. Defaults to `"stsable"`.
|
|
502
|
+
* `DIND_COMMIT` overrides the commit where dind is found.
|
|
503
|
+
* `DOCKER_VERSION` overrides the installed Docker version.
|
|
504
|
+
* `DOCKER_COMPOSE_VERSION` overrides the installed docker-compose version.
|
|
505
|
+
|
|
506
|
+
---
|
|
208
507
|
|
|
209
508
|
### FargateRunner <a name="FargateRunner" id="@cloudsnorkel/cdk-github-runners.FargateRunner"></a>
|
|
210
509
|
|
|
@@ -322,6 +621,7 @@ Any object.
|
|
|
322
621
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.container">container</a></code> | <code>aws-cdk-lib.aws_ecs.ContainerDefinition</code> | Container definition hosting the runner. |
|
|
323
622
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.grantPrincipal">grantPrincipal</a></code> | <code>aws-cdk-lib.aws_iam.IPrincipal</code> | Grant principal used to add permissions to the runner role. |
|
|
324
623
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.label">label</a></code> | <code>string</code> | Label associated with this provider. |
|
|
624
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.spot">spot</a></code> | <code>boolean</code> | Use spot pricing for Fargate tasks. |
|
|
325
625
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.task">task</a></code> | <code>aws-cdk-lib.aws_ecs.FargateTaskDefinition</code> | Fargate task hosting the runner. |
|
|
326
626
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup</code> | Security group attached to the task. |
|
|
327
627
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | VPC used for hosting the task. |
|
|
@@ -412,6 +712,18 @@ Label associated with this provider.
|
|
|
412
712
|
|
|
413
713
|
---
|
|
414
714
|
|
|
715
|
+
##### `spot`<sup>Required</sup> <a name="spot" id="@cloudsnorkel/cdk-github-runners.FargateRunner.property.spot"></a>
|
|
716
|
+
|
|
717
|
+
```typescript
|
|
718
|
+
public readonly spot: boolean;
|
|
719
|
+
```
|
|
720
|
+
|
|
721
|
+
- *Type:* boolean
|
|
722
|
+
|
|
723
|
+
Use spot pricing for Fargate tasks.
|
|
724
|
+
|
|
725
|
+
---
|
|
726
|
+
|
|
415
727
|
##### `task`<sup>Required</sup> <a name="task" id="@cloudsnorkel/cdk-github-runners.FargateRunner.property.task"></a>
|
|
416
728
|
|
|
417
729
|
```typescript
|
|
@@ -448,6 +760,50 @@ VPC used for hosting the task.
|
|
|
448
760
|
|
|
449
761
|
---
|
|
450
762
|
|
|
763
|
+
#### Constants <a name="Constants" id="Constants"></a>
|
|
764
|
+
|
|
765
|
+
| **Name** | **Type** | **Description** |
|
|
766
|
+
| --- | --- | --- |
|
|
767
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.LINUX_ARM64_DOCKERFILE_PATH">LINUX_ARM64_DOCKERFILE_PATH</a></code> | <code>string</code> | Path to Dockerfile for Linux ARM64 with all the requirement for Fargate runner. |
|
|
768
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.LINUX_X64_DOCKERFILE_PATH">LINUX_X64_DOCKERFILE_PATH</a></code> | <code>string</code> | Path to Dockerfile for Linux x64 with all the requirement for Fargate runner. |
|
|
769
|
+
|
|
770
|
+
---
|
|
771
|
+
|
|
772
|
+
##### `LINUX_ARM64_DOCKERFILE_PATH`<sup>Required</sup> <a name="LINUX_ARM64_DOCKERFILE_PATH" id="@cloudsnorkel/cdk-github-runners.FargateRunner.property.LINUX_ARM64_DOCKERFILE_PATH"></a>
|
|
773
|
+
|
|
774
|
+
```typescript
|
|
775
|
+
public readonly LINUX_ARM64_DOCKERFILE_PATH: string;
|
|
776
|
+
```
|
|
777
|
+
|
|
778
|
+
- *Type:* string
|
|
779
|
+
|
|
780
|
+
Path to Dockerfile for Linux ARM64 with all the requirement for Fargate runner.
|
|
781
|
+
|
|
782
|
+
Use this Dockerfile unless you need to customize it further than allowed by hooks.
|
|
783
|
+
|
|
784
|
+
Available build arguments that can be set in the image builder:
|
|
785
|
+
* `BASE_IMAGE` sets the `FROM` line. This should be an Ubuntu compatible image.
|
|
786
|
+
* `EXTRA_PACKAGES` can be used to install additional packages.
|
|
787
|
+
|
|
788
|
+
---
|
|
789
|
+
|
|
790
|
+
##### `LINUX_X64_DOCKERFILE_PATH`<sup>Required</sup> <a name="LINUX_X64_DOCKERFILE_PATH" id="@cloudsnorkel/cdk-github-runners.FargateRunner.property.LINUX_X64_DOCKERFILE_PATH"></a>
|
|
791
|
+
|
|
792
|
+
```typescript
|
|
793
|
+
public readonly LINUX_X64_DOCKERFILE_PATH: string;
|
|
794
|
+
```
|
|
795
|
+
|
|
796
|
+
- *Type:* string
|
|
797
|
+
|
|
798
|
+
Path to Dockerfile for Linux x64 with all the requirement for Fargate runner.
|
|
799
|
+
|
|
800
|
+
Use this Dockerfile unless you need to customize it further than allowed by hooks.
|
|
801
|
+
|
|
802
|
+
Available build arguments that can be set in the image builder:
|
|
803
|
+
* `BASE_IMAGE` sets the `FROM` line. This should be an Ubuntu compatible image.
|
|
804
|
+
* `EXTRA_PACKAGES` can be used to install additional packages.
|
|
805
|
+
|
|
806
|
+
---
|
|
451
807
|
|
|
452
808
|
### GitHubRunners <a name="GitHubRunners" id="@cloudsnorkel/cdk-github-runners.GitHubRunners"></a>
|
|
453
809
|
|
|
@@ -488,7 +844,6 @@ new GitHubRunners(
|
|
|
488
844
|
'runners',
|
|
489
845
|
{
|
|
490
846
|
providers: [myProvider],
|
|
491
|
-
defaultProviderLabel: 'my-codebuild',
|
|
492
847
|
}
|
|
493
848
|
);
|
|
494
849
|
```
|
|
@@ -498,7 +853,7 @@ new GitHubRunners(
|
|
|
498
853
|
```typescript
|
|
499
854
|
import { GitHubRunners } from '@cloudsnorkel/cdk-github-runners'
|
|
500
855
|
|
|
501
|
-
new GitHubRunners(scope: Construct, id: string, props
|
|
856
|
+
new GitHubRunners(scope: Construct, id: string, props?: GitHubRunnersProps)
|
|
502
857
|
```
|
|
503
858
|
|
|
504
859
|
| **Name** | **Type** | **Description** |
|
|
@@ -521,7 +876,7 @@ new GitHubRunners(scope: Construct, id: string, props: GitHubRunnersProps)
|
|
|
521
876
|
|
|
522
877
|
---
|
|
523
878
|
|
|
524
|
-
##### `props`<sup>
|
|
879
|
+
##### `props`<sup>Optional</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.Initializer.parameter.props"></a>
|
|
525
880
|
|
|
526
881
|
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps">GitHubRunnersProps</a>
|
|
527
882
|
|
|
@@ -574,8 +929,6 @@ Any object.
|
|
|
574
929
|
| **Name** | **Type** | **Description** |
|
|
575
930
|
| --- | --- | --- |
|
|
576
931
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
577
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.property.defaultProvider">defaultProvider</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a></code> | Default provider as set by {@link GitHubRunnersProps.defaultProviderLabel}. |
|
|
578
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.property.props">props</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps">GitHubRunnersProps</a></code> | *No description.* |
|
|
579
932
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.property.providers">providers</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>[]</code> | Configured runner providers. |
|
|
580
933
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.property.secrets">secrets</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Secrets">Secrets</a></code> | Secrets for GitHub communication including webhook secret and runner authentication. |
|
|
581
934
|
|
|
@@ -593,28 +946,6 @@ The tree node.
|
|
|
593
946
|
|
|
594
947
|
---
|
|
595
948
|
|
|
596
|
-
##### `defaultProvider`<sup>Required</sup> <a name="defaultProvider" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.property.defaultProvider"></a>
|
|
597
|
-
|
|
598
|
-
```typescript
|
|
599
|
-
public readonly defaultProvider: IRunnerProvider;
|
|
600
|
-
```
|
|
601
|
-
|
|
602
|
-
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>
|
|
603
|
-
|
|
604
|
-
Default provider as set by {@link GitHubRunnersProps.defaultProviderLabel}.
|
|
605
|
-
|
|
606
|
-
---
|
|
607
|
-
|
|
608
|
-
##### `props`<sup>Required</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.property.props"></a>
|
|
609
|
-
|
|
610
|
-
```typescript
|
|
611
|
-
public readonly props: GitHubRunnersProps;
|
|
612
|
-
```
|
|
613
|
-
|
|
614
|
-
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps">GitHubRunnersProps</a>
|
|
615
|
-
|
|
616
|
-
---
|
|
617
|
-
|
|
618
949
|
##### `providers`<sup>Required</sup> <a name="providers" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.property.providers"></a>
|
|
619
950
|
|
|
620
951
|
```typescript
|
|
@@ -843,20 +1174,64 @@ VPC used for hosting the function.
|
|
|
843
1174
|
|
|
844
1175
|
---
|
|
845
1176
|
|
|
1177
|
+
#### Constants <a name="Constants" id="Constants"></a>
|
|
846
1178
|
|
|
847
|
-
|
|
1179
|
+
| **Name** | **Type** | **Description** |
|
|
1180
|
+
| --- | --- | --- |
|
|
1181
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.property.LINUX_ARM64_DOCKERFILE_PATH">LINUX_ARM64_DOCKERFILE_PATH</a></code> | <code>string</code> | Path to Dockerfile for Linux ARM64 with all the requirement for Lambda runner. |
|
|
1182
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.property.LINUX_X64_DOCKERFILE_PATH">LINUX_X64_DOCKERFILE_PATH</a></code> | <code>string</code> | Path to Dockerfile for Linux x64 with all the requirement for Lambda runner. |
|
|
848
1183
|
|
|
849
|
-
|
|
1184
|
+
---
|
|
850
1185
|
|
|
851
|
-
|
|
1186
|
+
##### `LINUX_ARM64_DOCKERFILE_PATH`<sup>Required</sup> <a name="LINUX_ARM64_DOCKERFILE_PATH" id="@cloudsnorkel/cdk-github-runners.LambdaRunner.property.LINUX_ARM64_DOCKERFILE_PATH"></a>
|
|
852
1187
|
|
|
853
1188
|
```typescript
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
new Secrets(scope: Construct, id: string)
|
|
1189
|
+
public readonly LINUX_ARM64_DOCKERFILE_PATH: string;
|
|
857
1190
|
```
|
|
858
1191
|
|
|
859
|
-
|
|
1192
|
+
- *Type:* string
|
|
1193
|
+
|
|
1194
|
+
Path to Dockerfile for Linux ARM64 with all the requirement for Lambda runner.
|
|
1195
|
+
|
|
1196
|
+
Use this Dockerfile unless you need to customize it further than allowed by hooks.
|
|
1197
|
+
|
|
1198
|
+
Available build arguments that can be set in the image builder:
|
|
1199
|
+
* `BASE_IMAGE` sets the `FROM` line. This should be similar to public.ecr.aws/lambda/nodejs:14.
|
|
1200
|
+
* `EXTRA_PACKAGES` can be used to install additional packages.
|
|
1201
|
+
|
|
1202
|
+
---
|
|
1203
|
+
|
|
1204
|
+
##### `LINUX_X64_DOCKERFILE_PATH`<sup>Required</sup> <a name="LINUX_X64_DOCKERFILE_PATH" id="@cloudsnorkel/cdk-github-runners.LambdaRunner.property.LINUX_X64_DOCKERFILE_PATH"></a>
|
|
1205
|
+
|
|
1206
|
+
```typescript
|
|
1207
|
+
public readonly LINUX_X64_DOCKERFILE_PATH: string;
|
|
1208
|
+
```
|
|
1209
|
+
|
|
1210
|
+
- *Type:* string
|
|
1211
|
+
|
|
1212
|
+
Path to Dockerfile for Linux x64 with all the requirement for Lambda runner.
|
|
1213
|
+
|
|
1214
|
+
Use this Dockerfile unless you need to customize it further than allowed by hooks.
|
|
1215
|
+
|
|
1216
|
+
Available build arguments that can be set in the image builder:
|
|
1217
|
+
* `BASE_IMAGE` sets the `FROM` line. This should be similar to public.ecr.aws/lambda/nodejs:14.
|
|
1218
|
+
* `EXTRA_PACKAGES` can be used to install additional packages.
|
|
1219
|
+
|
|
1220
|
+
---
|
|
1221
|
+
|
|
1222
|
+
### Secrets <a name="Secrets" id="@cloudsnorkel/cdk-github-runners.Secrets"></a>
|
|
1223
|
+
|
|
1224
|
+
Secrets required for GitHub runners operation.
|
|
1225
|
+
|
|
1226
|
+
#### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.Secrets.Initializer"></a>
|
|
1227
|
+
|
|
1228
|
+
```typescript
|
|
1229
|
+
import { Secrets } from '@cloudsnorkel/cdk-github-runners'
|
|
1230
|
+
|
|
1231
|
+
new Secrets(scope: Construct, id: string)
|
|
1232
|
+
```
|
|
1233
|
+
|
|
1234
|
+
| **Name** | **Type** | **Description** |
|
|
860
1235
|
| --- | --- | --- |
|
|
861
1236
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.Secrets.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
|
|
862
1237
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.Secrets.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
|
|
@@ -924,6 +1299,7 @@ Any object.
|
|
|
924
1299
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.Secrets.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
925
1300
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.Secrets.property.github">github</a></code> | <code>aws-cdk-lib.aws_secretsmanager.Secret</code> | Authentication secret for GitHub containing either app details or personal authentication token. |
|
|
926
1301
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.Secrets.property.githubPrivateKey">githubPrivateKey</a></code> | <code>aws-cdk-lib.aws_secretsmanager.Secret</code> | GitHub app private key. Not needed when using personal authentication tokens. |
|
|
1302
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.Secrets.property.setup">setup</a></code> | <code>aws-cdk-lib.aws_secretsmanager.Secret</code> | Setup secret used to authenticate user for our setup wizard. |
|
|
927
1303
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.Secrets.property.webhook">webhook</a></code> | <code>aws-cdk-lib.aws_secretsmanager.Secret</code> | Webhook secret used to confirm events are coming from GitHub and nowhere else. |
|
|
928
1304
|
|
|
929
1305
|
---
|
|
@@ -971,6 +1347,20 @@ This secret is meant to be edited by the user after being created. It is separat
|
|
|
971
1347
|
|
|
972
1348
|
---
|
|
973
1349
|
|
|
1350
|
+
##### `setup`<sup>Required</sup> <a name="setup" id="@cloudsnorkel/cdk-github-runners.Secrets.property.setup"></a>
|
|
1351
|
+
|
|
1352
|
+
```typescript
|
|
1353
|
+
public readonly setup: Secret;
|
|
1354
|
+
```
|
|
1355
|
+
|
|
1356
|
+
- *Type:* aws-cdk-lib.aws_secretsmanager.Secret
|
|
1357
|
+
|
|
1358
|
+
Setup secret used to authenticate user for our setup wizard.
|
|
1359
|
+
|
|
1360
|
+
Should be empty after setup has been completed.
|
|
1361
|
+
|
|
1362
|
+
---
|
|
1363
|
+
|
|
974
1364
|
##### `webhook`<sup>Required</sup> <a name="webhook" id="@cloudsnorkel/cdk-github-runners.Secrets.property.webhook"></a>
|
|
975
1365
|
|
|
976
1366
|
```typescript
|
|
@@ -986,6 +1376,211 @@ Webhook secret used to confirm events are coming from GitHub and nowhere else.
|
|
|
986
1376
|
|
|
987
1377
|
## Structs <a name="Structs" id="Structs"></a>
|
|
988
1378
|
|
|
1379
|
+
### CodeBuildImageBuilderProps <a name="CodeBuildImageBuilderProps" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps"></a>
|
|
1380
|
+
|
|
1381
|
+
Properties for CodeBuildImageBuilder construct.
|
|
1382
|
+
|
|
1383
|
+
#### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.Initializer"></a>
|
|
1384
|
+
|
|
1385
|
+
```typescript
|
|
1386
|
+
import { CodeBuildImageBuilderProps } from '@cloudsnorkel/cdk-github-runners'
|
|
1387
|
+
|
|
1388
|
+
const codeBuildImageBuilderProps: CodeBuildImageBuilderProps = { ... }
|
|
1389
|
+
```
|
|
1390
|
+
|
|
1391
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
1392
|
+
|
|
1393
|
+
| **Name** | **Type** | **Description** |
|
|
1394
|
+
| --- | --- | --- |
|
|
1395
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.dockerfilePath">dockerfilePath</a></code> | <code>string</code> | Path to Dockerfile to be built. |
|
|
1396
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.architecture">architecture</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a></code> | Image architecture. |
|
|
1397
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.computeType">computeType</a></code> | <code>aws-cdk-lib.aws_codebuild.ComputeType</code> | The type of compute to use for this build. |
|
|
1398
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.logRemovalPolicy">logRemovalPolicy</a></code> | <code>aws-cdk-lib.RemovalPolicy</code> | Removal policy for logs of image builds. |
|
|
1399
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.logRetention">logRetention</a></code> | <code>aws-cdk-lib.aws_logs.RetentionDays</code> | The number of days log events are kept in CloudWatch Logs. |
|
|
1400
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.os">os</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a></code> | Image OS. |
|
|
1401
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.rebuildInterval">rebuildInterval</a></code> | <code>aws-cdk-lib.Duration</code> | Schedule the image to be rebuilt every given interval. |
|
|
1402
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.runnerVersion">runnerVersion</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerVersion">RunnerVersion</a></code> | Version of GitHub Runners to install. |
|
|
1403
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup</code> | Security Group to assign to this instance. |
|
|
1404
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.subnetSelection">subnetSelection</a></code> | <code>aws-cdk-lib.aws_ec2.SubnetSelection</code> | Where to place the network interfaces within the VPC. |
|
|
1405
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.timeout">timeout</a></code> | <code>aws-cdk-lib.Duration</code> | The number of minutes after which AWS CodeBuild stops the build if it's not complete. |
|
|
1406
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | VPC to launch the runners in. |
|
|
1407
|
+
|
|
1408
|
+
---
|
|
1409
|
+
|
|
1410
|
+
##### `dockerfilePath`<sup>Required</sup> <a name="dockerfilePath" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.dockerfilePath"></a>
|
|
1411
|
+
|
|
1412
|
+
```typescript
|
|
1413
|
+
public readonly dockerfilePath: string;
|
|
1414
|
+
```
|
|
1415
|
+
|
|
1416
|
+
- *Type:* string
|
|
1417
|
+
|
|
1418
|
+
Path to Dockerfile to be built.
|
|
1419
|
+
|
|
1420
|
+
It can be a path to a Dockerfile, a folder containing a Dockerfile, or a zip file containing a Dockerfile.
|
|
1421
|
+
|
|
1422
|
+
---
|
|
1423
|
+
|
|
1424
|
+
##### `architecture`<sup>Optional</sup> <a name="architecture" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.architecture"></a>
|
|
1425
|
+
|
|
1426
|
+
```typescript
|
|
1427
|
+
public readonly architecture: Architecture;
|
|
1428
|
+
```
|
|
1429
|
+
|
|
1430
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a>
|
|
1431
|
+
- *Default:* Architecture.X86_64
|
|
1432
|
+
|
|
1433
|
+
Image architecture.
|
|
1434
|
+
|
|
1435
|
+
---
|
|
1436
|
+
|
|
1437
|
+
##### `computeType`<sup>Optional</sup> <a name="computeType" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.computeType"></a>
|
|
1438
|
+
|
|
1439
|
+
```typescript
|
|
1440
|
+
public readonly computeType: ComputeType;
|
|
1441
|
+
```
|
|
1442
|
+
|
|
1443
|
+
- *Type:* aws-cdk-lib.aws_codebuild.ComputeType
|
|
1444
|
+
- *Default:* {@link ComputeType#SMALL}
|
|
1445
|
+
|
|
1446
|
+
The type of compute to use for this build.
|
|
1447
|
+
|
|
1448
|
+
See the {@link ComputeType} enum for the possible values.
|
|
1449
|
+
|
|
1450
|
+
---
|
|
1451
|
+
|
|
1452
|
+
##### `logRemovalPolicy`<sup>Optional</sup> <a name="logRemovalPolicy" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.logRemovalPolicy"></a>
|
|
1453
|
+
|
|
1454
|
+
```typescript
|
|
1455
|
+
public readonly logRemovalPolicy: RemovalPolicy;
|
|
1456
|
+
```
|
|
1457
|
+
|
|
1458
|
+
- *Type:* aws-cdk-lib.RemovalPolicy
|
|
1459
|
+
- *Default:* RemovalPolicy.DESTROY
|
|
1460
|
+
|
|
1461
|
+
Removal policy for logs of image builds.
|
|
1462
|
+
|
|
1463
|
+
If deployment fails on the custom resource, try setting this to `RemovalPolicy.RETAIN`. This way the CodeBuild logs can still be viewed, and you can see why the build failed.
|
|
1464
|
+
|
|
1465
|
+
We try to not leave anything behind when removed. But sometimes a log staying behind is useful.
|
|
1466
|
+
|
|
1467
|
+
---
|
|
1468
|
+
|
|
1469
|
+
##### `logRetention`<sup>Optional</sup> <a name="logRetention" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.logRetention"></a>
|
|
1470
|
+
|
|
1471
|
+
```typescript
|
|
1472
|
+
public readonly logRetention: RetentionDays;
|
|
1473
|
+
```
|
|
1474
|
+
|
|
1475
|
+
- *Type:* aws-cdk-lib.aws_logs.RetentionDays
|
|
1476
|
+
- *Default:* logs.RetentionDays.ONE_MONTH
|
|
1477
|
+
|
|
1478
|
+
The number of days log events are kept in CloudWatch Logs.
|
|
1479
|
+
|
|
1480
|
+
When updating
|
|
1481
|
+
this property, unsetting it doesn't remove the log retention policy. To
|
|
1482
|
+
remove the retention policy, set the value to `INFINITE`.
|
|
1483
|
+
|
|
1484
|
+
---
|
|
1485
|
+
|
|
1486
|
+
##### `os`<sup>Optional</sup> <a name="os" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.os"></a>
|
|
1487
|
+
|
|
1488
|
+
```typescript
|
|
1489
|
+
public readonly os: Os;
|
|
1490
|
+
```
|
|
1491
|
+
|
|
1492
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a>
|
|
1493
|
+
- *Default:* OS.LINUX
|
|
1494
|
+
|
|
1495
|
+
Image OS.
|
|
1496
|
+
|
|
1497
|
+
---
|
|
1498
|
+
|
|
1499
|
+
##### `rebuildInterval`<sup>Optional</sup> <a name="rebuildInterval" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.rebuildInterval"></a>
|
|
1500
|
+
|
|
1501
|
+
```typescript
|
|
1502
|
+
public readonly rebuildInterval: Duration;
|
|
1503
|
+
```
|
|
1504
|
+
|
|
1505
|
+
- *Type:* aws-cdk-lib.Duration
|
|
1506
|
+
- *Default:* Duration.days(7)
|
|
1507
|
+
|
|
1508
|
+
Schedule the image to be rebuilt every given interval.
|
|
1509
|
+
|
|
1510
|
+
Useful for keeping the image up-do-date with the latest GitHub runner version and latest OS updates.
|
|
1511
|
+
|
|
1512
|
+
Set to zero to disable.
|
|
1513
|
+
|
|
1514
|
+
---
|
|
1515
|
+
|
|
1516
|
+
##### `runnerVersion`<sup>Optional</sup> <a name="runnerVersion" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.runnerVersion"></a>
|
|
1517
|
+
|
|
1518
|
+
```typescript
|
|
1519
|
+
public readonly runnerVersion: RunnerVersion;
|
|
1520
|
+
```
|
|
1521
|
+
|
|
1522
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerVersion">RunnerVersion</a>
|
|
1523
|
+
- *Default:* latest version available
|
|
1524
|
+
|
|
1525
|
+
Version of GitHub Runners to install.
|
|
1526
|
+
|
|
1527
|
+
---
|
|
1528
|
+
|
|
1529
|
+
##### `securityGroup`<sup>Optional</sup> <a name="securityGroup" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.securityGroup"></a>
|
|
1530
|
+
|
|
1531
|
+
```typescript
|
|
1532
|
+
public readonly securityGroup: ISecurityGroup;
|
|
1533
|
+
```
|
|
1534
|
+
|
|
1535
|
+
- *Type:* aws-cdk-lib.aws_ec2.ISecurityGroup
|
|
1536
|
+
- *Default:* public project with no security group
|
|
1537
|
+
|
|
1538
|
+
Security Group to assign to this instance.
|
|
1539
|
+
|
|
1540
|
+
---
|
|
1541
|
+
|
|
1542
|
+
##### `subnetSelection`<sup>Optional</sup> <a name="subnetSelection" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.subnetSelection"></a>
|
|
1543
|
+
|
|
1544
|
+
```typescript
|
|
1545
|
+
public readonly subnetSelection: SubnetSelection;
|
|
1546
|
+
```
|
|
1547
|
+
|
|
1548
|
+
- *Type:* aws-cdk-lib.aws_ec2.SubnetSelection
|
|
1549
|
+
- *Default:* no subnet
|
|
1550
|
+
|
|
1551
|
+
Where to place the network interfaces within the VPC.
|
|
1552
|
+
|
|
1553
|
+
---
|
|
1554
|
+
|
|
1555
|
+
##### `timeout`<sup>Optional</sup> <a name="timeout" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.timeout"></a>
|
|
1556
|
+
|
|
1557
|
+
```typescript
|
|
1558
|
+
public readonly timeout: Duration;
|
|
1559
|
+
```
|
|
1560
|
+
|
|
1561
|
+
- *Type:* aws-cdk-lib.Duration
|
|
1562
|
+
- *Default:* Duration.hours(1)
|
|
1563
|
+
|
|
1564
|
+
The number of minutes after which AWS CodeBuild stops the build if it's not complete.
|
|
1565
|
+
|
|
1566
|
+
For valid values, see the timeoutInMinutes field in the AWS
|
|
1567
|
+
CodeBuild User Guide.
|
|
1568
|
+
|
|
1569
|
+
---
|
|
1570
|
+
|
|
1571
|
+
##### `vpc`<sup>Optional</sup> <a name="vpc" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.vpc"></a>
|
|
1572
|
+
|
|
1573
|
+
```typescript
|
|
1574
|
+
public readonly vpc: IVpc;
|
|
1575
|
+
```
|
|
1576
|
+
|
|
1577
|
+
- *Type:* aws-cdk-lib.aws_ec2.IVpc
|
|
1578
|
+
- *Default:* no VPC
|
|
1579
|
+
|
|
1580
|
+
VPC to launch the runners in.
|
|
1581
|
+
|
|
1582
|
+
---
|
|
1583
|
+
|
|
989
1584
|
### CodeBuildRunnerProps <a name="CodeBuildRunnerProps" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProps"></a>
|
|
990
1585
|
|
|
991
1586
|
#### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProps.Initializer"></a>
|
|
@@ -1001,8 +1596,8 @@ const codeBuildRunnerProps: CodeBuildRunnerProps = { ... }
|
|
|
1001
1596
|
| **Name** | **Type** | **Description** |
|
|
1002
1597
|
| --- | --- | --- |
|
|
1003
1598
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProps.property.logRetention">logRetention</a></code> | <code>aws-cdk-lib.aws_logs.RetentionDays</code> | The number of days log events are kept in CloudWatch Logs. |
|
|
1004
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProps.property.runnerVersion">runnerVersion</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerVersion">RunnerVersion</a></code> | Version of GitHub Runners to install. |
|
|
1005
1599
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProps.property.computeType">computeType</a></code> | <code>aws-cdk-lib.aws_codebuild.ComputeType</code> | The type of compute to use for this build. |
|
|
1600
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProps.property.imageBuilder">imageBuilder</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.IImageBuilder">IImageBuilder</a></code> | Provider running an image to run inside CodeBuild with GitHub runner pre-configured. |
|
|
1006
1601
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProps.property.label">label</a></code> | <code>string</code> | GitHub Actions label used for this provider. |
|
|
1007
1602
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProps.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup</code> | Security Group to assign to this instance. |
|
|
1008
1603
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProps.property.subnetSelection">subnetSelection</a></code> | <code>aws-cdk-lib.aws_ec2.SubnetSelection</code> | Where to place the network interfaces within the VPC. |
|
|
@@ -1028,31 +1623,33 @@ remove the retention policy, set the value to `INFINITE`.
|
|
|
1028
1623
|
|
|
1029
1624
|
---
|
|
1030
1625
|
|
|
1031
|
-
##### `
|
|
1626
|
+
##### `computeType`<sup>Optional</sup> <a name="computeType" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProps.property.computeType"></a>
|
|
1032
1627
|
|
|
1033
1628
|
```typescript
|
|
1034
|
-
public readonly
|
|
1629
|
+
public readonly computeType: ComputeType;
|
|
1035
1630
|
```
|
|
1036
1631
|
|
|
1037
|
-
- *Type:*
|
|
1038
|
-
- *Default:*
|
|
1632
|
+
- *Type:* aws-cdk-lib.aws_codebuild.ComputeType
|
|
1633
|
+
- *Default:* {@link ComputeType#SMALL}
|
|
1039
1634
|
|
|
1040
|
-
|
|
1635
|
+
The type of compute to use for this build.
|
|
1636
|
+
|
|
1637
|
+
See the {@link ComputeType} enum for the possible values.
|
|
1041
1638
|
|
|
1042
1639
|
---
|
|
1043
1640
|
|
|
1044
|
-
##### `
|
|
1641
|
+
##### `imageBuilder`<sup>Optional</sup> <a name="imageBuilder" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProps.property.imageBuilder"></a>
|
|
1045
1642
|
|
|
1046
1643
|
```typescript
|
|
1047
|
-
public readonly
|
|
1644
|
+
public readonly imageBuilder: IImageBuilder;
|
|
1048
1645
|
```
|
|
1049
1646
|
|
|
1050
|
-
- *Type:*
|
|
1051
|
-
- *Default:*
|
|
1647
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IImageBuilder">IImageBuilder</a>
|
|
1648
|
+
- *Default:* image builder with `CodeBuildRunner.LINUX_X64_DOCKERFILE_PATH` as Dockerfile
|
|
1052
1649
|
|
|
1053
|
-
|
|
1650
|
+
Provider running an image to run inside CodeBuild with GitHub runner pre-configured.
|
|
1054
1651
|
|
|
1055
|
-
|
|
1652
|
+
A user named `runner` is expected to exist with access to Docker-in-Docker.
|
|
1056
1653
|
|
|
1057
1654
|
---
|
|
1058
1655
|
|
|
@@ -1141,14 +1738,15 @@ const fargateRunnerProps: FargateRunnerProps = { ... }
|
|
|
1141
1738
|
| **Name** | **Type** | **Description** |
|
|
1142
1739
|
| --- | --- | --- |
|
|
1143
1740
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.logRetention">logRetention</a></code> | <code>aws-cdk-lib.aws_logs.RetentionDays</code> | The number of days log events are kept in CloudWatch Logs. |
|
|
1144
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.runnerVersion">runnerVersion</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerVersion">RunnerVersion</a></code> | Version of GitHub Runners to install. |
|
|
1145
1741
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.assignPublicIp">assignPublicIp</a></code> | <code>boolean</code> | Assign public IP to the runner task. |
|
|
1146
1742
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.cluster">cluster</a></code> | <code>aws-cdk-lib.aws_ecs.Cluster</code> | Existing Fargate cluster to use. |
|
|
1147
1743
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.cpu">cpu</a></code> | <code>number</code> | The number of cpu units used by the task. |
|
|
1148
1744
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.ephemeralStorageGiB">ephemeralStorageGiB</a></code> | <code>number</code> | The amount (in GiB) of ephemeral storage to be allocated to the task. |
|
|
1745
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.imageBuilder">imageBuilder</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.IImageBuilder">IImageBuilder</a></code> | Provider running an image to run inside CodeBuild with GitHub runner pre-configured. |
|
|
1149
1746
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.label">label</a></code> | <code>string</code> | GitHub Actions label used for this provider. |
|
|
1150
1747
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.memoryLimitMiB">memoryLimitMiB</a></code> | <code>number</code> | The amount (in MiB) of memory used by the task. |
|
|
1151
1748
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup</code> | Security Group to assign to the task. |
|
|
1749
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.spot">spot</a></code> | <code>boolean</code> | Use Fargate spot capacity provider to save money. |
|
|
1152
1750
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | VPC to launch the runners in. |
|
|
1153
1751
|
|
|
1154
1752
|
---
|
|
@@ -1170,19 +1768,6 @@ remove the retention policy, set the value to `INFINITE`.
|
|
|
1170
1768
|
|
|
1171
1769
|
---
|
|
1172
1770
|
|
|
1173
|
-
##### `runnerVersion`<sup>Optional</sup> <a name="runnerVersion" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.runnerVersion"></a>
|
|
1174
|
-
|
|
1175
|
-
```typescript
|
|
1176
|
-
public readonly runnerVersion: RunnerVersion;
|
|
1177
|
-
```
|
|
1178
|
-
|
|
1179
|
-
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerVersion">RunnerVersion</a>
|
|
1180
|
-
- *Default:* latest version available
|
|
1181
|
-
|
|
1182
|
-
Version of GitHub Runners to install.
|
|
1183
|
-
|
|
1184
|
-
---
|
|
1185
|
-
|
|
1186
1771
|
##### `assignPublicIp`<sup>Optional</sup> <a name="assignPublicIp" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.assignPublicIp"></a>
|
|
1187
1772
|
|
|
1188
1773
|
```typescript
|
|
@@ -1255,6 +1840,31 @@ NOTE: This parameter is only supported for tasks hosted on AWS Fargate using pla
|
|
|
1255
1840
|
|
|
1256
1841
|
---
|
|
1257
1842
|
|
|
1843
|
+
##### `imageBuilder`<sup>Optional</sup> <a name="imageBuilder" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.imageBuilder"></a>
|
|
1844
|
+
|
|
1845
|
+
```typescript
|
|
1846
|
+
public readonly imageBuilder: IImageBuilder;
|
|
1847
|
+
```
|
|
1848
|
+
|
|
1849
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IImageBuilder">IImageBuilder</a>
|
|
1850
|
+
- *Default:* image builder with `FargateRunner.LINUX_X64_DOCKERFILE_PATH` as Dockerfile
|
|
1851
|
+
|
|
1852
|
+
Provider running an image to run inside CodeBuild with GitHub runner pre-configured.
|
|
1853
|
+
|
|
1854
|
+
A user named `runner` is expected to exist.
|
|
1855
|
+
|
|
1856
|
+
The entry point should start GitHub runner. For example:
|
|
1857
|
+
|
|
1858
|
+
```
|
|
1859
|
+
#!/bin/bash
|
|
1860
|
+
set -e -u -o pipefail
|
|
1861
|
+
|
|
1862
|
+
/home/runner/config.sh --unattended --url "https://${GITHUB_DOMAIN}/${OWNER}/${REPO}" --token "${RUNNER_TOKEN}" --ephemeral --work _work --labels "${RUNNER_LABEL}" --disableupdate --name "${RUNNER_NAME}"
|
|
1863
|
+
/home/runner/run.sh
|
|
1864
|
+
```
|
|
1865
|
+
|
|
1866
|
+
---
|
|
1867
|
+
|
|
1258
1868
|
##### `label`<sup>Optional</sup> <a name="label" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.label"></a>
|
|
1259
1869
|
|
|
1260
1870
|
```typescript
|
|
@@ -1307,6 +1917,22 @@ Security Group to assign to the task.
|
|
|
1307
1917
|
|
|
1308
1918
|
---
|
|
1309
1919
|
|
|
1920
|
+
##### `spot`<sup>Optional</sup> <a name="spot" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.spot"></a>
|
|
1921
|
+
|
|
1922
|
+
```typescript
|
|
1923
|
+
public readonly spot: boolean;
|
|
1924
|
+
```
|
|
1925
|
+
|
|
1926
|
+
- *Type:* boolean
|
|
1927
|
+
- *Default:* false
|
|
1928
|
+
|
|
1929
|
+
Use Fargate spot capacity provider to save money.
|
|
1930
|
+
|
|
1931
|
+
* Runners may fail to start due to missing capacity.
|
|
1932
|
+
* Runners might be stopped prematurely with spot pricing.
|
|
1933
|
+
|
|
1934
|
+
---
|
|
1935
|
+
|
|
1310
1936
|
##### `vpc`<sup>Optional</sup> <a name="vpc" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.vpc"></a>
|
|
1311
1937
|
|
|
1312
1938
|
```typescript
|
|
@@ -1336,38 +1962,22 @@ const gitHubRunnersProps: GitHubRunnersProps = { ... }
|
|
|
1336
1962
|
|
|
1337
1963
|
| **Name** | **Type** | **Description** |
|
|
1338
1964
|
| --- | --- | --- |
|
|
1339
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.defaultProviderLabel">defaultProviderLabel</a></code> | <code>string</code> | Label of default provider in case the workflow job doesn't specify any known label. |
|
|
1340
1965
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.providers">providers</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>[]</code> | List of runner providers to use. |
|
|
1341
1966
|
|
|
1342
1967
|
---
|
|
1343
1968
|
|
|
1344
|
-
##### `
|
|
1969
|
+
##### `providers`<sup>Optional</sup> <a name="providers" id="@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.providers"></a>
|
|
1345
1970
|
|
|
1346
1971
|
```typescript
|
|
1347
|
-
public readonly
|
|
1972
|
+
public readonly providers: IRunnerProvider[];
|
|
1348
1973
|
```
|
|
1349
1974
|
|
|
1350
|
-
- *Type:*
|
|
1351
|
-
- *Default:*
|
|
1975
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>[]
|
|
1976
|
+
- *Default:* CodeBuild, Lambda and Fargate runners with all the defaults (no VPC or default account VPC)
|
|
1352
1977
|
|
|
1353
|
-
|
|
1978
|
+
List of runner providers to use.
|
|
1354
1979
|
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
---
|
|
1358
|
-
|
|
1359
|
-
##### `providers`<sup>Optional</sup> <a name="providers" id="@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.providers"></a>
|
|
1360
|
-
|
|
1361
|
-
```typescript
|
|
1362
|
-
public readonly providers: IRunnerProvider[];
|
|
1363
|
-
```
|
|
1364
|
-
|
|
1365
|
-
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>[]
|
|
1366
|
-
- *Default:* CodeBuild, Lambda and Fargate runners with all the defaults (no VPC or default account VPC)
|
|
1367
|
-
|
|
1368
|
-
List of runner providers to use.
|
|
1369
|
-
|
|
1370
|
-
At least one provider is required. Provider will be selected when its label matches the labels requested by the workflow job.
|
|
1980
|
+
At least one provider is required. Provider will be selected when its label matches the labels requested by the workflow job.
|
|
1371
1981
|
|
|
1372
1982
|
---
|
|
1373
1983
|
|
|
@@ -1386,8 +1996,8 @@ const lambdaRunnerProps: LambdaRunnerProps = { ... }
|
|
|
1386
1996
|
| **Name** | **Type** | **Description** |
|
|
1387
1997
|
| --- | --- | --- |
|
|
1388
1998
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProps.property.logRetention">logRetention</a></code> | <code>aws-cdk-lib.aws_logs.RetentionDays</code> | The number of days log events are kept in CloudWatch Logs. |
|
|
1389
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProps.property.runnerVersion">runnerVersion</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerVersion">RunnerVersion</a></code> | Version of GitHub Runners to install. |
|
|
1390
1999
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProps.property.ephemeralStorageSize">ephemeralStorageSize</a></code> | <code>aws-cdk-lib.Size</code> | The size of the function’s /tmp directory in MiB. |
|
|
2000
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProps.property.imageBuilder">imageBuilder</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.IImageBuilder">IImageBuilder</a></code> | Provider running an image to run inside CodeBuild with GitHub runner pre-configured. |
|
|
1391
2001
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProps.property.label">label</a></code> | <code>string</code> | GitHub Actions label used for this provider. |
|
|
1392
2002
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProps.property.memorySize">memorySize</a></code> | <code>number</code> | The amount of memory, in MB, that is allocated to your Lambda function. |
|
|
1393
2003
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProps.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup</code> | Security Group to assign to this instance. |
|
|
@@ -1414,29 +2024,33 @@ remove the retention policy, set the value to `INFINITE`.
|
|
|
1414
2024
|
|
|
1415
2025
|
---
|
|
1416
2026
|
|
|
1417
|
-
##### `
|
|
2027
|
+
##### `ephemeralStorageSize`<sup>Optional</sup> <a name="ephemeralStorageSize" id="@cloudsnorkel/cdk-github-runners.LambdaRunnerProps.property.ephemeralStorageSize"></a>
|
|
1418
2028
|
|
|
1419
2029
|
```typescript
|
|
1420
|
-
public readonly
|
|
2030
|
+
public readonly ephemeralStorageSize: Size;
|
|
1421
2031
|
```
|
|
1422
2032
|
|
|
1423
|
-
- *Type:*
|
|
1424
|
-
- *Default:*
|
|
2033
|
+
- *Type:* aws-cdk-lib.Size
|
|
2034
|
+
- *Default:* 10 GiB
|
|
1425
2035
|
|
|
1426
|
-
|
|
2036
|
+
The size of the function’s /tmp directory in MiB.
|
|
1427
2037
|
|
|
1428
2038
|
---
|
|
1429
2039
|
|
|
1430
|
-
##### `
|
|
2040
|
+
##### `imageBuilder`<sup>Optional</sup> <a name="imageBuilder" id="@cloudsnorkel/cdk-github-runners.LambdaRunnerProps.property.imageBuilder"></a>
|
|
1431
2041
|
|
|
1432
2042
|
```typescript
|
|
1433
|
-
public readonly
|
|
2043
|
+
public readonly imageBuilder: IImageBuilder;
|
|
1434
2044
|
```
|
|
1435
2045
|
|
|
1436
|
-
- *Type:*
|
|
1437
|
-
- *Default:*
|
|
2046
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IImageBuilder">IImageBuilder</a>
|
|
2047
|
+
- *Default:* image builder with LambdaRunner.LINUX_X64_DOCKERFILE_PATH as Dockerfile
|
|
1438
2048
|
|
|
1439
|
-
|
|
2049
|
+
Provider running an image to run inside CodeBuild with GitHub runner pre-configured.
|
|
2050
|
+
|
|
2051
|
+
The default command (`CMD`) should be `["runner.handler"]` which points to an included `runner.js` with a function named `handler`. The function should start the GitHub runner.
|
|
2052
|
+
|
|
2053
|
+
> [https://github.com/CloudSnorkel/cdk-github-runners/tree/main/src/providers/docker-images/lambda](https://github.com/CloudSnorkel/cdk-github-runners/tree/main/src/providers/docker-images/lambda)
|
|
1440
2054
|
|
|
1441
2055
|
---
|
|
1442
2056
|
|
|
@@ -1525,6 +2139,90 @@ VPC to launch the runners in.
|
|
|
1525
2139
|
|
|
1526
2140
|
---
|
|
1527
2141
|
|
|
2142
|
+
### RunnerImage <a name="RunnerImage" id="@cloudsnorkel/cdk-github-runners.RunnerImage"></a>
|
|
2143
|
+
|
|
2144
|
+
#### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.RunnerImage.Initializer"></a>
|
|
2145
|
+
|
|
2146
|
+
```typescript
|
|
2147
|
+
import { RunnerImage } from '@cloudsnorkel/cdk-github-runners'
|
|
2148
|
+
|
|
2149
|
+
const runnerImage: RunnerImage = { ... }
|
|
2150
|
+
```
|
|
2151
|
+
|
|
2152
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
2153
|
+
|
|
2154
|
+
| **Name** | **Type** | **Description** |
|
|
2155
|
+
| --- | --- | --- |
|
|
2156
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImage.property.architecture">architecture</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a></code> | Architecture of the image. |
|
|
2157
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImage.property.imageDigest">imageDigest</a></code> | <code>string</code> | Image digest for providers that need to know the digest like Lambda. |
|
|
2158
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImage.property.imageRepository">imageRepository</a></code> | <code>aws-cdk-lib.aws_ecr.IRepository</code> | ECR repository containing the image. |
|
|
2159
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImage.property.imageTag">imageTag</a></code> | <code>string</code> | Static image tag where the image will be pushed. |
|
|
2160
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImage.property.os">os</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a></code> | OS type of the image. |
|
|
2161
|
+
|
|
2162
|
+
---
|
|
2163
|
+
|
|
2164
|
+
##### `architecture`<sup>Required</sup> <a name="architecture" id="@cloudsnorkel/cdk-github-runners.RunnerImage.property.architecture"></a>
|
|
2165
|
+
|
|
2166
|
+
```typescript
|
|
2167
|
+
public readonly architecture: Architecture;
|
|
2168
|
+
```
|
|
2169
|
+
|
|
2170
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a>
|
|
2171
|
+
|
|
2172
|
+
Architecture of the image.
|
|
2173
|
+
|
|
2174
|
+
---
|
|
2175
|
+
|
|
2176
|
+
##### `imageDigest`<sup>Required</sup> <a name="imageDigest" id="@cloudsnorkel/cdk-github-runners.RunnerImage.property.imageDigest"></a>
|
|
2177
|
+
|
|
2178
|
+
```typescript
|
|
2179
|
+
public readonly imageDigest: string;
|
|
2180
|
+
```
|
|
2181
|
+
|
|
2182
|
+
- *Type:* string
|
|
2183
|
+
|
|
2184
|
+
Image digest for providers that need to know the digest like Lambda.
|
|
2185
|
+
|
|
2186
|
+
WARNING: the digest might change when the builder automatically rebuilds the image on a schedule. Do not expect for this digest to stay the same between deploys.
|
|
2187
|
+
|
|
2188
|
+
---
|
|
2189
|
+
|
|
2190
|
+
##### `imageRepository`<sup>Required</sup> <a name="imageRepository" id="@cloudsnorkel/cdk-github-runners.RunnerImage.property.imageRepository"></a>
|
|
2191
|
+
|
|
2192
|
+
```typescript
|
|
2193
|
+
public readonly imageRepository: IRepository;
|
|
2194
|
+
```
|
|
2195
|
+
|
|
2196
|
+
- *Type:* aws-cdk-lib.aws_ecr.IRepository
|
|
2197
|
+
|
|
2198
|
+
ECR repository containing the image.
|
|
2199
|
+
|
|
2200
|
+
---
|
|
2201
|
+
|
|
2202
|
+
##### `imageTag`<sup>Required</sup> <a name="imageTag" id="@cloudsnorkel/cdk-github-runners.RunnerImage.property.imageTag"></a>
|
|
2203
|
+
|
|
2204
|
+
```typescript
|
|
2205
|
+
public readonly imageTag: string;
|
|
2206
|
+
```
|
|
2207
|
+
|
|
2208
|
+
- *Type:* string
|
|
2209
|
+
|
|
2210
|
+
Static image tag where the image will be pushed.
|
|
2211
|
+
|
|
2212
|
+
---
|
|
2213
|
+
|
|
2214
|
+
##### `os`<sup>Required</sup> <a name="os" id="@cloudsnorkel/cdk-github-runners.RunnerImage.property.os"></a>
|
|
2215
|
+
|
|
2216
|
+
```typescript
|
|
2217
|
+
public readonly os: Os;
|
|
2218
|
+
```
|
|
2219
|
+
|
|
2220
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a>
|
|
2221
|
+
|
|
2222
|
+
OS type of the image.
|
|
2223
|
+
|
|
2224
|
+
---
|
|
2225
|
+
|
|
1528
2226
|
### RunnerProviderProps <a name="RunnerProviderProps" id="@cloudsnorkel/cdk-github-runners.RunnerProviderProps"></a>
|
|
1529
2227
|
|
|
1530
2228
|
Common properties for all runner providers.
|
|
@@ -1542,7 +2240,6 @@ const runnerProviderProps: RunnerProviderProps = { ... }
|
|
|
1542
2240
|
| **Name** | **Type** | **Description** |
|
|
1543
2241
|
| --- | --- | --- |
|
|
1544
2242
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerProviderProps.property.logRetention">logRetention</a></code> | <code>aws-cdk-lib.aws_logs.RetentionDays</code> | The number of days log events are kept in CloudWatch Logs. |
|
|
1545
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerProviderProps.property.runnerVersion">runnerVersion</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerVersion">RunnerVersion</a></code> | Version of GitHub Runners to install. |
|
|
1546
2243
|
|
|
1547
2244
|
---
|
|
1548
2245
|
|
|
@@ -1563,19 +2260,6 @@ remove the retention policy, set the value to `INFINITE`.
|
|
|
1563
2260
|
|
|
1564
2261
|
---
|
|
1565
2262
|
|
|
1566
|
-
##### `runnerVersion`<sup>Optional</sup> <a name="runnerVersion" id="@cloudsnorkel/cdk-github-runners.RunnerProviderProps.property.runnerVersion"></a>
|
|
1567
|
-
|
|
1568
|
-
```typescript
|
|
1569
|
-
public readonly runnerVersion: RunnerVersion;
|
|
1570
|
-
```
|
|
1571
|
-
|
|
1572
|
-
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerVersion">RunnerVersion</a>
|
|
1573
|
-
- *Default:* latest version available
|
|
1574
|
-
|
|
1575
|
-
Version of GitHub Runners to install.
|
|
1576
|
-
|
|
1577
|
-
---
|
|
1578
|
-
|
|
1579
2263
|
### RunnerRuntimeParameters <a name="RunnerRuntimeParameters" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters"></a>
|
|
1580
2264
|
|
|
1581
2265
|
Workflow job parameters as parsed from the webhook event. Pass these into your runner executor and run something like:.
|
|
@@ -1672,6 +2356,166 @@ Path to runner token used to register token.
|
|
|
1672
2356
|
|
|
1673
2357
|
## Classes <a name="Classes" id="Classes"></a>
|
|
1674
2358
|
|
|
2359
|
+
### Architecture <a name="Architecture" id="@cloudsnorkel/cdk-github-runners.Architecture"></a>
|
|
2360
|
+
|
|
2361
|
+
CPU architecture enum for an image.
|
|
2362
|
+
|
|
2363
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
2364
|
+
|
|
2365
|
+
| **Name** | **Description** |
|
|
2366
|
+
| --- | --- |
|
|
2367
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.Architecture.is">is</a></code> | Checks if the given architecture is the same as this one. |
|
|
2368
|
+
|
|
2369
|
+
---
|
|
2370
|
+
|
|
2371
|
+
##### `is` <a name="is" id="@cloudsnorkel/cdk-github-runners.Architecture.is"></a>
|
|
2372
|
+
|
|
2373
|
+
```typescript
|
|
2374
|
+
public is(arch: Architecture): boolean
|
|
2375
|
+
```
|
|
2376
|
+
|
|
2377
|
+
Checks if the given architecture is the same as this one.
|
|
2378
|
+
|
|
2379
|
+
###### `arch`<sup>Required</sup> <a name="arch" id="@cloudsnorkel/cdk-github-runners.Architecture.is.parameter.arch"></a>
|
|
2380
|
+
|
|
2381
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a>
|
|
2382
|
+
|
|
2383
|
+
architecture to compare.
|
|
2384
|
+
|
|
2385
|
+
---
|
|
2386
|
+
|
|
2387
|
+
|
|
2388
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
2389
|
+
|
|
2390
|
+
| **Name** | **Type** | **Description** |
|
|
2391
|
+
| --- | --- | --- |
|
|
2392
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.Architecture.property.name">name</a></code> | <code>string</code> | *No description.* |
|
|
2393
|
+
|
|
2394
|
+
---
|
|
2395
|
+
|
|
2396
|
+
##### `name`<sup>Required</sup> <a name="name" id="@cloudsnorkel/cdk-github-runners.Architecture.property.name"></a>
|
|
2397
|
+
|
|
2398
|
+
```typescript
|
|
2399
|
+
public readonly name: string;
|
|
2400
|
+
```
|
|
2401
|
+
|
|
2402
|
+
- *Type:* string
|
|
2403
|
+
|
|
2404
|
+
---
|
|
2405
|
+
|
|
2406
|
+
#### Constants <a name="Constants" id="Constants"></a>
|
|
2407
|
+
|
|
2408
|
+
| **Name** | **Type** | **Description** |
|
|
2409
|
+
| --- | --- | --- |
|
|
2410
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.Architecture.property.ARM64">ARM64</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a></code> | ARM64. |
|
|
2411
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.Architecture.property.X86_64">X86_64</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a></code> | X86_64. |
|
|
2412
|
+
|
|
2413
|
+
---
|
|
2414
|
+
|
|
2415
|
+
##### `ARM64`<sup>Required</sup> <a name="ARM64" id="@cloudsnorkel/cdk-github-runners.Architecture.property.ARM64"></a>
|
|
2416
|
+
|
|
2417
|
+
```typescript
|
|
2418
|
+
public readonly ARM64: Architecture;
|
|
2419
|
+
```
|
|
2420
|
+
|
|
2421
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a>
|
|
2422
|
+
|
|
2423
|
+
ARM64.
|
|
2424
|
+
|
|
2425
|
+
---
|
|
2426
|
+
|
|
2427
|
+
##### `X86_64`<sup>Required</sup> <a name="X86_64" id="@cloudsnorkel/cdk-github-runners.Architecture.property.X86_64"></a>
|
|
2428
|
+
|
|
2429
|
+
```typescript
|
|
2430
|
+
public readonly X86_64: Architecture;
|
|
2431
|
+
```
|
|
2432
|
+
|
|
2433
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a>
|
|
2434
|
+
|
|
2435
|
+
X86_64.
|
|
2436
|
+
|
|
2437
|
+
---
|
|
2438
|
+
|
|
2439
|
+
### Os <a name="Os" id="@cloudsnorkel/cdk-github-runners.Os"></a>
|
|
2440
|
+
|
|
2441
|
+
OS enum for an image.
|
|
2442
|
+
|
|
2443
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
2444
|
+
|
|
2445
|
+
| **Name** | **Description** |
|
|
2446
|
+
| --- | --- |
|
|
2447
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.Os.is">is</a></code> | Checks if the given OS is the same as this one. |
|
|
2448
|
+
|
|
2449
|
+
---
|
|
2450
|
+
|
|
2451
|
+
##### `is` <a name="is" id="@cloudsnorkel/cdk-github-runners.Os.is"></a>
|
|
2452
|
+
|
|
2453
|
+
```typescript
|
|
2454
|
+
public is(os: Os): boolean
|
|
2455
|
+
```
|
|
2456
|
+
|
|
2457
|
+
Checks if the given OS is the same as this one.
|
|
2458
|
+
|
|
2459
|
+
###### `os`<sup>Required</sup> <a name="os" id="@cloudsnorkel/cdk-github-runners.Os.is.parameter.os"></a>
|
|
2460
|
+
|
|
2461
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a>
|
|
2462
|
+
|
|
2463
|
+
OS to compare.
|
|
2464
|
+
|
|
2465
|
+
---
|
|
2466
|
+
|
|
2467
|
+
|
|
2468
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
2469
|
+
|
|
2470
|
+
| **Name** | **Type** | **Description** |
|
|
2471
|
+
| --- | --- | --- |
|
|
2472
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.Os.property.name">name</a></code> | <code>string</code> | *No description.* |
|
|
2473
|
+
|
|
2474
|
+
---
|
|
2475
|
+
|
|
2476
|
+
##### `name`<sup>Required</sup> <a name="name" id="@cloudsnorkel/cdk-github-runners.Os.property.name"></a>
|
|
2477
|
+
|
|
2478
|
+
```typescript
|
|
2479
|
+
public readonly name: string;
|
|
2480
|
+
```
|
|
2481
|
+
|
|
2482
|
+
- *Type:* string
|
|
2483
|
+
|
|
2484
|
+
---
|
|
2485
|
+
|
|
2486
|
+
#### Constants <a name="Constants" id="Constants"></a>
|
|
2487
|
+
|
|
2488
|
+
| **Name** | **Type** | **Description** |
|
|
2489
|
+
| --- | --- | --- |
|
|
2490
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.Os.property.LINUX">LINUX</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a></code> | Linux. |
|
|
2491
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.Os.property.WINDOWS">WINDOWS</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a></code> | Windows. |
|
|
2492
|
+
|
|
2493
|
+
---
|
|
2494
|
+
|
|
2495
|
+
##### `LINUX`<sup>Required</sup> <a name="LINUX" id="@cloudsnorkel/cdk-github-runners.Os.property.LINUX"></a>
|
|
2496
|
+
|
|
2497
|
+
```typescript
|
|
2498
|
+
public readonly LINUX: Os;
|
|
2499
|
+
```
|
|
2500
|
+
|
|
2501
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a>
|
|
2502
|
+
|
|
2503
|
+
Linux.
|
|
2504
|
+
|
|
2505
|
+
---
|
|
2506
|
+
|
|
2507
|
+
##### `WINDOWS`<sup>Required</sup> <a name="WINDOWS" id="@cloudsnorkel/cdk-github-runners.Os.property.WINDOWS"></a>
|
|
2508
|
+
|
|
2509
|
+
```typescript
|
|
2510
|
+
public readonly WINDOWS: Os;
|
|
2511
|
+
```
|
|
2512
|
+
|
|
2513
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a>
|
|
2514
|
+
|
|
2515
|
+
Windows.
|
|
2516
|
+
|
|
2517
|
+
---
|
|
2518
|
+
|
|
1675
2519
|
### RunnerVersion <a name="RunnerVersion" id="@cloudsnorkel/cdk-github-runners.RunnerVersion"></a>
|
|
1676
2520
|
|
|
1677
2521
|
Defines desired GitHub Actions runner version.
|
|
@@ -1755,8 +2599,162 @@ public readonly version: string;
|
|
|
1755
2599
|
---
|
|
1756
2600
|
|
|
1757
2601
|
|
|
2602
|
+
### StaticRunnerImage <a name="StaticRunnerImage" id="@cloudsnorkel/cdk-github-runners.StaticRunnerImage"></a>
|
|
2603
|
+
|
|
2604
|
+
Helper class with methods to use static images that are built outside the context of this project.
|
|
2605
|
+
|
|
2606
|
+
#### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.StaticRunnerImage.Initializer"></a>
|
|
2607
|
+
|
|
2608
|
+
```typescript
|
|
2609
|
+
import { StaticRunnerImage } from '@cloudsnorkel/cdk-github-runners'
|
|
2610
|
+
|
|
2611
|
+
new StaticRunnerImage()
|
|
2612
|
+
```
|
|
2613
|
+
|
|
2614
|
+
| **Name** | **Type** | **Description** |
|
|
2615
|
+
| --- | --- | --- |
|
|
2616
|
+
|
|
2617
|
+
---
|
|
2618
|
+
|
|
2619
|
+
|
|
2620
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
2621
|
+
|
|
2622
|
+
| **Name** | **Description** |
|
|
2623
|
+
| --- | --- |
|
|
2624
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.StaticRunnerImage.fromDockerHub">fromDockerHub</a></code> | Create a builder from an existing Docker Hub image. |
|
|
2625
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.StaticRunnerImage.fromEcrRepository">fromEcrRepository</a></code> | Create a builder (that doesn't actually build anything) from an existing image in an existing repository. |
|
|
2626
|
+
|
|
2627
|
+
---
|
|
2628
|
+
|
|
2629
|
+
##### `fromDockerHub` <a name="fromDockerHub" id="@cloudsnorkel/cdk-github-runners.StaticRunnerImage.fromDockerHub"></a>
|
|
2630
|
+
|
|
2631
|
+
```typescript
|
|
2632
|
+
import { StaticRunnerImage } from '@cloudsnorkel/cdk-github-runners'
|
|
2633
|
+
|
|
2634
|
+
StaticRunnerImage.fromDockerHub(scope: Construct, id: string, image: string, architecture?: Architecture, os?: Os)
|
|
2635
|
+
```
|
|
2636
|
+
|
|
2637
|
+
Create a builder from an existing Docker Hub image.
|
|
2638
|
+
|
|
2639
|
+
The image must already have GitHub Actions runner installed. You are responsible to update it and remove it when done.
|
|
2640
|
+
|
|
2641
|
+
We create a CodeBuild image builder behind the scenes to copy the image over to ECR. This helps avoid Docker Hub rate limits and prevent failures.
|
|
2642
|
+
|
|
2643
|
+
###### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.StaticRunnerImage.fromDockerHub.parameter.scope"></a>
|
|
2644
|
+
|
|
2645
|
+
- *Type:* constructs.Construct
|
|
2646
|
+
|
|
2647
|
+
---
|
|
2648
|
+
|
|
2649
|
+
###### `id`<sup>Required</sup> <a name="id" id="@cloudsnorkel/cdk-github-runners.StaticRunnerImage.fromDockerHub.parameter.id"></a>
|
|
2650
|
+
|
|
2651
|
+
- *Type:* string
|
|
2652
|
+
|
|
2653
|
+
---
|
|
2654
|
+
|
|
2655
|
+
###### `image`<sup>Required</sup> <a name="image" id="@cloudsnorkel/cdk-github-runners.StaticRunnerImage.fromDockerHub.parameter.image"></a>
|
|
2656
|
+
|
|
2657
|
+
- *Type:* string
|
|
2658
|
+
|
|
2659
|
+
Docker Hub image with optional tag.
|
|
2660
|
+
|
|
2661
|
+
---
|
|
2662
|
+
|
|
2663
|
+
###### `architecture`<sup>Optional</sup> <a name="architecture" id="@cloudsnorkel/cdk-github-runners.StaticRunnerImage.fromDockerHub.parameter.architecture"></a>
|
|
2664
|
+
|
|
2665
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a>
|
|
2666
|
+
|
|
2667
|
+
image architecture.
|
|
2668
|
+
|
|
2669
|
+
---
|
|
2670
|
+
|
|
2671
|
+
###### `os`<sup>Optional</sup> <a name="os" id="@cloudsnorkel/cdk-github-runners.StaticRunnerImage.fromDockerHub.parameter.os"></a>
|
|
2672
|
+
|
|
2673
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a>
|
|
2674
|
+
|
|
2675
|
+
image OS.
|
|
2676
|
+
|
|
2677
|
+
---
|
|
2678
|
+
|
|
2679
|
+
##### `fromEcrRepository` <a name="fromEcrRepository" id="@cloudsnorkel/cdk-github-runners.StaticRunnerImage.fromEcrRepository"></a>
|
|
2680
|
+
|
|
2681
|
+
```typescript
|
|
2682
|
+
import { StaticRunnerImage } from '@cloudsnorkel/cdk-github-runners'
|
|
2683
|
+
|
|
2684
|
+
StaticRunnerImage.fromEcrRepository(repository: IRepository, tag?: string, architecture?: Architecture, os?: Os)
|
|
2685
|
+
```
|
|
2686
|
+
|
|
2687
|
+
Create a builder (that doesn't actually build anything) from an existing image in an existing repository.
|
|
2688
|
+
|
|
2689
|
+
The image must already have GitHub Actions runner installed. You are responsible to update it and remove it when done.
|
|
2690
|
+
|
|
2691
|
+
###### `repository`<sup>Required</sup> <a name="repository" id="@cloudsnorkel/cdk-github-runners.StaticRunnerImage.fromEcrRepository.parameter.repository"></a>
|
|
2692
|
+
|
|
2693
|
+
- *Type:* aws-cdk-lib.aws_ecr.IRepository
|
|
2694
|
+
|
|
2695
|
+
ECR repository.
|
|
2696
|
+
|
|
2697
|
+
---
|
|
2698
|
+
|
|
2699
|
+
###### `tag`<sup>Optional</sup> <a name="tag" id="@cloudsnorkel/cdk-github-runners.StaticRunnerImage.fromEcrRepository.parameter.tag"></a>
|
|
2700
|
+
|
|
2701
|
+
- *Type:* string
|
|
2702
|
+
|
|
2703
|
+
image tag.
|
|
2704
|
+
|
|
2705
|
+
---
|
|
2706
|
+
|
|
2707
|
+
###### `architecture`<sup>Optional</sup> <a name="architecture" id="@cloudsnorkel/cdk-github-runners.StaticRunnerImage.fromEcrRepository.parameter.architecture"></a>
|
|
2708
|
+
|
|
2709
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a>
|
|
2710
|
+
|
|
2711
|
+
image architecture.
|
|
2712
|
+
|
|
2713
|
+
---
|
|
2714
|
+
|
|
2715
|
+
###### `os`<sup>Optional</sup> <a name="os" id="@cloudsnorkel/cdk-github-runners.StaticRunnerImage.fromEcrRepository.parameter.os"></a>
|
|
2716
|
+
|
|
2717
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a>
|
|
2718
|
+
|
|
2719
|
+
image OS.
|
|
2720
|
+
|
|
2721
|
+
---
|
|
2722
|
+
|
|
2723
|
+
|
|
2724
|
+
|
|
1758
2725
|
## Protocols <a name="Protocols" id="Protocols"></a>
|
|
1759
2726
|
|
|
2727
|
+
### IImageBuilder <a name="IImageBuilder" id="@cloudsnorkel/cdk-github-runners.IImageBuilder"></a>
|
|
2728
|
+
|
|
2729
|
+
- *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder">CodeBuildImageBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.IImageBuilder">IImageBuilder</a>
|
|
2730
|
+
|
|
2731
|
+
Interface for constructs that build an image that can be used in {@link IRunnerProvider}.
|
|
2732
|
+
|
|
2733
|
+
Anything that ends up with an ECR repository containing a Docker image that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing image and nothing else.
|
|
2734
|
+
|
|
2735
|
+
It's important that the specified image tag be available at the time the repository is available. Providers usually assume the image is ready and will fail if it's not.
|
|
2736
|
+
|
|
2737
|
+
The image can be further updated over time manually or using a schedule as long as it is always written to the same tag.
|
|
2738
|
+
|
|
2739
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
2740
|
+
|
|
2741
|
+
| **Name** | **Description** |
|
|
2742
|
+
| --- | --- |
|
|
2743
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.IImageBuilder.bind">bind</a></code> | ECR repository containing the image. |
|
|
2744
|
+
|
|
2745
|
+
---
|
|
2746
|
+
|
|
2747
|
+
##### `bind` <a name="bind" id="@cloudsnorkel/cdk-github-runners.IImageBuilder.bind"></a>
|
|
2748
|
+
|
|
2749
|
+
```typescript
|
|
2750
|
+
public bind(): RunnerImage
|
|
2751
|
+
```
|
|
2752
|
+
|
|
2753
|
+
ECR repository containing the image.
|
|
2754
|
+
|
|
2755
|
+
This method can be called multiple times if the image is bound to multiple providers. Make sure you cache the image when implementing or return an error if this builder doesn't support reusing images.
|
|
2756
|
+
|
|
2757
|
+
|
|
1760
2758
|
### IRunnerProvider <a name="IRunnerProvider" id="@cloudsnorkel/cdk-github-runners.IRunnerProvider"></a>
|
|
1761
2759
|
|
|
1762
2760
|
- *Extends:* aws-cdk-lib.aws_ec2.IConnectable, aws-cdk-lib.aws_iam.IGrantable
|