@cloudsnorkel/cdk-github-runners 0.11.6 → 0.12.1

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.
Files changed (64) hide show
  1. package/.gitattributes +1 -2
  2. package/.jsii +485 -260
  3. package/API.md +182 -29
  4. package/README.md +10 -20
  5. package/assets/delete-failed-runner.lambda/index.js +171 -3879
  6. package/assets/docker-images/lambda/linux-x64/runner.sh +6 -0
  7. package/assets/idle-runner-repear.lambda/index.js +171 -3879
  8. package/assets/image-builders/aws-image-builder/delete-ami.lambda/index.js +3 -22
  9. package/assets/image-builders/aws-image-builder/versioner.lambda/index.js +56 -56
  10. package/assets/{providers → image-builders}/build-image.lambda/index.js +2 -14
  11. package/assets/setup.lambda/index.js +60 -3768
  12. package/assets/status.lambda/index.js +165 -3873
  13. package/assets/token-retriever.lambda/index.js +171 -3879
  14. package/assets/webhook-handler.lambda/index.js +171 -3879
  15. package/lib/access.js +1 -1
  16. package/lib/image-builders/api.d.ts +2 -2
  17. package/lib/image-builders/api.js +6 -6
  18. package/lib/image-builders/aws-image-builder/ami.d.ts +1 -0
  19. package/lib/image-builders/aws-image-builder/ami.js +9 -9
  20. package/lib/image-builders/aws-image-builder/builder.d.ts +1 -2
  21. package/lib/image-builders/aws-image-builder/builder.js +128 -74
  22. package/lib/image-builders/aws-image-builder/common.d.ts +1 -1
  23. package/lib/image-builders/aws-image-builder/common.js +2 -2
  24. package/lib/image-builders/aws-image-builder/container.d.ts +2 -1
  25. package/lib/image-builders/aws-image-builder/container.js +14 -14
  26. package/lib/image-builders/aws-image-builder/delete-ami.lambda.d.ts +1 -8
  27. package/lib/image-builders/aws-image-builder/delete-ami.lambda.js +5 -27
  28. package/lib/image-builders/aws-image-builder/deprecated/ami.js +1 -1
  29. package/lib/image-builders/aws-image-builder/deprecated/container.js +4 -3
  30. package/lib/image-builders/aws-image-builder/deprecated/linux-components.js +1 -1
  31. package/lib/image-builders/aws-image-builder/deprecated/windows-components.js +1 -1
  32. package/lib/{providers → image-builders}/build-image-function.d.ts +1 -1
  33. package/lib/image-builders/build-image-function.js +23 -0
  34. package/lib/image-builders/build-image.lambda.js +80 -0
  35. package/lib/image-builders/codebuild-deprecated.js +4 -3
  36. package/lib/image-builders/codebuild.js +5 -8
  37. package/lib/image-builders/common.d.ts +18 -9
  38. package/lib/image-builders/common.js +1 -11
  39. package/lib/image-builders/components.d.ts +2 -2
  40. package/lib/image-builders/components.js +34 -9
  41. package/lib/image-builders/static.js +1 -1
  42. package/lib/providers/codebuild.d.ts +9 -3
  43. package/lib/providers/codebuild.js +10 -4
  44. package/lib/providers/common.d.ts +4 -0
  45. package/lib/providers/common.js +8 -4
  46. package/lib/providers/ec2.d.ts +9 -3
  47. package/lib/providers/ec2.js +10 -4
  48. package/lib/providers/ecs.d.ts +9 -3
  49. package/lib/providers/ecs.js +10 -4
  50. package/lib/providers/fargate.d.ts +9 -3
  51. package/lib/providers/fargate.js +10 -4
  52. package/lib/providers/lambda.d.ts +10 -4
  53. package/lib/providers/lambda.js +15 -9
  54. package/lib/runner.js +3 -3
  55. package/lib/secrets.js +1 -1
  56. package/package.json +24 -28
  57. package/assets/image-builders/aws-image-builder/reaper.lambda/index.js +0 -165
  58. package/lib/image-builders/aws-image-builder/reaper-function.d.ts +0 -13
  59. package/lib/image-builders/aws-image-builder/reaper-function.js +0 -23
  60. package/lib/image-builders/aws-image-builder/reaper.lambda.d.ts +0 -9
  61. package/lib/image-builders/aws-image-builder/reaper.lambda.js +0 -151
  62. package/lib/providers/build-image-function.js +0 -23
  63. package/lib/providers/build-image.lambda.js +0 -92
  64. /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 using Ubuntu. |
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 using Ubuntu.
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 using Ubuntu. |
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 using Ubuntu.
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 using Ubuntu. |
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 using Ubuntu.
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 using Ubuntu. |
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 using Ubuntu.
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 using Ubuntu. |
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 using Ubuntu.
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 using Ubuntu. |
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 using Ubuntu.
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 using Ubuntu. |
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 using Ubuntu.
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 using Amazon Linux 2. |
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 using Amazon Linux 2.
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()`
@@ -3839,7 +3887,7 @@ Included components:
3839
3887
  * `RunnerImageComponent.githubRunner()`
3840
3888
  * `RunnerImageComponent.lambdaEntrypoint()`
3841
3889
 
3842
- Base Docker image: `public.ecr.aws/lambda/nodejs:16-x86_64` or `public.ecr.aws/lambda/nodejs:16-arm64`
3890
+ Base Docker image: `public.ecr.aws/lambda/nodejs:20-x86_64` or `public.ecr.aws/lambda/nodejs:20-arm64`
3843
3891
 
3844
3892
  ###### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.LambdaRunner.imageBuilder.parameter.scope"></a>
3845
3893
 
@@ -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 using Amazon Linux 2. |
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 using Amazon Linux 2.
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()`
@@ -4199,7 +4253,7 @@ Included components:
4199
4253
  * `RunnerImageComponent.githubRunner()`
4200
4254
  * `RunnerImageComponent.lambdaEntrypoint()`
4201
4255
 
4202
- Base Docker image: `public.ecr.aws/lambda/nodejs:16-x86_64` or `public.ecr.aws/lambda/nodejs:16-arm64`
4256
+ Base Docker image: `public.ecr.aws/lambda/nodejs:20-x86_64` or `public.ecr.aws/lambda/nodejs:20-arm64`
4203
4257
 
4204
4258
  ###### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.imageBuilder.parameter.scope"></a>
4205
4259
 
@@ -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:* aws-cdk-lib.aws_ec2.IConnectable, aws-cdk-lib.aws_iam.IGrantable, <a href="#@cloudsnorkel/cdk-github-runners.IRunnerImageBuilder">IRunnerImageBuilder</a>
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 ImageRunnerBuilder.removeComponent }. |
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 ImageRunnerBuilder.removeComponent }.
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
 
@@ -8683,6 +8733,7 @@ public readonly name: string;
8683
8733
  | --- | --- | --- |
8684
8734
  | <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. |
8685
8735
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Os.property.LINUX_AMAZON_2">LINUX_AMAZON_2</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a></code> | Amazon Linux 2. |
8736
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Os.property.LINUX_AMAZON_2023">LINUX_AMAZON_2023</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a></code> | Amazon Linux 2023. |
8686
8737
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Os.property.LINUX_UBUNTU">LINUX_UBUNTU</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a></code> | Ubuntu Linux. |
8687
8738
  | <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. |
8688
8739
 
@@ -8714,6 +8765,18 @@ Amazon Linux 2.
8714
8765
 
8715
8766
  ---
8716
8767
 
8768
+ ##### `LINUX_AMAZON_2023`<sup>Required</sup> <a name="LINUX_AMAZON_2023" id="@cloudsnorkel/cdk-github-runners.Os.property.LINUX_AMAZON_2023"></a>
8769
+
8770
+ ```typescript
8771
+ public readonly LINUX_AMAZON_2023: Os;
8772
+ ```
8773
+
8774
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a>
8775
+
8776
+ Amazon Linux 2023.
8777
+
8778
+ ---
8779
+
8717
8780
  ##### `LINUX_UBUNTU`<sup>Required</sup> <a name="LINUX_UBUNTU" id="@cloudsnorkel/cdk-github-runners.Os.property.LINUX_UBUNTU"></a>
8718
8781
 
8719
8782
  ```typescript
@@ -9046,7 +9109,7 @@ public readonly name: string;
9046
9109
 
9047
9110
  Component name.
9048
9111
 
9049
- Used to identify component in image build logs, and for {@link RunnerImageBuilder.removeComponent }
9112
+ Used to identify component in image build logs, and for {@link IConfigurableRunnerImageBuilder.removeComponent }
9050
9113
 
9051
9114
  ---
9052
9115
 
@@ -9470,6 +9533,96 @@ WindowsComponents.githubRunner(scope: Construct, id: string, runnerVersion: Runn
9470
9533
 
9471
9534
  ## Protocols <a name="Protocols" id="Protocols"></a>
9472
9535
 
9536
+ ### IConfigurableRunnerImageBuilder <a name="IConfigurableRunnerImageBuilder" id="@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder"></a>
9537
+
9538
+ - *Extends:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerImageBuilder">IRunnerImageBuilder</a>, aws-cdk-lib.aws_ec2.IConnectable, aws-cdk-lib.aws_iam.IGrantable
9539
+
9540
+ - *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerImageBuilder">RunnerImageBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder">IConfigurableRunnerImageBuilder</a>
9541
+
9542
+ Interface for constructs that build an image that can be used in {@link IRunnerProvider }.
9543
+
9544
+ The image can be configured by adding or removing components. The image builder can be configured by adding grants or allowing connections.
9545
+
9546
+ An image can be a Docker image or AMI.
9547
+
9548
+ #### Methods <a name="Methods" id="Methods"></a>
9549
+
9550
+ | **Name** | **Description** |
9551
+ | --- | --- |
9552
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.addComponent">addComponent</a></code> | Add a component to the image builder. |
9553
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.removeComponent">removeComponent</a></code> | Remove a component from the image builder. |
9554
+
9555
+ ---
9556
+
9557
+ ##### `addComponent` <a name="addComponent" id="@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.addComponent"></a>
9558
+
9559
+ ```typescript
9560
+ public addComponent(component: RunnerImageComponent): void
9561
+ ```
9562
+
9563
+ Add a component to the image builder.
9564
+
9565
+ The component will be added to the end of the list of components.
9566
+
9567
+ ###### `component`<sup>Required</sup> <a name="component" id="@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.addComponent.parameter.component"></a>
9568
+
9569
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponent">RunnerImageComponent</a>
9570
+
9571
+ component to add.
9572
+
9573
+ ---
9574
+
9575
+ ##### `removeComponent` <a name="removeComponent" id="@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.removeComponent"></a>
9576
+
9577
+ ```typescript
9578
+ public removeComponent(component: RunnerImageComponent): void
9579
+ ```
9580
+
9581
+ Remove a component from the image builder.
9582
+
9583
+ Removal is done by component name. Multiple components with the same name will all be removed.
9584
+
9585
+ ###### `component`<sup>Required</sup> <a name="component" id="@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.removeComponent.parameter.component"></a>
9586
+
9587
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponent">RunnerImageComponent</a>
9588
+
9589
+ component to remove.
9590
+
9591
+ ---
9592
+
9593
+ #### Properties <a name="Properties" id="Properties"></a>
9594
+
9595
+ | **Name** | **Type** | **Description** |
9596
+ | --- | --- | --- |
9597
+ | <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. |
9598
+ | <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. |
9599
+
9600
+ ---
9601
+
9602
+ ##### `connections`<sup>Required</sup> <a name="connections" id="@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.property.connections"></a>
9603
+
9604
+ ```typescript
9605
+ public readonly connections: Connections;
9606
+ ```
9607
+
9608
+ - *Type:* aws-cdk-lib.aws_ec2.Connections
9609
+
9610
+ The network connections associated with this resource.
9611
+
9612
+ ---
9613
+
9614
+ ##### `grantPrincipal`<sup>Required</sup> <a name="grantPrincipal" id="@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder.property.grantPrincipal"></a>
9615
+
9616
+ ```typescript
9617
+ public readonly grantPrincipal: IPrincipal;
9618
+ ```
9619
+
9620
+ - *Type:* aws-cdk-lib.aws_iam.IPrincipal
9621
+
9622
+ The principal to grant permissions to.
9623
+
9624
+ ---
9625
+
9473
9626
  ### IRunnerAmiStatus <a name="IRunnerAmiStatus" id="@cloudsnorkel/cdk-github-runners.IRunnerAmiStatus"></a>
9474
9627
 
9475
9628
  - *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerAmiStatus">IRunnerAmiStatus</a>
@@ -9512,7 +9665,7 @@ Log group name for the AMI builder where history of builds can be analyzed.
9512
9665
 
9513
9666
  ### IRunnerImageBuilder <a name="IRunnerImageBuilder" id="@cloudsnorkel/cdk-github-runners.IRunnerImageBuilder"></a>
9514
9667
 
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>
9668
+ - *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
9669
 
9517
9670
  Interface for constructs that build an image that can be used in {@link IRunnerProvider }.
9518
9671
 
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 = CodeBuildRunnerProvider.imageBuilder(this, 'image builder', {
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
- RunnerImageComponent.custom({
227
- name: 'Ninja',
228
- commands: [
229
- 'Invoke-WebRequest -UseBasicParsing -Uri "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip" -OutFile ninja.zip',
230
- 'Expand-Archive ninja.zip -DestinationPath C:\\actions',
231
- 'del ninja.zip',
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