@cloudsnorkel/cdk-github-runners 0.11.6 → 0.12.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 +1 -2
- package/.jsii +394 -186
- package/API.md +167 -27
- package/README.md +10 -20
- package/assets/delete-failed-runner.lambda/index.js +5 -3713
- package/assets/idle-runner-repear.lambda/index.js +5 -3713
- package/assets/image-builders/aws-image-builder/delete-ami.lambda/index.js +3 -22
- package/assets/image-builders/aws-image-builder/versioner.lambda/index.js +2 -2
- package/assets/{providers → image-builders}/build-image.lambda/index.js +2 -14
- package/assets/setup.lambda/index.js +3 -3711
- package/assets/status.lambda/index.js +5 -3713
- package/assets/token-retriever.lambda/index.js +5 -3713
- package/assets/webhook-handler.lambda/index.js +5 -3713
- package/lib/access.js +1 -1
- package/lib/image-builders/api.d.ts +2 -2
- package/lib/image-builders/api.js +6 -6
- package/lib/image-builders/aws-image-builder/ami.d.ts +1 -0
- package/lib/image-builders/aws-image-builder/ami.js +9 -9
- package/lib/image-builders/aws-image-builder/builder.d.ts +1 -2
- package/lib/image-builders/aws-image-builder/builder.js +128 -74
- package/lib/image-builders/aws-image-builder/common.d.ts +1 -1
- package/lib/image-builders/aws-image-builder/common.js +2 -2
- package/lib/image-builders/aws-image-builder/container.d.ts +2 -1
- package/lib/image-builders/aws-image-builder/container.js +14 -14
- package/lib/image-builders/aws-image-builder/delete-ami.lambda.d.ts +1 -8
- package/lib/image-builders/aws-image-builder/delete-ami.lambda.js +5 -27
- package/lib/image-builders/aws-image-builder/deprecated/ami.js +1 -1
- package/lib/image-builders/aws-image-builder/deprecated/container.js +4 -3
- package/lib/image-builders/aws-image-builder/deprecated/linux-components.js +1 -1
- package/lib/image-builders/aws-image-builder/deprecated/windows-components.js +1 -1
- package/lib/{providers → image-builders}/build-image-function.d.ts +1 -1
- package/lib/image-builders/build-image-function.js +23 -0
- package/lib/image-builders/build-image.lambda.js +80 -0
- package/lib/image-builders/codebuild-deprecated.js +4 -3
- package/lib/image-builders/codebuild.js +4 -7
- package/lib/image-builders/common.d.ts +18 -9
- package/lib/image-builders/common.js +1 -11
- package/lib/image-builders/components.d.ts +2 -2
- package/lib/image-builders/components.js +2 -2
- package/lib/image-builders/static.js +1 -1
- package/lib/providers/codebuild.d.ts +9 -3
- package/lib/providers/codebuild.js +10 -4
- package/lib/providers/common.js +3 -3
- package/lib/providers/ec2.d.ts +9 -3
- package/lib/providers/ec2.js +10 -4
- package/lib/providers/ecs.d.ts +9 -3
- package/lib/providers/ecs.js +9 -3
- package/lib/providers/fargate.d.ts +9 -3
- package/lib/providers/fargate.js +10 -4
- package/lib/providers/lambda.d.ts +9 -3
- package/lib/providers/lambda.js +10 -4
- package/lib/runner.js +3 -3
- package/lib/secrets.js +1 -1
- package/package.json +22 -26
- package/assets/image-builders/aws-image-builder/reaper.lambda/index.js +0 -165
- package/lib/image-builders/aws-image-builder/reaper-function.d.ts +0 -13
- package/lib/image-builders/aws-image-builder/reaper-function.js +0 -23
- package/lib/image-builders/aws-image-builder/reaper.lambda.d.ts +0 -9
- package/lib/image-builders/aws-image-builder/reaper.lambda.js +0 -151
- package/lib/providers/build-image-function.js +0 -23
- package/lib/providers/build-image.lambda.js +0 -92
- /package/lib/{providers → image-builders}/build-image.lambda.d.ts +0 -0
package/API.md
CHANGED
|
@@ -631,7 +631,7 @@ Also gives the status function any needed permissions to query the Docker image
|
|
|
631
631
|
| **Name** | **Description** |
|
|
632
632
|
| --- | --- |
|
|
633
633
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
634
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.imageBuilder">imageBuilder</a></code> | Create new image builder that builds CodeBuild specific runner images
|
|
634
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.imageBuilder">imageBuilder</a></code> | Create new image builder that builds CodeBuild specific runner images. |
|
|
635
635
|
|
|
636
636
|
---
|
|
637
637
|
|
|
@@ -661,7 +661,13 @@ import { CodeBuildRunner } from '@cloudsnorkel/cdk-github-runners'
|
|
|
661
661
|
CodeBuildRunner.imageBuilder(scope: Construct, id: string, props?: RunnerImageBuilderProps)
|
|
662
662
|
```
|
|
663
663
|
|
|
664
|
-
Create new image builder that builds CodeBuild specific runner images
|
|
664
|
+
Create new image builder that builds CodeBuild specific runner images.
|
|
665
|
+
|
|
666
|
+
You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
|
|
667
|
+
|
|
668
|
+
You can add components to the image builder by calling `imageBuilder.addComponent()`.
|
|
669
|
+
|
|
670
|
+
The default OS is Ubuntu running on x64 architecture.
|
|
665
671
|
|
|
666
672
|
Included components:
|
|
667
673
|
* `RunnerImageComponent.requiredPackages()`
|
|
@@ -997,7 +1003,7 @@ Also gives the status function any needed permissions to query the Docker image
|
|
|
997
1003
|
| **Name** | **Description** |
|
|
998
1004
|
| --- | --- |
|
|
999
1005
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
1000
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.imageBuilder">imageBuilder</a></code> | Create new image builder that builds CodeBuild specific runner images
|
|
1006
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.imageBuilder">imageBuilder</a></code> | Create new image builder that builds CodeBuild specific runner images. |
|
|
1001
1007
|
|
|
1002
1008
|
---
|
|
1003
1009
|
|
|
@@ -1027,7 +1033,13 @@ import { CodeBuildRunnerProvider } from '@cloudsnorkel/cdk-github-runners'
|
|
|
1027
1033
|
CodeBuildRunnerProvider.imageBuilder(scope: Construct, id: string, props?: RunnerImageBuilderProps)
|
|
1028
1034
|
```
|
|
1029
1035
|
|
|
1030
|
-
Create new image builder that builds CodeBuild specific runner images
|
|
1036
|
+
Create new image builder that builds CodeBuild specific runner images.
|
|
1037
|
+
|
|
1038
|
+
You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
|
|
1039
|
+
|
|
1040
|
+
You can add components to the image builder by calling `imageBuilder.addComponent()`.
|
|
1041
|
+
|
|
1042
|
+
The default OS is Ubuntu running on x64 architecture.
|
|
1031
1043
|
|
|
1032
1044
|
Included components:
|
|
1033
1045
|
* `RunnerImageComponent.requiredPackages()`
|
|
@@ -1566,7 +1578,7 @@ Also gives the status function any needed permissions to query the Docker image
|
|
|
1566
1578
|
| **Name** | **Description** |
|
|
1567
1579
|
| --- | --- |
|
|
1568
1580
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
1569
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.imageBuilder">imageBuilder</a></code> | Create new image builder that builds EC2 specific runner images
|
|
1581
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.imageBuilder">imageBuilder</a></code> | Create new image builder that builds EC2 specific runner images. |
|
|
1570
1582
|
|
|
1571
1583
|
---
|
|
1572
1584
|
|
|
@@ -1596,7 +1608,13 @@ import { Ec2Runner } from '@cloudsnorkel/cdk-github-runners'
|
|
|
1596
1608
|
Ec2Runner.imageBuilder(scope: Construct, id: string, props?: RunnerImageBuilderProps)
|
|
1597
1609
|
```
|
|
1598
1610
|
|
|
1599
|
-
Create new image builder that builds EC2 specific runner images
|
|
1611
|
+
Create new image builder that builds EC2 specific runner images.
|
|
1612
|
+
|
|
1613
|
+
You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
|
|
1614
|
+
|
|
1615
|
+
You can add components to the image builder by calling `imageBuilder.addComponent()`.
|
|
1616
|
+
|
|
1617
|
+
The default OS is Ubuntu running on x64 architecture.
|
|
1600
1618
|
|
|
1601
1619
|
Included components:
|
|
1602
1620
|
* `RunnerImageComponent.requiredPackages()`
|
|
@@ -1842,7 +1860,7 @@ Also gives the status function any needed permissions to query the Docker image
|
|
|
1842
1860
|
| **Name** | **Description** |
|
|
1843
1861
|
| --- | --- |
|
|
1844
1862
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
1845
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.imageBuilder">imageBuilder</a></code> | Create new image builder that builds EC2 specific runner images
|
|
1863
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.imageBuilder">imageBuilder</a></code> | Create new image builder that builds EC2 specific runner images. |
|
|
1846
1864
|
|
|
1847
1865
|
---
|
|
1848
1866
|
|
|
@@ -1872,7 +1890,13 @@ import { Ec2RunnerProvider } from '@cloudsnorkel/cdk-github-runners'
|
|
|
1872
1890
|
Ec2RunnerProvider.imageBuilder(scope: Construct, id: string, props?: RunnerImageBuilderProps)
|
|
1873
1891
|
```
|
|
1874
1892
|
|
|
1875
|
-
Create new image builder that builds EC2 specific runner images
|
|
1893
|
+
Create new image builder that builds EC2 specific runner images.
|
|
1894
|
+
|
|
1895
|
+
You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
|
|
1896
|
+
|
|
1897
|
+
You can add components to the image builder by calling `imageBuilder.addComponent()`.
|
|
1898
|
+
|
|
1899
|
+
The default OS is Ubuntu running on x64 architecture.
|
|
1876
1900
|
|
|
1877
1901
|
Included components:
|
|
1878
1902
|
* `RunnerImageComponent.requiredPackages()`
|
|
@@ -2110,7 +2134,7 @@ Also gives the status function any needed permissions to query the Docker image
|
|
|
2110
2134
|
| **Name** | **Description** |
|
|
2111
2135
|
| --- | --- |
|
|
2112
2136
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
2113
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.imageBuilder">imageBuilder</a></code> | Create new image builder that builds ECS specific runner images
|
|
2137
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.imageBuilder">imageBuilder</a></code> | Create new image builder that builds ECS specific runner images. |
|
|
2114
2138
|
|
|
2115
2139
|
---
|
|
2116
2140
|
|
|
@@ -2140,7 +2164,13 @@ import { EcsRunnerProvider } from '@cloudsnorkel/cdk-github-runners'
|
|
|
2140
2164
|
EcsRunnerProvider.imageBuilder(scope: Construct, id: string, props?: RunnerImageBuilderProps)
|
|
2141
2165
|
```
|
|
2142
2166
|
|
|
2143
|
-
Create new image builder that builds ECS specific runner images
|
|
2167
|
+
Create new image builder that builds ECS specific runner images.
|
|
2168
|
+
|
|
2169
|
+
You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
|
|
2170
|
+
|
|
2171
|
+
You can add components to the image builder by calling `imageBuilder.addComponent()`.
|
|
2172
|
+
|
|
2173
|
+
The default OS is Ubuntu running on x64 architecture.
|
|
2144
2174
|
|
|
2145
2175
|
Included components:
|
|
2146
2176
|
* `RunnerImageComponent.requiredPackages()`
|
|
@@ -2368,7 +2398,7 @@ Also gives the status function any needed permissions to query the Docker image
|
|
|
2368
2398
|
| **Name** | **Description** |
|
|
2369
2399
|
| --- | --- |
|
|
2370
2400
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
2371
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.imageBuilder">imageBuilder</a></code> | Create new image builder that builds Fargate specific runner images
|
|
2401
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.imageBuilder">imageBuilder</a></code> | Create new image builder that builds Fargate specific runner images. |
|
|
2372
2402
|
|
|
2373
2403
|
---
|
|
2374
2404
|
|
|
@@ -2398,7 +2428,13 @@ import { FargateRunner } from '@cloudsnorkel/cdk-github-runners'
|
|
|
2398
2428
|
FargateRunner.imageBuilder(scope: Construct, id: string, props?: RunnerImageBuilderProps)
|
|
2399
2429
|
```
|
|
2400
2430
|
|
|
2401
|
-
Create new image builder that builds Fargate specific runner images
|
|
2431
|
+
Create new image builder that builds Fargate specific runner images.
|
|
2432
|
+
|
|
2433
|
+
You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
|
|
2434
|
+
|
|
2435
|
+
You can add components to the image builder by calling `imageBuilder.addComponent()`.
|
|
2436
|
+
|
|
2437
|
+
The default OS is Ubuntu running on x64 architecture.
|
|
2402
2438
|
|
|
2403
2439
|
Included components:
|
|
2404
2440
|
* `RunnerImageComponent.requiredPackages()`
|
|
@@ -2815,7 +2851,7 @@ Also gives the status function any needed permissions to query the Docker image
|
|
|
2815
2851
|
| **Name** | **Description** |
|
|
2816
2852
|
| --- | --- |
|
|
2817
2853
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
2818
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.imageBuilder">imageBuilder</a></code> | Create new image builder that builds Fargate specific runner images
|
|
2854
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.imageBuilder">imageBuilder</a></code> | Create new image builder that builds Fargate specific runner images. |
|
|
2819
2855
|
|
|
2820
2856
|
---
|
|
2821
2857
|
|
|
@@ -2845,7 +2881,13 @@ import { FargateRunnerProvider } from '@cloudsnorkel/cdk-github-runners'
|
|
|
2845
2881
|
FargateRunnerProvider.imageBuilder(scope: Construct, id: string, props?: RunnerImageBuilderProps)
|
|
2846
2882
|
```
|
|
2847
2883
|
|
|
2848
|
-
Create new image builder that builds Fargate specific runner images
|
|
2884
|
+
Create new image builder that builds Fargate specific runner images.
|
|
2885
|
+
|
|
2886
|
+
You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
|
|
2887
|
+
|
|
2888
|
+
You can add components to the image builder by calling `imageBuilder.addComponent()`.
|
|
2889
|
+
|
|
2890
|
+
The default OS is Ubuntu running on x64 architecture.
|
|
2849
2891
|
|
|
2850
2892
|
Included components:
|
|
2851
2893
|
* `RunnerImageComponent.requiredPackages()`
|
|
@@ -3798,7 +3840,7 @@ Also gives the status function any needed permissions to query the Docker image
|
|
|
3798
3840
|
| **Name** | **Description** |
|
|
3799
3841
|
| --- | --- |
|
|
3800
3842
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
3801
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.imageBuilder">imageBuilder</a></code> | Create new image builder that builds Lambda specific runner images
|
|
3843
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.imageBuilder">imageBuilder</a></code> | Create new image builder that builds Lambda specific runner images. |
|
|
3802
3844
|
|
|
3803
3845
|
---
|
|
3804
3846
|
|
|
@@ -3828,7 +3870,13 @@ import { LambdaRunner } from '@cloudsnorkel/cdk-github-runners'
|
|
|
3828
3870
|
LambdaRunner.imageBuilder(scope: Construct, id: string, props?: RunnerImageBuilderProps)
|
|
3829
3871
|
```
|
|
3830
3872
|
|
|
3831
|
-
Create new image builder that builds Lambda specific runner images
|
|
3873
|
+
Create new image builder that builds Lambda specific runner images.
|
|
3874
|
+
|
|
3875
|
+
You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
|
|
3876
|
+
|
|
3877
|
+
You can add components to the image builder by calling `imageBuilder.addComponent()`.
|
|
3878
|
+
|
|
3879
|
+
The default OS is Amazon Linux 2 running on x64 architecture.
|
|
3832
3880
|
|
|
3833
3881
|
Included components:
|
|
3834
3882
|
* `RunnerImageComponent.requiredPackages()`
|
|
@@ -4158,7 +4206,7 @@ Also gives the status function any needed permissions to query the Docker image
|
|
|
4158
4206
|
| **Name** | **Description** |
|
|
4159
4207
|
| --- | --- |
|
|
4160
4208
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
4161
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.imageBuilder">imageBuilder</a></code> | Create new image builder that builds Lambda specific runner images
|
|
4209
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.imageBuilder">imageBuilder</a></code> | Create new image builder that builds Lambda specific runner images. |
|
|
4162
4210
|
|
|
4163
4211
|
---
|
|
4164
4212
|
|
|
@@ -4188,7 +4236,13 @@ import { LambdaRunnerProvider } from '@cloudsnorkel/cdk-github-runners'
|
|
|
4188
4236
|
LambdaRunnerProvider.imageBuilder(scope: Construct, id: string, props?: RunnerImageBuilderProps)
|
|
4189
4237
|
```
|
|
4190
4238
|
|
|
4191
|
-
Create new image builder that builds Lambda specific runner images
|
|
4239
|
+
Create new image builder that builds Lambda specific runner images.
|
|
4240
|
+
|
|
4241
|
+
You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
|
|
4242
|
+
|
|
4243
|
+
You can add components to the image builder by calling `imageBuilder.addComponent()`.
|
|
4244
|
+
|
|
4245
|
+
The default OS is Amazon Linux 2 running on x64 architecture.
|
|
4192
4246
|
|
|
4193
4247
|
Included components:
|
|
4194
4248
|
* `RunnerImageComponent.requiredPackages()`
|
|
@@ -4385,7 +4439,7 @@ Available build arguments that can be set in the image builder:
|
|
|
4385
4439
|
|
|
4386
4440
|
### RunnerImageBuilder <a name="RunnerImageBuilder" id="@cloudsnorkel/cdk-github-runners.RunnerImageBuilder"></a>
|
|
4387
4441
|
|
|
4388
|
-
- *Implements:*
|
|
4442
|
+
- *Implements:* <a href="#@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder">IConfigurableRunnerImageBuilder</a>
|
|
4389
4443
|
|
|
4390
4444
|
GitHub Runner image builder. Builds a Docker image or AMI with GitHub Runner and other requirements installed.
|
|
4391
4445
|
|
|
@@ -4461,8 +4515,6 @@ The component will be added to the end of the list of components.
|
|
|
4461
4515
|
|
|
4462
4516
|
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponent">RunnerImageComponent</a>
|
|
4463
4517
|
|
|
4464
|
-
component to add.
|
|
4465
|
-
|
|
4466
4518
|
---
|
|
4467
4519
|
|
|
4468
4520
|
##### `bindAmi` <a name="bindAmi" id="@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.bindAmi"></a>
|
|
@@ -4505,8 +4557,6 @@ Removal is done by component name. Multiple components with the same name will a
|
|
|
4505
4557
|
|
|
4506
4558
|
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponent">RunnerImageComponent</a>
|
|
4507
4559
|
|
|
4508
|
-
component to remove.
|
|
4509
|
-
|
|
4510
4560
|
---
|
|
4511
4561
|
|
|
4512
4562
|
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
@@ -7897,7 +7947,7 @@ const runnerImageComponentCustomProps: RunnerImageComponentCustomProps = { ... }
|
|
|
7897
7947
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponentCustomProps.property.assets">assets</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageAsset">RunnerImageAsset</a>[]</code> | Assets to copy into the built image. |
|
|
7898
7948
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponentCustomProps.property.commands">commands</a></code> | <code>string[]</code> | Commands to run in the built image. |
|
|
7899
7949
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponentCustomProps.property.dockerCommands">dockerCommands</a></code> | <code>string[]</code> | Docker commands to run in the built image. |
|
|
7900
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponentCustomProps.property.name">name</a></code> | <code>string</code> | Component name used for (1) image build logging and (2) identifier for {@link
|
|
7950
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponentCustomProps.property.name">name</a></code> | <code>string</code> | Component name used for (1) image build logging and (2) identifier for {@link IConfigurableRunnerImageBuilder.removeComponent }. |
|
|
7901
7951
|
|
|
7902
7952
|
---
|
|
7903
7953
|
|
|
@@ -7949,7 +7999,7 @@ public readonly name: string;
|
|
|
7949
7999
|
|
|
7950
8000
|
- *Type:* string
|
|
7951
8001
|
|
|
7952
|
-
Component name used for (1) image build logging and (2) identifier for {@link
|
|
8002
|
+
Component name used for (1) image build logging and (2) identifier for {@link IConfigurableRunnerImageBuilder.removeComponent }.
|
|
7953
8003
|
|
|
7954
8004
|
Name must only contain alphanumeric characters and dashes.
|
|
7955
8005
|
|
|
@@ -9046,7 +9096,7 @@ public readonly name: string;
|
|
|
9046
9096
|
|
|
9047
9097
|
Component name.
|
|
9048
9098
|
|
|
9049
|
-
Used to identify component in image build logs, and for {@link
|
|
9099
|
+
Used to identify component in image build logs, and for {@link IConfigurableRunnerImageBuilder.removeComponent }
|
|
9050
9100
|
|
|
9051
9101
|
---
|
|
9052
9102
|
|
|
@@ -9470,6 +9520,96 @@ WindowsComponents.githubRunner(scope: Construct, id: string, runnerVersion: Runn
|
|
|
9470
9520
|
|
|
9471
9521
|
## Protocols <a name="Protocols" id="Protocols"></a>
|
|
9472
9522
|
|
|
9523
|
+
### IConfigurableRunnerImageBuilder <a name="IConfigurableRunnerImageBuilder" id="@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder"></a>
|
|
9524
|
+
|
|
9525
|
+
- *Extends:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerImageBuilder">IRunnerImageBuilder</a>, aws-cdk-lib.aws_ec2.IConnectable, aws-cdk-lib.aws_iam.IGrantable
|
|
9526
|
+
|
|
9527
|
+
- *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerImageBuilder">RunnerImageBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder">IConfigurableRunnerImageBuilder</a>
|
|
9528
|
+
|
|
9529
|
+
Interface for constructs that build an image that can be used in {@link IRunnerProvider }.
|
|
9530
|
+
|
|
9531
|
+
The image can be configured by adding or removing components. The image builder can be configured by adding grants or allowing connections.
|
|
9532
|
+
|
|
9533
|
+
An image can be a Docker image or AMI.
|
|
9534
|
+
|
|
9535
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
9536
|
+
|
|
9537
|
+
| **Name** | **Description** |
|
|
9538
|
+
| --- | --- |
|
|
9539
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.addComponent">addComponent</a></code> | Add a component to the image builder. |
|
|
9540
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.removeComponent">removeComponent</a></code> | Remove a component from the image builder. |
|
|
9541
|
+
|
|
9542
|
+
---
|
|
9543
|
+
|
|
9544
|
+
##### `addComponent` <a name="addComponent" id="@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.addComponent"></a>
|
|
9545
|
+
|
|
9546
|
+
```typescript
|
|
9547
|
+
public addComponent(component: RunnerImageComponent): void
|
|
9548
|
+
```
|
|
9549
|
+
|
|
9550
|
+
Add a component to the image builder.
|
|
9551
|
+
|
|
9552
|
+
The component will be added to the end of the list of components.
|
|
9553
|
+
|
|
9554
|
+
###### `component`<sup>Required</sup> <a name="component" id="@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.addComponent.parameter.component"></a>
|
|
9555
|
+
|
|
9556
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponent">RunnerImageComponent</a>
|
|
9557
|
+
|
|
9558
|
+
component to add.
|
|
9559
|
+
|
|
9560
|
+
---
|
|
9561
|
+
|
|
9562
|
+
##### `removeComponent` <a name="removeComponent" id="@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.removeComponent"></a>
|
|
9563
|
+
|
|
9564
|
+
```typescript
|
|
9565
|
+
public removeComponent(component: RunnerImageComponent): void
|
|
9566
|
+
```
|
|
9567
|
+
|
|
9568
|
+
Remove a component from the image builder.
|
|
9569
|
+
|
|
9570
|
+
Removal is done by component name. Multiple components with the same name will all be removed.
|
|
9571
|
+
|
|
9572
|
+
###### `component`<sup>Required</sup> <a name="component" id="@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.removeComponent.parameter.component"></a>
|
|
9573
|
+
|
|
9574
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponent">RunnerImageComponent</a>
|
|
9575
|
+
|
|
9576
|
+
component to remove.
|
|
9577
|
+
|
|
9578
|
+
---
|
|
9579
|
+
|
|
9580
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
9581
|
+
|
|
9582
|
+
| **Name** | **Type** | **Description** |
|
|
9583
|
+
| --- | --- | --- |
|
|
9584
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.property.connections">connections</a></code> | <code>aws-cdk-lib.aws_ec2.Connections</code> | The network connections associated with this resource. |
|
|
9585
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.property.grantPrincipal">grantPrincipal</a></code> | <code>aws-cdk-lib.aws_iam.IPrincipal</code> | The principal to grant permissions to. |
|
|
9586
|
+
|
|
9587
|
+
---
|
|
9588
|
+
|
|
9589
|
+
##### `connections`<sup>Required</sup> <a name="connections" id="@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.property.connections"></a>
|
|
9590
|
+
|
|
9591
|
+
```typescript
|
|
9592
|
+
public readonly connections: Connections;
|
|
9593
|
+
```
|
|
9594
|
+
|
|
9595
|
+
- *Type:* aws-cdk-lib.aws_ec2.Connections
|
|
9596
|
+
|
|
9597
|
+
The network connections associated with this resource.
|
|
9598
|
+
|
|
9599
|
+
---
|
|
9600
|
+
|
|
9601
|
+
##### `grantPrincipal`<sup>Required</sup> <a name="grantPrincipal" id="@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.property.grantPrincipal"></a>
|
|
9602
|
+
|
|
9603
|
+
```typescript
|
|
9604
|
+
public readonly grantPrincipal: IPrincipal;
|
|
9605
|
+
```
|
|
9606
|
+
|
|
9607
|
+
- *Type:* aws-cdk-lib.aws_iam.IPrincipal
|
|
9608
|
+
|
|
9609
|
+
The principal to grant permissions to.
|
|
9610
|
+
|
|
9611
|
+
---
|
|
9612
|
+
|
|
9473
9613
|
### IRunnerAmiStatus <a name="IRunnerAmiStatus" id="@cloudsnorkel/cdk-github-runners.IRunnerAmiStatus"></a>
|
|
9474
9614
|
|
|
9475
9615
|
- *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerAmiStatus">IRunnerAmiStatus</a>
|
|
@@ -9512,7 +9652,7 @@ Log group name for the AMI builder where history of builds can be analyzed.
|
|
|
9512
9652
|
|
|
9513
9653
|
### IRunnerImageBuilder <a name="IRunnerImageBuilder" id="@cloudsnorkel/cdk-github-runners.IRunnerImageBuilder"></a>
|
|
9514
9654
|
|
|
9515
|
-
- *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder">AmiBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder">CodeBuildImageBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder">ContainerImageBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.RunnerImageBuilder">RunnerImageBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.IRunnerImageBuilder">IRunnerImageBuilder</a>
|
|
9655
|
+
- *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder">AmiBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder">CodeBuildImageBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder">ContainerImageBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.RunnerImageBuilder">RunnerImageBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder">IConfigurableRunnerImageBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.IRunnerImageBuilder">IRunnerImageBuilder</a>
|
|
9516
9656
|
|
|
9517
9657
|
Interface for constructs that build an image that can be used in {@link IRunnerProvider }.
|
|
9518
9658
|
|
package/README.md
CHANGED
|
@@ -179,19 +179,13 @@ new GitHubRunners(this, 'runners', {
|
|
|
179
179
|
Another way to customize runners is by modifying the image used to spin them up. The image contains the [runner][5], any required dependencies, and integration code with the provider. You may choose to customize this image by adding more packages, for example.
|
|
180
180
|
|
|
181
181
|
```typescript
|
|
182
|
-
const myBuilder =
|
|
183
|
-
dockerfilePath: FargateRunner.LINUX_X64_DOCKERFILE_PATH,
|
|
184
|
-
runnerVersion: RunnerVersion.specific('2.291.0'),
|
|
185
|
-
rebuildInterval: Duration.days(14),
|
|
186
|
-
});
|
|
182
|
+
const myBuilder = FargateRunnerProvider.imageBuilder(this, 'image builder');
|
|
187
183
|
myBuilder.addComponent(
|
|
188
|
-
RunnerImageComponent.custom({ commands: ['apt install -y nginx xz-utils'] })
|
|
184
|
+
RunnerImageComponent.custom({ commands: ['apt install -y nginx xz-utils'] }),
|
|
189
185
|
);
|
|
190
186
|
|
|
191
187
|
const myProvider = new FargateRunnerProvider(this, 'fargate runner', {
|
|
192
188
|
labels: ['customized-fargate'],
|
|
193
|
-
vpc: vpc,
|
|
194
|
-
securityGroups: [runnerSg],
|
|
195
189
|
imageBuilder: myBuilder,
|
|
196
190
|
});
|
|
197
191
|
|
|
@@ -219,24 +213,20 @@ Windows images can also be customized the same way.
|
|
|
219
213
|
const myWindowsBuilder = FargateRunnerProvider.imageBuilder(this, 'Windows image builder', {
|
|
220
214
|
architecture: Architecture.X86_64,
|
|
221
215
|
os: Os.WINDOWS,
|
|
222
|
-
runnerVersion: RunnerVersion.specific('2.291.0'),
|
|
223
|
-
rebuildInterval: Duration.days(14),
|
|
224
216
|
});
|
|
225
217
|
myWindowsBuilder.addComponent(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
218
|
+
RunnerImageComponent.custom({
|
|
219
|
+
name: 'Ninja',
|
|
220
|
+
commands: [
|
|
221
|
+
'Invoke-WebRequest -UseBasicParsing -Uri "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip" -OutFile ninja.zip',
|
|
222
|
+
'Expand-Archive ninja.zip -DestinationPath C:\\actions',
|
|
223
|
+
'del ninja.zip',
|
|
224
|
+
],
|
|
225
|
+
}),
|
|
234
226
|
);
|
|
235
227
|
|
|
236
228
|
const myProvider = new FargateRunnerProvider(this, 'fargate runner', {
|
|
237
229
|
labels: ['customized-windows-fargate'],
|
|
238
|
-
vpc: vpc,
|
|
239
|
-
securityGroups: [runnerSg],
|
|
240
230
|
imageBuilder: myWindowsBuilder,
|
|
241
231
|
});
|
|
242
232
|
|