@cloudsnorkel/cdk-github-runners 0.7.0 → 0.7.2

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/API.md CHANGED
@@ -2,6 +2,210 @@
2
2
 
3
3
  ## Constructs <a name="Constructs" id="Constructs"></a>
4
4
 
5
+ ### AmiBuilder <a name="AmiBuilder" id="@cloudsnorkel/cdk-github-runners.AmiBuilder"></a>
6
+
7
+ - *Implements:* <a href="#@cloudsnorkel/cdk-github-runners.IAmiBuilder">IAmiBuilder</a>, aws-cdk-lib.aws_ec2.IConnectable
8
+
9
+ An AMI builder that uses AWS Image Builder to build AMIs pre-baked with all the GitHub Actions runner requirements.
10
+
11
+ Builders can be used with {@link Ec2Runner}.
12
+
13
+ Each builder re-runs automatically at a set interval to make sure the AMIs contain the latest versions of everything.
14
+
15
+ You can create an instance of this construct to customize the AMI used to spin-up runners. Some runner providers may require custom components. Check the runner provider documentation.
16
+
17
+ For example, to set a specific runner version, rebuild the image every 2 weeks, and add a few packages for the EC2 provider, use:
18
+
19
+ ```
20
+ const builder = new AmiBuilder(this, 'Builder', {
21
+ runnerVersion: RunnerVersion.specific('2.293.0'),
22
+ rebuildInterval: Duration.days(14),
23
+ });
24
+ builder.addComponent(new ImageBuilderComponent(scope, id, {
25
+ platform: 'Linux',
26
+ displayName: 'p7zip',
27
+ description: 'Install some more packages',
28
+ commands: [
29
+ 'set -ex',
30
+ 'apt-get install p7zip',
31
+ ],
32
+ }));
33
+ new Ec2Runner(this, 'EC2 provider', {
34
+ label: 'custom-ec2',
35
+ amiBuilder: builder,
36
+ });
37
+ ```
38
+
39
+ #### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.Initializer"></a>
40
+
41
+ ```typescript
42
+ import { AmiBuilder } from '@cloudsnorkel/cdk-github-runners'
43
+
44
+ new AmiBuilder(scope: Construct, id: string, props?: AmiBuilderProps)
45
+ ```
46
+
47
+ | **Name** | **Type** | **Description** |
48
+ | --- | --- | --- |
49
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
50
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
51
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.Initializer.parameter.props">props</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilderProps">AmiBuilderProps</a></code> | *No description.* |
52
+
53
+ ---
54
+
55
+ ##### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.Initializer.parameter.scope"></a>
56
+
57
+ - *Type:* constructs.Construct
58
+
59
+ ---
60
+
61
+ ##### `id`<sup>Required</sup> <a name="id" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.Initializer.parameter.id"></a>
62
+
63
+ - *Type:* string
64
+
65
+ ---
66
+
67
+ ##### `props`<sup>Optional</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.Initializer.parameter.props"></a>
68
+
69
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.AmiBuilderProps">AmiBuilderProps</a>
70
+
71
+ ---
72
+
73
+ #### Methods <a name="Methods" id="Methods"></a>
74
+
75
+ | **Name** | **Description** |
76
+ | --- | --- |
77
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.toString">toString</a></code> | Returns a string representation of this construct. |
78
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.addComponent">addComponent</a></code> | Add a component to be installed. |
79
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.addExtraCertificates">addExtraCertificates</a></code> | Add extra trusted certificates. |
80
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.bind">bind</a></code> | Called by IRunnerProvider to finalize settings and create the AMI builder. |
81
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.prependComponent">prependComponent</a></code> | Add a component to be installed before any other components. |
82
+
83
+ ---
84
+
85
+ ##### `toString` <a name="toString" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.toString"></a>
86
+
87
+ ```typescript
88
+ public toString(): string
89
+ ```
90
+
91
+ Returns a string representation of this construct.
92
+
93
+ ##### `addComponent` <a name="addComponent" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.addComponent"></a>
94
+
95
+ ```typescript
96
+ public addComponent(component: ImageBuilderComponent): void
97
+ ```
98
+
99
+ Add a component to be installed.
100
+
101
+ ###### `component`<sup>Required</sup> <a name="component" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.addComponent.parameter.component"></a>
102
+
103
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent">ImageBuilderComponent</a>
104
+
105
+ ---
106
+
107
+ ##### `addExtraCertificates` <a name="addExtraCertificates" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.addExtraCertificates"></a>
108
+
109
+ ```typescript
110
+ public addExtraCertificates(path: string): void
111
+ ```
112
+
113
+ Add extra trusted certificates.
114
+
115
+ This helps deal with self-signed certificates for GitHub Enterprise Server.
116
+
117
+ ###### `path`<sup>Required</sup> <a name="path" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.addExtraCertificates.parameter.path"></a>
118
+
119
+ - *Type:* string
120
+
121
+ path to directory containing a file called certs.pem containing all the required certificates.
122
+
123
+ ---
124
+
125
+ ##### `bind` <a name="bind" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.bind"></a>
126
+
127
+ ```typescript
128
+ public bind(): RunnerAmi
129
+ ```
130
+
131
+ Called by IRunnerProvider to finalize settings and create the AMI builder.
132
+
133
+ ##### `prependComponent` <a name="prependComponent" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.prependComponent"></a>
134
+
135
+ ```typescript
136
+ public prependComponent(component: ImageBuilderComponent): void
137
+ ```
138
+
139
+ Add a component to be installed before any other components.
140
+
141
+ Useful for required system settings like certificates or proxy settings.
142
+
143
+ ###### `component`<sup>Required</sup> <a name="component" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.prependComponent.parameter.component"></a>
144
+
145
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent">ImageBuilderComponent</a>
146
+
147
+ ---
148
+
149
+ #### Static Functions <a name="Static Functions" id="Static Functions"></a>
150
+
151
+ | **Name** | **Description** |
152
+ | --- | --- |
153
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
154
+
155
+ ---
156
+
157
+ ##### ~~`isConstruct`~~ <a name="isConstruct" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.isConstruct"></a>
158
+
159
+ ```typescript
160
+ import { AmiBuilder } from '@cloudsnorkel/cdk-github-runners'
161
+
162
+ AmiBuilder.isConstruct(x: any)
163
+ ```
164
+
165
+ Checks if `x` is a construct.
166
+
167
+ ###### `x`<sup>Required</sup> <a name="x" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.isConstruct.parameter.x"></a>
168
+
169
+ - *Type:* any
170
+
171
+ Any object.
172
+
173
+ ---
174
+
175
+ #### Properties <a name="Properties" id="Properties"></a>
176
+
177
+ | **Name** | **Type** | **Description** |
178
+ | --- | --- | --- |
179
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
180
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.property.connections">connections</a></code> | <code>aws-cdk-lib.aws_ec2.Connections</code> | The network connections associated with this resource. |
181
+
182
+ ---
183
+
184
+ ##### `node`<sup>Required</sup> <a name="node" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.property.node"></a>
185
+
186
+ ```typescript
187
+ public readonly node: Node;
188
+ ```
189
+
190
+ - *Type:* constructs.Node
191
+
192
+ The tree node.
193
+
194
+ ---
195
+
196
+ ##### `connections`<sup>Required</sup> <a name="connections" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.property.connections"></a>
197
+
198
+ ```typescript
199
+ public readonly connections: Connections;
200
+ ```
201
+
202
+ - *Type:* aws-cdk-lib.aws_ec2.Connections
203
+
204
+ The network connections associated with this resource.
205
+
206
+ ---
207
+
208
+
5
209
  ### CodeBuildImageBuilder <a name="CodeBuildImageBuilder" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder"></a>
6
210
 
7
211
  - *Implements:* <a href="#@cloudsnorkel/cdk-github-runners.IImageBuilder">IImageBuilder</a>
@@ -283,7 +487,7 @@ This construct is not meant to be used by itself. It should be passed in the pro
283
487
  ```typescript
284
488
  import { CodeBuildRunner } from '@cloudsnorkel/cdk-github-runners'
285
489
 
286
- new CodeBuildRunner(scope: Construct, id: string, props: CodeBuildRunnerProps)
490
+ new CodeBuildRunner(scope: Construct, id: string, props?: CodeBuildRunnerProps)
287
491
  ```
288
492
 
289
493
  | **Name** | **Type** | **Description** |
@@ -306,7 +510,7 @@ new CodeBuildRunner(scope: Construct, id: string, props: CodeBuildRunnerProps)
306
510
 
307
511
  ---
308
512
 
309
- ##### `props`<sup>Required</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunner.Initializer.parameter.props"></a>
513
+ ##### `props`<sup>Optional</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunner.Initializer.parameter.props"></a>
310
514
 
311
515
  - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProps">CodeBuildRunnerProps</a>
312
516
 
@@ -769,7 +973,7 @@ This construct is not meant to be used by itself. It should be passed in the pro
769
973
  ```typescript
770
974
  import { Ec2Runner } from '@cloudsnorkel/cdk-github-runners'
771
975
 
772
- new Ec2Runner(scope: Construct, id: string, props: Ec2RunnerProps)
976
+ new Ec2Runner(scope: Construct, id: string, props?: Ec2RunnerProps)
773
977
  ```
774
978
 
775
979
  | **Name** | **Type** | **Description** |
@@ -792,7 +996,7 @@ new Ec2Runner(scope: Construct, id: string, props: Ec2RunnerProps)
792
996
 
793
997
  ---
794
998
 
795
- ##### `props`<sup>Required</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.Initializer.parameter.props"></a>
999
+ ##### `props`<sup>Optional</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.Initializer.parameter.props"></a>
796
1000
 
797
1001
  - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProps">Ec2RunnerProps</a>
798
1002
 
@@ -969,7 +1173,7 @@ This construct is not meant to be used by itself. It should be passed in the pro
969
1173
  ```typescript
970
1174
  import { FargateRunner } from '@cloudsnorkel/cdk-github-runners'
971
1175
 
972
- new FargateRunner(scope: Construct, id: string, props: FargateRunnerProps)
1176
+ new FargateRunner(scope: Construct, id: string, props?: FargateRunnerProps)
973
1177
  ```
974
1178
 
975
1179
  | **Name** | **Type** | **Description** |
@@ -992,7 +1196,7 @@ new FargateRunner(scope: Construct, id: string, props: FargateRunnerProps)
992
1196
 
993
1197
  ---
994
1198
 
995
- ##### `props`<sup>Required</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.FargateRunner.Initializer.parameter.props"></a>
1199
+ ##### `props`<sup>Optional</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.FargateRunner.Initializer.parameter.props"></a>
996
1200
 
997
1201
  - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps">FargateRunnerProps</a>
998
1202
 
@@ -1430,6 +1634,7 @@ Any object.
1430
1634
  | <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
1431
1635
  | <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. |
1432
1636
  | <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. |
1637
+ | <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.* |
1433
1638
 
1434
1639
  ---
1435
1640
 
@@ -1469,6 +1674,16 @@ Secrets for GitHub communication including webhook secret and runner authenticat
1469
1674
 
1470
1675
  ---
1471
1676
 
1677
+ ##### `props`<sup>Optional</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.property.props"></a>
1678
+
1679
+ ```typescript
1680
+ public readonly props: GitHubRunnersProps;
1681
+ ```
1682
+
1683
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps">GitHubRunnersProps</a>
1684
+
1685
+ ---
1686
+
1472
1687
 
1473
1688
  ### ImageBuilderComponent <a name="ImageBuilderComponent" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent"></a>
1474
1689
 
@@ -1733,7 +1948,7 @@ This construct is not meant to be used by itself. It should be passed in the pro
1733
1948
  ```typescript
1734
1949
  import { LambdaRunner } from '@cloudsnorkel/cdk-github-runners'
1735
1950
 
1736
- new LambdaRunner(scope: Construct, id: string, props: LambdaRunnerProps)
1951
+ new LambdaRunner(scope: Construct, id: string, props?: LambdaRunnerProps)
1737
1952
  ```
1738
1953
 
1739
1954
  | **Name** | **Type** | **Description** |
@@ -1756,7 +1971,7 @@ new LambdaRunner(scope: Construct, id: string, props: LambdaRunnerProps)
1756
1971
 
1757
1972
  ---
1758
1973
 
1759
- ##### `props`<sup>Required</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.LambdaRunner.Initializer.parameter.props"></a>
1974
+ ##### `props`<sup>Optional</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.LambdaRunner.Initializer.parameter.props"></a>
1760
1975
 
1761
1976
  - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProps">LambdaRunnerProps</a>
1762
1977
 
@@ -2147,6 +2362,195 @@ Webhook secret used to confirm events are coming from GitHub and nowhere else.
2147
2362
 
2148
2363
  ## Structs <a name="Structs" id="Structs"></a>
2149
2364
 
2365
+ ### AmiBuilderProps <a name="AmiBuilderProps" id="@cloudsnorkel/cdk-github-runners.AmiBuilderProps"></a>
2366
+
2367
+ Properties for {@link AmiBuilder} construct.
2368
+
2369
+ #### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.AmiBuilderProps.Initializer"></a>
2370
+
2371
+ ```typescript
2372
+ import { AmiBuilderProps } from '@cloudsnorkel/cdk-github-runners'
2373
+
2374
+ const amiBuilderProps: AmiBuilderProps = { ... }
2375
+ ```
2376
+
2377
+ #### Properties <a name="Properties" id="Properties"></a>
2378
+
2379
+ | **Name** | **Type** | **Description** |
2380
+ | --- | --- | --- |
2381
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.architecture">architecture</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a></code> | Image architecture. |
2382
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.instanceType">instanceType</a></code> | <code>aws-cdk-lib.aws_ec2.InstanceType</code> | The instance type used to build the image. |
2383
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.logRemovalPolicy">logRemovalPolicy</a></code> | <code>aws-cdk-lib.RemovalPolicy</code> | Removal policy for logs of image builds. |
2384
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.logRetention">logRetention</a></code> | <code>aws-cdk-lib.aws_logs.RetentionDays</code> | The number of days log events are kept in CloudWatch Logs. |
2385
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.os">os</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a></code> | Image OS. |
2386
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.rebuildInterval">rebuildInterval</a></code> | <code>aws-cdk-lib.Duration</code> | Schedule the AMI to be rebuilt every given interval. |
2387
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.runnerVersion">runnerVersion</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerVersion">RunnerVersion</a></code> | Version of GitHub Runners to install. |
2388
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup</code> | Security group to assign to launched builder instances. |
2389
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.securityGroups">securityGroups</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup[]</code> | Security groups to assign to launched builder instances. |
2390
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.subnetSelection">subnetSelection</a></code> | <code>aws-cdk-lib.aws_ec2.SubnetSelection</code> | Where to place the network interfaces within the VPC. |
2391
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | VPC where builder instances will be launched. |
2392
+
2393
+ ---
2394
+
2395
+ ##### `architecture`<sup>Optional</sup> <a name="architecture" id="@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.architecture"></a>
2396
+
2397
+ ```typescript
2398
+ public readonly architecture: Architecture;
2399
+ ```
2400
+
2401
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a>
2402
+ - *Default:* Architecture.X86_64
2403
+
2404
+ Image architecture.
2405
+
2406
+ ---
2407
+
2408
+ ##### `instanceType`<sup>Optional</sup> <a name="instanceType" id="@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.instanceType"></a>
2409
+
2410
+ ```typescript
2411
+ public readonly instanceType: InstanceType;
2412
+ ```
2413
+
2414
+ - *Type:* aws-cdk-lib.aws_ec2.InstanceType
2415
+ - *Default:* m5.large
2416
+
2417
+ The instance type used to build the image.
2418
+
2419
+ ---
2420
+
2421
+ ##### `logRemovalPolicy`<sup>Optional</sup> <a name="logRemovalPolicy" id="@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.logRemovalPolicy"></a>
2422
+
2423
+ ```typescript
2424
+ public readonly logRemovalPolicy: RemovalPolicy;
2425
+ ```
2426
+
2427
+ - *Type:* aws-cdk-lib.RemovalPolicy
2428
+ - *Default:* RemovalPolicy.DESTROY
2429
+
2430
+ Removal policy for logs of image builds.
2431
+
2432
+ If deployment fails on the custom resource, try setting this to `RemovalPolicy.RETAIN`. This way the logs can still be viewed, and you can see why the build failed.
2433
+
2434
+ We try to not leave anything behind when removed. But sometimes a log staying behind is useful.
2435
+
2436
+ ---
2437
+
2438
+ ##### `logRetention`<sup>Optional</sup> <a name="logRetention" id="@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.logRetention"></a>
2439
+
2440
+ ```typescript
2441
+ public readonly logRetention: RetentionDays;
2442
+ ```
2443
+
2444
+ - *Type:* aws-cdk-lib.aws_logs.RetentionDays
2445
+ - *Default:* logs.RetentionDays.ONE_MONTH
2446
+
2447
+ The number of days log events are kept in CloudWatch Logs.
2448
+
2449
+ When updating
2450
+ this property, unsetting it doesn't remove the log retention policy. To
2451
+ remove the retention policy, set the value to `INFINITE`.
2452
+
2453
+ ---
2454
+
2455
+ ##### `os`<sup>Optional</sup> <a name="os" id="@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.os"></a>
2456
+
2457
+ ```typescript
2458
+ public readonly os: Os;
2459
+ ```
2460
+
2461
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a>
2462
+ - *Default:* OS.LINUX
2463
+
2464
+ Image OS.
2465
+
2466
+ ---
2467
+
2468
+ ##### `rebuildInterval`<sup>Optional</sup> <a name="rebuildInterval" id="@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.rebuildInterval"></a>
2469
+
2470
+ ```typescript
2471
+ public readonly rebuildInterval: Duration;
2472
+ ```
2473
+
2474
+ - *Type:* aws-cdk-lib.Duration
2475
+ - *Default:* Duration.days(7)
2476
+
2477
+ Schedule the AMI to be rebuilt every given interval.
2478
+
2479
+ Useful for keeping the AMI up-do-date with the latest GitHub runner version and latest OS updates.
2480
+
2481
+ Set to zero to disable.
2482
+
2483
+ ---
2484
+
2485
+ ##### `runnerVersion`<sup>Optional</sup> <a name="runnerVersion" id="@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.runnerVersion"></a>
2486
+
2487
+ ```typescript
2488
+ public readonly runnerVersion: RunnerVersion;
2489
+ ```
2490
+
2491
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerVersion">RunnerVersion</a>
2492
+ - *Default:* latest version available
2493
+
2494
+ Version of GitHub Runners to install.
2495
+
2496
+ ---
2497
+
2498
+ ##### ~~`securityGroup`~~<sup>Optional</sup> <a name="securityGroup" id="@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.securityGroup"></a>
2499
+
2500
+ - *Deprecated:* use {@link securityGroups}
2501
+
2502
+ ```typescript
2503
+ public readonly securityGroup: ISecurityGroup;
2504
+ ```
2505
+
2506
+ - *Type:* aws-cdk-lib.aws_ec2.ISecurityGroup
2507
+ - *Default:* new security group
2508
+
2509
+ Security group to assign to launched builder instances.
2510
+
2511
+ ---
2512
+
2513
+ ##### `securityGroups`<sup>Optional</sup> <a name="securityGroups" id="@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.securityGroups"></a>
2514
+
2515
+ ```typescript
2516
+ public readonly securityGroups: ISecurityGroup[];
2517
+ ```
2518
+
2519
+ - *Type:* aws-cdk-lib.aws_ec2.ISecurityGroup[]
2520
+ - *Default:* new security group
2521
+
2522
+ Security groups to assign to launched builder instances.
2523
+
2524
+ ---
2525
+
2526
+ ##### `subnetSelection`<sup>Optional</sup> <a name="subnetSelection" id="@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.subnetSelection"></a>
2527
+
2528
+ ```typescript
2529
+ public readonly subnetSelection: SubnetSelection;
2530
+ ```
2531
+
2532
+ - *Type:* aws-cdk-lib.aws_ec2.SubnetSelection
2533
+ - *Default:* default VPC subnet
2534
+
2535
+ Where to place the network interfaces within the VPC.
2536
+
2537
+ Only the first matched subnet will be used.
2538
+
2539
+ ---
2540
+
2541
+ ##### `vpc`<sup>Optional</sup> <a name="vpc" id="@cloudsnorkel/cdk-github-runners.AmiBuilderProps.property.vpc"></a>
2542
+
2543
+ ```typescript
2544
+ public readonly vpc: IVpc;
2545
+ ```
2546
+
2547
+ - *Type:* aws-cdk-lib.aws_ec2.IVpc
2548
+ - *Default:* default account VPC
2549
+
2550
+ VPC where builder instances will be launched.
2551
+
2552
+ ---
2553
+
2150
2554
  ### CodeBuildImageBuilderProps <a name="CodeBuildImageBuilderProps" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps"></a>
2151
2555
 
2152
2556
  Properties for CodeBuildImageBuilder construct.
@@ -3135,7 +3539,7 @@ Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available c
3135
3539
 
3136
3540
  ##### ~~`securityGroup`~~<sup>Optional</sup> <a name="securityGroup" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.securityGroup"></a>
3137
3541
 
3138
- - *Deprecated:* use {@link securityGroupss}
3542
+ - *Deprecated:* use {@link securityGroups}
3139
3543
 
3140
3544
  ```typescript
3141
3545
  public readonly securityGroup: ISecurityGroup;
@@ -4131,6 +4535,7 @@ new LinuxUbuntuComponents()
4131
4535
  | --- | --- |
4132
4536
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LinuxUbuntuComponents.awsCli">awsCli</a></code> | *No description.* |
4133
4537
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LinuxUbuntuComponents.docker">docker</a></code> | *No description.* |
4538
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.LinuxUbuntuComponents.extraCertificates">extraCertificates</a></code> | *No description.* |
4134
4539
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LinuxUbuntuComponents.git">git</a></code> | *No description.* |
4135
4540
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LinuxUbuntuComponents.githubCli">githubCli</a></code> | *No description.* |
4136
4541
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LinuxUbuntuComponents.githubRunner">githubRunner</a></code> | *No description.* |
@@ -4191,6 +4596,32 @@ LinuxUbuntuComponents.docker(scope: Construct, id: string, _architecture: Archit
4191
4596
 
4192
4597
  ---
4193
4598
 
4599
+ ##### `extraCertificates` <a name="extraCertificates" id="@cloudsnorkel/cdk-github-runners.LinuxUbuntuComponents.extraCertificates"></a>
4600
+
4601
+ ```typescript
4602
+ import { LinuxUbuntuComponents } from '@cloudsnorkel/cdk-github-runners'
4603
+
4604
+ LinuxUbuntuComponents.extraCertificates(scope: Construct, id: string, path: string)
4605
+ ```
4606
+
4607
+ ###### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.LinuxUbuntuComponents.extraCertificates.parameter.scope"></a>
4608
+
4609
+ - *Type:* constructs.Construct
4610
+
4611
+ ---
4612
+
4613
+ ###### `id`<sup>Required</sup> <a name="id" id="@cloudsnorkel/cdk-github-runners.LinuxUbuntuComponents.extraCertificates.parameter.id"></a>
4614
+
4615
+ - *Type:* string
4616
+
4617
+ ---
4618
+
4619
+ ###### `path`<sup>Required</sup> <a name="path" id="@cloudsnorkel/cdk-github-runners.LinuxUbuntuComponents.extraCertificates.parameter.path"></a>
4620
+
4621
+ - *Type:* string
4622
+
4623
+ ---
4624
+
4194
4625
  ##### `git` <a name="git" id="@cloudsnorkel/cdk-github-runners.LinuxUbuntuComponents.git"></a>
4195
4626
 
4196
4627
  ```typescript
@@ -4682,6 +5113,7 @@ new WindowsComponents()
4682
5113
  | <code><a href="#@cloudsnorkel/cdk-github-runners.WindowsComponents.awsCli">awsCli</a></code> | *No description.* |
4683
5114
  | <code><a href="#@cloudsnorkel/cdk-github-runners.WindowsComponents.cloudwatchAgent">cloudwatchAgent</a></code> | *No description.* |
4684
5115
  | <code><a href="#@cloudsnorkel/cdk-github-runners.WindowsComponents.docker">docker</a></code> | *No description.* |
5116
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.WindowsComponents.extraCertificates">extraCertificates</a></code> | *No description.* |
4685
5117
  | <code><a href="#@cloudsnorkel/cdk-github-runners.WindowsComponents.git">git</a></code> | *No description.* |
4686
5118
  | <code><a href="#@cloudsnorkel/cdk-github-runners.WindowsComponents.githubCli">githubCli</a></code> | *No description.* |
4687
5119
  | <code><a href="#@cloudsnorkel/cdk-github-runners.WindowsComponents.githubRunner">githubRunner</a></code> | *No description.* |
@@ -4748,6 +5180,32 @@ WindowsComponents.docker(scope: Construct, id: string)
4748
5180
 
4749
5181
  ---
4750
5182
 
5183
+ ##### `extraCertificates` <a name="extraCertificates" id="@cloudsnorkel/cdk-github-runners.WindowsComponents.extraCertificates"></a>
5184
+
5185
+ ```typescript
5186
+ import { WindowsComponents } from '@cloudsnorkel/cdk-github-runners'
5187
+
5188
+ WindowsComponents.extraCertificates(scope: Construct, id: string, path: string)
5189
+ ```
5190
+
5191
+ ###### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.WindowsComponents.extraCertificates.parameter.scope"></a>
5192
+
5193
+ - *Type:* constructs.Construct
5194
+
5195
+ ---
5196
+
5197
+ ###### `id`<sup>Required</sup> <a name="id" id="@cloudsnorkel/cdk-github-runners.WindowsComponents.extraCertificates.parameter.id"></a>
5198
+
5199
+ - *Type:* string
5200
+
5201
+ ---
5202
+
5203
+ ###### `path`<sup>Required</sup> <a name="path" id="@cloudsnorkel/cdk-github-runners.WindowsComponents.extraCertificates.parameter.path"></a>
5204
+
5205
+ - *Type:* string
5206
+
5207
+ ---
5208
+
4751
5209
  ##### `git` <a name="git" id="@cloudsnorkel/cdk-github-runners.WindowsComponents.git"></a>
4752
5210
 
4753
5211
  ```typescript
@@ -4820,7 +5278,7 @@ WindowsComponents.githubRunner(scope: Construct, id: string, runnerVersion: Runn
4820
5278
 
4821
5279
  ### IAmiBuilder <a name="IAmiBuilder" id="@cloudsnorkel/cdk-github-runners.IAmiBuilder"></a>
4822
5280
 
4823
- - *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.IAmiBuilder">IAmiBuilder</a>
5281
+ - *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder">AmiBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.IAmiBuilder">IAmiBuilder</a>
4824
5282
 
4825
5283
  Interface for constructs that build an AMI that can be used in {@link IRunnerProvider}.
4826
5284
 
package/lib/index.d.ts CHANGED
@@ -1,13 +1,3 @@
1
- export { Secrets } from './secrets';
2
- export { GitHubRunners, GitHubRunnersProps } from './runner';
3
- export { CodeBuildRunner, CodeBuildRunnerProps } from './providers/codebuild';
4
- export { Ec2Runner, Ec2RunnerProps } from './providers/ec2';
5
- export { LambdaRunner, LambdaRunnerProps } from './providers/lambda';
6
- export { FargateRunner, FargateRunnerProps } from './providers/fargate';
7
- export { IRunnerProvider, RunnerProviderProps, RunnerVersion, RunnerRuntimeParameters, RunnerAmi, RunnerImage, IAmiBuilder, IImageBuilder, IRunnerProviderStatus, IRunnerImageStatus, IRunnerAmiStatus, Architecture, Os } from './providers/common';
8
- export { CodeBuildImageBuilder, CodeBuildImageBuilderProps } from './providers/image-builders/codebuild';
9
- export { ImageBuilderComponent, ImageBuilderComponentProperties, ImageBuilderAsset } from './providers/image-builders/common';
10
- export { ContainerImageBuilder, ContainerImageBuilderProps } from './providers/image-builders/container';
11
- export { WindowsComponents } from './providers/image-builders/windows-components';
12
- export { LinuxUbuntuComponents } from './providers/image-builders/linux-components';
13
- export { StaticRunnerImage } from './providers/image-builders/static';
1
+ export * from './secrets';
2
+ export * from './runner';
3
+ export * from './providers';
package/lib/index.js CHANGED
@@ -1,31 +1,16 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
11
+ };
2
12
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var secrets_1 = require("./secrets");
4
- Object.defineProperty(exports, "Secrets", { enumerable: true, get: function () { return secrets_1.Secrets; } });
5
- var runner_1 = require("./runner");
6
- Object.defineProperty(exports, "GitHubRunners", { enumerable: true, get: function () { return runner_1.GitHubRunners; } });
7
- var codebuild_1 = require("./providers/codebuild");
8
- Object.defineProperty(exports, "CodeBuildRunner", { enumerable: true, get: function () { return codebuild_1.CodeBuildRunner; } });
9
- var ec2_1 = require("./providers/ec2");
10
- Object.defineProperty(exports, "Ec2Runner", { enumerable: true, get: function () { return ec2_1.Ec2Runner; } });
11
- var lambda_1 = require("./providers/lambda");
12
- Object.defineProperty(exports, "LambdaRunner", { enumerable: true, get: function () { return lambda_1.LambdaRunner; } });
13
- var fargate_1 = require("./providers/fargate");
14
- Object.defineProperty(exports, "FargateRunner", { enumerable: true, get: function () { return fargate_1.FargateRunner; } });
15
- var common_1 = require("./providers/common");
16
- Object.defineProperty(exports, "RunnerVersion", { enumerable: true, get: function () { return common_1.RunnerVersion; } });
17
- Object.defineProperty(exports, "Architecture", { enumerable: true, get: function () { return common_1.Architecture; } });
18
- Object.defineProperty(exports, "Os", { enumerable: true, get: function () { return common_1.Os; } });
19
- var codebuild_2 = require("./providers/image-builders/codebuild");
20
- Object.defineProperty(exports, "CodeBuildImageBuilder", { enumerable: true, get: function () { return codebuild_2.CodeBuildImageBuilder; } });
21
- var common_2 = require("./providers/image-builders/common");
22
- Object.defineProperty(exports, "ImageBuilderComponent", { enumerable: true, get: function () { return common_2.ImageBuilderComponent; } });
23
- var container_1 = require("./providers/image-builders/container");
24
- Object.defineProperty(exports, "ContainerImageBuilder", { enumerable: true, get: function () { return container_1.ContainerImageBuilder; } });
25
- var windows_components_1 = require("./providers/image-builders/windows-components");
26
- Object.defineProperty(exports, "WindowsComponents", { enumerable: true, get: function () { return windows_components_1.WindowsComponents; } });
27
- var linux_components_1 = require("./providers/image-builders/linux-components");
28
- Object.defineProperty(exports, "LinuxUbuntuComponents", { enumerable: true, get: function () { return linux_components_1.LinuxUbuntuComponents; } });
29
- var static_1 = require("./providers/image-builders/static");
30
- Object.defineProperty(exports, "StaticRunnerImage", { enumerable: true, get: function () { return static_1.StaticRunnerImage; } });
31
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxxQ0FBb0M7QUFBM0Isa0dBQUEsT0FBTyxPQUFBO0FBQ2hCLG1DQUE2RDtBQUFwRCx1R0FBQSxhQUFhLE9BQUE7QUFDdEIsbURBQThFO0FBQXJFLDRHQUFBLGVBQWUsT0FBQTtBQUN4Qix1Q0FBNEQ7QUFBbkQsZ0dBQUEsU0FBUyxPQUFBO0FBQ2xCLDZDQUFxRTtBQUE1RCxzR0FBQSxZQUFZLE9BQUE7QUFDckIsK0NBQXdFO0FBQS9ELHdHQUFBLGFBQWEsT0FBQTtBQUN0Qiw2Q0FBcVA7QUFBdE0sdUdBQUEsYUFBYSxPQUFBO0FBQTRJLHNHQUFBLFlBQVksT0FBQTtBQUFFLDRGQUFBLEVBQUUsT0FBQTtBQUN4TixrRUFBeUc7QUFBaEcsa0hBQUEscUJBQXFCLE9BQUE7QUFDOUIsNERBQThIO0FBQXJILCtHQUFBLHFCQUFxQixPQUFBO0FBQzlCLGtFQUF5RztBQUFoRyxrSEFBQSxxQkFBcUIsT0FBQTtBQUM5QixvRkFBa0Y7QUFBekUsdUhBQUEsaUJBQWlCLE9BQUE7QUFDMUIsZ0ZBQW9GO0FBQTNFLHlIQUFBLHFCQUFxQixPQUFBO0FBQzlCLDREQUFzRTtBQUE3RCwyR0FBQSxpQkFBaUIsT0FBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IFNlY3JldHMgfSBmcm9tICcuL3NlY3JldHMnO1xuZXhwb3J0IHsgR2l0SHViUnVubmVycywgR2l0SHViUnVubmVyc1Byb3BzIH0gZnJvbSAnLi9ydW5uZXInO1xuZXhwb3J0IHsgQ29kZUJ1aWxkUnVubmVyLCBDb2RlQnVpbGRSdW5uZXJQcm9wcyB9IGZyb20gJy4vcHJvdmlkZXJzL2NvZGVidWlsZCc7XG5leHBvcnQgeyBFYzJSdW5uZXIsIEVjMlJ1bm5lclByb3BzIH0gZnJvbSAnLi9wcm92aWRlcnMvZWMyJztcbmV4cG9ydCB7IExhbWJkYVJ1bm5lciwgTGFtYmRhUnVubmVyUHJvcHMgfSBmcm9tICcuL3Byb3ZpZGVycy9sYW1iZGEnO1xuZXhwb3J0IHsgRmFyZ2F0ZVJ1bm5lciwgRmFyZ2F0ZVJ1bm5lclByb3BzIH0gZnJvbSAnLi9wcm92aWRlcnMvZmFyZ2F0ZSc7XG5leHBvcnQgeyBJUnVubmVyUHJvdmlkZXIsIFJ1bm5lclByb3ZpZGVyUHJvcHMsIFJ1bm5lclZlcnNpb24sIFJ1bm5lclJ1bnRpbWVQYXJhbWV0ZXJzLCBSdW5uZXJBbWksIFJ1bm5lckltYWdlLCBJQW1pQnVpbGRlciwgSUltYWdlQnVpbGRlciwgSVJ1bm5lclByb3ZpZGVyU3RhdHVzLCBJUnVubmVySW1hZ2VTdGF0dXMsIElSdW5uZXJBbWlTdGF0dXMsIEFyY2hpdGVjdHVyZSwgT3MgfSBmcm9tICcuL3Byb3ZpZGVycy9jb21tb24nO1xuZXhwb3J0IHsgQ29kZUJ1aWxkSW1hZ2VCdWlsZGVyLCBDb2RlQnVpbGRJbWFnZUJ1aWxkZXJQcm9wcyB9IGZyb20gJy4vcHJvdmlkZXJzL2ltYWdlLWJ1aWxkZXJzL2NvZGVidWlsZCc7XG5leHBvcnQgeyBJbWFnZUJ1aWxkZXJDb21wb25lbnQsIEltYWdlQnVpbGRlckNvbXBvbmVudFByb3BlcnRpZXMsIEltYWdlQnVpbGRlckFzc2V0IH0gZnJvbSAnLi9wcm92aWRlcnMvaW1hZ2UtYnVpbGRlcnMvY29tbW9uJztcbmV4cG9ydCB7IENvbnRhaW5lckltYWdlQnVpbGRlciwgQ29udGFpbmVySW1hZ2VCdWlsZGVyUHJvcHMgfSBmcm9tICcuL3Byb3ZpZGVycy9pbWFnZS1idWlsZGVycy9jb250YWluZXInO1xuZXhwb3J0IHsgV2luZG93c0NvbXBvbmVudHMgfSBmcm9tICcuL3Byb3ZpZGVycy9pbWFnZS1idWlsZGVycy93aW5kb3dzLWNvbXBvbmVudHMnO1xuZXhwb3J0IHsgTGludXhVYnVudHVDb21wb25lbnRzIH0gZnJvbSAnLi9wcm92aWRlcnMvaW1hZ2UtYnVpbGRlcnMvbGludXgtY29tcG9uZW50cyc7XG5leHBvcnQgeyBTdGF0aWNSdW5uZXJJbWFnZSB9IGZyb20gJy4vcHJvdmlkZXJzL2ltYWdlLWJ1aWxkZXJzL3N0YXRpYyc7XG4iXX0=
13
+ __exportStar(require("./secrets"), exports);
14
+ __exportStar(require("./runner"), exports);
15
+ __exportStar(require("./providers"), exports);
16
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEsNENBQTBCO0FBQzFCLDJDQUF5QjtBQUN6Qiw4Q0FBNEIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3NlY3JldHMnO1xuZXhwb3J0ICogZnJvbSAnLi9ydW5uZXInO1xuZXhwb3J0ICogZnJvbSAnLi9wcm92aWRlcnMnO1xuIl19