@cloudsnorkel/cdk-github-runners 0.9.6 → 0.9.8
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 +2 -0
- package/.jsii +155 -115
- package/API.md +46 -9
- package/assets/delete-runner.lambda/index.js +2668 -5183
- package/assets/docker-images/lambda/linux-arm64/runner.sh +1 -1
- package/assets/docker-images/lambda/linux-x64/runner.sh +1 -1
- package/assets/idle-runner-repear.lambda/index.js +20062 -0
- package/assets/image-builders/aws-image-builder/versioner.lambda/index.js +69 -63
- package/assets/setup.lambda/index.html +14 -14
- package/assets/setup.lambda/index.js +102 -153
- package/assets/status.lambda/index.js +2610 -5097
- package/assets/token-retriever.lambda/index.js +2669 -5176
- package/assets/webhook-handler.lambda/index.js +1 -1
- package/lib/access.d.ts +9 -1
- package/lib/access.js +46 -4
- package/lib/delete-runner.lambda.js +7 -35
- package/lib/idle-runner-repear-function.d.ts +13 -0
- package/lib/idle-runner-repear-function.js +23 -0
- package/lib/idle-runner-repear.lambda.d.ts +1 -0
- package/lib/idle-runner-repear.lambda.js +67 -0
- package/lib/image-builders/api.js +1 -1
- package/lib/image-builders/aws-image-builder/builder.js +4 -7
- package/lib/image-builders/aws-image-builder/delete-ami.lambda.js +1 -3
- package/lib/image-builders/aws-image-builder/deprecated/ami.js +1 -1
- package/lib/image-builders/aws-image-builder/deprecated/container.d.ts +1 -1
- package/lib/image-builders/aws-image-builder/deprecated/container.js +9 -12
- 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/image-builders/aws-image-builder/filter-failed-builds.lambda.js +1 -2
- package/lib/image-builders/aws-image-builder/reaper.lambda.js +1 -3
- package/lib/image-builders/aws-image-builder/versioner.lambda.js +1 -3
- package/lib/image-builders/codebuild-deprecated.d.ts +1 -1
- package/lib/image-builders/codebuild-deprecated.js +15 -19
- package/lib/image-builders/codebuild.js +5 -8
- package/lib/image-builders/components.js +1 -1
- package/lib/image-builders/static.d.ts +1 -1
- package/lib/image-builders/static.js +7 -6
- package/lib/{github.d.ts → lambda-github.d.ts} +14 -0
- package/lib/lambda-github.js +69 -0
- package/lib/lambda-helpers.d.ts +0 -1
- package/lib/lambda-helpers.js +1 -2
- package/lib/providers/build-image.lambda.js +1 -3
- package/lib/providers/codebuild.js +5 -5
- package/lib/providers/common.d.ts +6 -0
- package/lib/providers/common.js +4 -4
- package/lib/providers/ec2.js +5 -5
- package/lib/providers/ecs.d.ts +6 -2
- package/lib/providers/ecs.js +64 -32
- package/lib/providers/fargate.js +5 -5
- package/lib/providers/lambda.js +12 -3
- package/lib/providers/update-lambda.lambda.js +1 -2
- package/lib/runner.d.ts +12 -1
- package/lib/runner.js +41 -17
- package/lib/secrets.js +1 -1
- package/lib/setup.lambda.js +3 -4
- package/lib/status.lambda.js +4 -6
- package/lib/token-retriever.lambda.js +3 -3
- package/lib/webhook-handler.lambda.js +2 -3
- package/package.json +12 -10
- package/lib/github.js +0 -50
package/API.md
CHANGED
|
@@ -4831,7 +4831,8 @@ const apiGatewayAccessProps: ApiGatewayAccessProps = { ... }
|
|
|
4831
4831
|
| --- | --- | --- |
|
|
4832
4832
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.ApiGatewayAccessProps.property.allowedIps">allowedIps</a></code> | <code>string[]</code> | List of IP addresses in CIDR notation that are allowed to access the API Gateway. |
|
|
4833
4833
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.ApiGatewayAccessProps.property.allowedSecurityGroups">allowedSecurityGroups</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup[]</code> | List of security groups that are allowed to access the API Gateway. |
|
|
4834
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.ApiGatewayAccessProps.property.allowedVpc">allowedVpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> |
|
|
4834
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ApiGatewayAccessProps.property.allowedVpc">allowedVpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | Create a private API Gateway and allow access from the specified VPC. |
|
|
4835
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ApiGatewayAccessProps.property.allowedVpcEndpoints">allowedVpcEndpoints</a></code> | <code>aws-cdk-lib.aws_ec2.IVpcEndpoint[]</code> | Create a private API Gateway and allow access from the specified VPC endpoints. |
|
|
4835
4836
|
|
|
4836
4837
|
---
|
|
4837
4838
|
|
|
@@ -4873,7 +4874,23 @@ public readonly allowedVpc: IVpc;
|
|
|
4873
4874
|
|
|
4874
4875
|
- *Type:* aws-cdk-lib.aws_ec2.IVpc
|
|
4875
4876
|
|
|
4876
|
-
|
|
4877
|
+
Create a private API Gateway and allow access from the specified VPC.
|
|
4878
|
+
|
|
4879
|
+
---
|
|
4880
|
+
|
|
4881
|
+
##### `allowedVpcEndpoints`<sup>Optional</sup> <a name="allowedVpcEndpoints" id="@cloudsnorkel/cdk-github-runners.ApiGatewayAccessProps.property.allowedVpcEndpoints"></a>
|
|
4882
|
+
|
|
4883
|
+
```typescript
|
|
4884
|
+
public readonly allowedVpcEndpoints: IVpcEndpoint[];
|
|
4885
|
+
```
|
|
4886
|
+
|
|
4887
|
+
- *Type:* aws-cdk-lib.aws_ec2.IVpcEndpoint[]
|
|
4888
|
+
|
|
4889
|
+
Create a private API Gateway and allow access from the specified VPC endpoints.
|
|
4890
|
+
|
|
4891
|
+
Use this to make use of existing VPC endpoints. The VPC endpoint must point to `ec2.InterfaceVpcEndpointAwsService.APIGATEWAY`.
|
|
4892
|
+
|
|
4893
|
+
No other settings are supported when using this option.
|
|
4877
4894
|
|
|
4878
4895
|
---
|
|
4879
4896
|
|
|
@@ -5875,7 +5892,8 @@ const ecsRunnerProviderProps: EcsRunnerProviderProps = { ... }
|
|
|
5875
5892
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.memoryLimitMiB">memoryLimitMiB</a></code> | <code>number</code> | The amount (in MiB) of memory used by the task. |
|
|
5876
5893
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.minInstances">minInstances</a></code> | <code>number</code> | The minimum number of instances to run in the cluster. |
|
|
5877
5894
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.securityGroups">securityGroups</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup[]</code> | Security groups to assign to the task. |
|
|
5878
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.
|
|
5895
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.spot">spot</a></code> | <code>boolean</code> | Use spot capacity. |
|
|
5896
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.spotMaxPrice">spotMaxPrice</a></code> | <code>string</code> | Maximum price for spot instances. |
|
|
5879
5897
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.storageSize">storageSize</a></code> | <code>aws-cdk-lib.Size</code> | Size of volume available for launched cluster instances. |
|
|
5880
5898
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.subnetSelection">subnetSelection</a></code> | <code>aws-cdk-lib.aws_ec2.SubnetSelection</code> | Subnets to run the runners in. |
|
|
5881
5899
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | VPC to launch the runners in. |
|
|
@@ -6087,6 +6105,19 @@ Security groups to assign to the task.
|
|
|
6087
6105
|
|
|
6088
6106
|
---
|
|
6089
6107
|
|
|
6108
|
+
##### `spot`<sup>Optional</sup> <a name="spot" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.spot"></a>
|
|
6109
|
+
|
|
6110
|
+
```typescript
|
|
6111
|
+
public readonly spot: boolean;
|
|
6112
|
+
```
|
|
6113
|
+
|
|
6114
|
+
- *Type:* boolean
|
|
6115
|
+
- *Default:* false (true if spotMaxPrice is specified)
|
|
6116
|
+
|
|
6117
|
+
Use spot capacity.
|
|
6118
|
+
|
|
6119
|
+
---
|
|
6120
|
+
|
|
6090
6121
|
##### `spotMaxPrice`<sup>Optional</sup> <a name="spotMaxPrice" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.spotMaxPrice"></a>
|
|
6091
6122
|
|
|
6092
6123
|
```typescript
|
|
@@ -6094,9 +6125,8 @@ public readonly spotMaxPrice: string;
|
|
|
6094
6125
|
```
|
|
6095
6126
|
|
|
6096
6127
|
- *Type:* string
|
|
6097
|
-
- *Default:* no spot capacity
|
|
6098
6128
|
|
|
6099
|
-
|
|
6129
|
+
Maximum price for spot instances.
|
|
6100
6130
|
|
|
6101
6131
|
---
|
|
6102
6132
|
|
|
@@ -6446,7 +6476,7 @@ const gitHubRunnersProps: GitHubRunnersProps = { ... }
|
|
|
6446
6476
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup</code> | Security group attached to all management functions. |
|
|
6447
6477
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.setupAccess">setupAccess</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaAccess">LambdaAccess</a></code> | Access configuration for the setup function. |
|
|
6448
6478
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.statusAccess">statusAccess</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaAccess">LambdaAccess</a></code> | Access configuration for the status function. |
|
|
6449
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | VPC used for all management functions. |
|
|
6479
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | VPC used for all management functions. Use this with GitHub Enterprise Server hosted that's inaccessible from outside the VPC. |
|
|
6450
6480
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.vpcSubnets">vpcSubnets</a></code> | <code>aws-cdk-lib.aws_ec2.SubnetSelection</code> | VPC subnets used for all management functions. |
|
|
6451
6481
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.webhookAccess">webhookAccess</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaAccess">LambdaAccess</a></code> | Access configuration for the webhook function. |
|
|
6452
6482
|
|
|
@@ -6506,7 +6536,7 @@ public readonly idleTimeout: Duration;
|
|
|
6506
6536
|
```
|
|
6507
6537
|
|
|
6508
6538
|
- *Type:* aws-cdk-lib.Duration
|
|
6509
|
-
- *Default:*
|
|
6539
|
+
- *Default:* 5 minutes
|
|
6510
6540
|
|
|
6511
6541
|
Time to wait before stopping a runner that remains idle.
|
|
6512
6542
|
|
|
@@ -6594,9 +6624,16 @@ public readonly vpc: IVpc;
|
|
|
6594
6624
|
|
|
6595
6625
|
- *Type:* aws-cdk-lib.aws_ec2.IVpc
|
|
6596
6626
|
|
|
6597
|
-
VPC used for all management functions.
|
|
6627
|
+
VPC used for all management functions. Use this with GitHub Enterprise Server hosted that's inaccessible from outside the VPC.
|
|
6598
6628
|
|
|
6599
|
-
|
|
6629
|
+
Make sure the selected VPC and subnets have access to the following with either NAT Gateway or VPC Endpoints:
|
|
6630
|
+
* GitHub Enterprise Server
|
|
6631
|
+
* Secrets Manager
|
|
6632
|
+
* SQS
|
|
6633
|
+
* Step Functions
|
|
6634
|
+
* CloudFormation (status function only)
|
|
6635
|
+
* EC2 (status function only)
|
|
6636
|
+
* ECR (status function only)
|
|
6600
6637
|
|
|
6601
6638
|
---
|
|
6602
6639
|
|