@cloudsnorkel/cdk-github-runners 0.9.1 → 0.9.3
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/.jsii +999 -98
- package/API.md +776 -8
- package/assets/lambdas/setup.lambda/index.js +10 -6
- package/assets/lambdas/status.lambda/index.js +22 -10
- package/assets/lambdas/webhook-handler.lambda/index.js +15 -7
- package/lib/access.d.ts +65 -0
- package/lib/access.js +160 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -1
- package/lib/lambdas/setup.lambda.js +11 -7
- package/lib/lambdas/status.lambda.js +24 -11
- package/lib/lambdas/webhook-handler.lambda.js +19 -10
- package/lib/providers/codebuild.js +2 -2
- package/lib/providers/common.js +3 -3
- package/lib/providers/ec2.js +2 -2
- package/lib/providers/ecs.js +5 -1
- package/lib/providers/fargate.js +2 -2
- package/lib/providers/image-builders/api.js +1 -1
- package/lib/providers/image-builders/aws-image-builder/builder.js +1 -1
- package/lib/providers/image-builders/aws-image-builder/deprecated/ami.js +1 -1
- package/lib/providers/image-builders/aws-image-builder/deprecated/container.js +1 -1
- package/lib/providers/image-builders/aws-image-builder/deprecated/linux-components.js +1 -1
- package/lib/providers/image-builders/aws-image-builder/deprecated/windows-components.js +1 -1
- package/lib/providers/image-builders/codebuild-deprecated.js +1 -1
- package/lib/providers/image-builders/components.js +1 -1
- package/lib/providers/image-builders/static.js +1 -1
- package/lib/providers/index.d.ts +1 -0
- package/lib/providers/index.js +2 -1
- package/lib/providers/lambda.js +2 -2
- package/lib/runner.d.ts +23 -0
- package/lib/runner.js +13 -4
- package/lib/secrets.js +1 -1
- package/lib/webhook.d.ts +5 -0
- package/lib/webhook.js +5 -4
- package/package.json +1 -1
package/API.md
CHANGED
|
@@ -1934,6 +1934,261 @@ Note that this is not the job log, but the runner itself. It will not contain ou
|
|
|
1934
1934
|
---
|
|
1935
1935
|
|
|
1936
1936
|
|
|
1937
|
+
### EcsRunnerProvider <a name="EcsRunnerProvider" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider"></a>
|
|
1938
|
+
|
|
1939
|
+
- *Implements:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>
|
|
1940
|
+
|
|
1941
|
+
GitHub Actions runner provider using ECS on EC2 to execute jobs.
|
|
1942
|
+
|
|
1943
|
+
ECS can be useful when you want more control of the infrastructure running the GitHub Actions Docker containers. You can control the autoscaling
|
|
1944
|
+
group to scale down to zero during the night and scale up during work hours. This way you can still save money, but have to wait less for
|
|
1945
|
+
infrastructure to spin up.
|
|
1946
|
+
|
|
1947
|
+
This construct is not meant to be used by itself. It should be passed in the providers property for GitHubRunners.
|
|
1948
|
+
|
|
1949
|
+
#### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.Initializer"></a>
|
|
1950
|
+
|
|
1951
|
+
```typescript
|
|
1952
|
+
import { EcsRunnerProvider } from '@cloudsnorkel/cdk-github-runners'
|
|
1953
|
+
|
|
1954
|
+
new EcsRunnerProvider(scope: Construct, id: string, props?: EcsRunnerProviderProps)
|
|
1955
|
+
```
|
|
1956
|
+
|
|
1957
|
+
| **Name** | **Type** | **Description** |
|
|
1958
|
+
| --- | --- | --- |
|
|
1959
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
|
|
1960
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
|
|
1961
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.Initializer.parameter.props">props</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps">EcsRunnerProviderProps</a></code> | *No description.* |
|
|
1962
|
+
|
|
1963
|
+
---
|
|
1964
|
+
|
|
1965
|
+
##### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.Initializer.parameter.scope"></a>
|
|
1966
|
+
|
|
1967
|
+
- *Type:* constructs.Construct
|
|
1968
|
+
|
|
1969
|
+
---
|
|
1970
|
+
|
|
1971
|
+
##### `id`<sup>Required</sup> <a name="id" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.Initializer.parameter.id"></a>
|
|
1972
|
+
|
|
1973
|
+
- *Type:* string
|
|
1974
|
+
|
|
1975
|
+
---
|
|
1976
|
+
|
|
1977
|
+
##### `props`<sup>Optional</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.Initializer.parameter.props"></a>
|
|
1978
|
+
|
|
1979
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps">EcsRunnerProviderProps</a>
|
|
1980
|
+
|
|
1981
|
+
---
|
|
1982
|
+
|
|
1983
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
1984
|
+
|
|
1985
|
+
| **Name** | **Description** |
|
|
1986
|
+
| --- | --- |
|
|
1987
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
1988
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
|
|
1989
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.grantStateMachine">grantStateMachine</a></code> | An optional method that modifies the role of the state machine after all the tasks have been generated. |
|
|
1990
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.status">status</a></code> | Return status of the runner provider to be used in the main status function. |
|
|
1991
|
+
|
|
1992
|
+
---
|
|
1993
|
+
|
|
1994
|
+
##### `toString` <a name="toString" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.toString"></a>
|
|
1995
|
+
|
|
1996
|
+
```typescript
|
|
1997
|
+
public toString(): string
|
|
1998
|
+
```
|
|
1999
|
+
|
|
2000
|
+
Returns a string representation of this construct.
|
|
2001
|
+
|
|
2002
|
+
##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.getStepFunctionTask"></a>
|
|
2003
|
+
|
|
2004
|
+
```typescript
|
|
2005
|
+
public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
|
|
2006
|
+
```
|
|
2007
|
+
|
|
2008
|
+
Generate step function task(s) to start a new runner.
|
|
2009
|
+
|
|
2010
|
+
Called by GithubRunners and shouldn't be called manually.
|
|
2011
|
+
|
|
2012
|
+
###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.getStepFunctionTask.parameter.parameters"></a>
|
|
2013
|
+
|
|
2014
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
|
|
2015
|
+
|
|
2016
|
+
workflow job details.
|
|
2017
|
+
|
|
2018
|
+
---
|
|
2019
|
+
|
|
2020
|
+
##### `grantStateMachine` <a name="grantStateMachine" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.grantStateMachine"></a>
|
|
2021
|
+
|
|
2022
|
+
```typescript
|
|
2023
|
+
public grantStateMachine(_: IGrantable): void
|
|
2024
|
+
```
|
|
2025
|
+
|
|
2026
|
+
An optional method that modifies the role of the state machine after all the tasks have been generated.
|
|
2027
|
+
|
|
2028
|
+
This can be used to add additional policy
|
|
2029
|
+
statements to the state machine role that are not automatically added by the task returned from {@link getStepFunctionTask}.
|
|
2030
|
+
|
|
2031
|
+
###### `_`<sup>Required</sup> <a name="_" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.grantStateMachine.parameter._"></a>
|
|
2032
|
+
|
|
2033
|
+
- *Type:* aws-cdk-lib.aws_iam.IGrantable
|
|
2034
|
+
|
|
2035
|
+
---
|
|
2036
|
+
|
|
2037
|
+
##### `status` <a name="status" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.status"></a>
|
|
2038
|
+
|
|
2039
|
+
```typescript
|
|
2040
|
+
public status(statusFunctionRole: IGrantable): IRunnerProviderStatus
|
|
2041
|
+
```
|
|
2042
|
+
|
|
2043
|
+
Return status of the runner provider to be used in the main status function.
|
|
2044
|
+
|
|
2045
|
+
Also gives the status function any needed permissions to query the Docker image or AMI.
|
|
2046
|
+
|
|
2047
|
+
###### `statusFunctionRole`<sup>Required</sup> <a name="statusFunctionRole" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.status.parameter.statusFunctionRole"></a>
|
|
2048
|
+
|
|
2049
|
+
- *Type:* aws-cdk-lib.aws_iam.IGrantable
|
|
2050
|
+
|
|
2051
|
+
---
|
|
2052
|
+
|
|
2053
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
2054
|
+
|
|
2055
|
+
| **Name** | **Description** |
|
|
2056
|
+
| --- | --- |
|
|
2057
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
2058
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.imageBuilder">imageBuilder</a></code> | Create new image builder that builds ECS specific runner images using Ubuntu. |
|
|
2059
|
+
|
|
2060
|
+
---
|
|
2061
|
+
|
|
2062
|
+
##### ~~`isConstruct`~~ <a name="isConstruct" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.isConstruct"></a>
|
|
2063
|
+
|
|
2064
|
+
```typescript
|
|
2065
|
+
import { EcsRunnerProvider } from '@cloudsnorkel/cdk-github-runners'
|
|
2066
|
+
|
|
2067
|
+
EcsRunnerProvider.isConstruct(x: any)
|
|
2068
|
+
```
|
|
2069
|
+
|
|
2070
|
+
Checks if `x` is a construct.
|
|
2071
|
+
|
|
2072
|
+
###### `x`<sup>Required</sup> <a name="x" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.isConstruct.parameter.x"></a>
|
|
2073
|
+
|
|
2074
|
+
- *Type:* any
|
|
2075
|
+
|
|
2076
|
+
Any object.
|
|
2077
|
+
|
|
2078
|
+
---
|
|
2079
|
+
|
|
2080
|
+
##### `imageBuilder` <a name="imageBuilder" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.imageBuilder"></a>
|
|
2081
|
+
|
|
2082
|
+
```typescript
|
|
2083
|
+
import { EcsRunnerProvider } from '@cloudsnorkel/cdk-github-runners'
|
|
2084
|
+
|
|
2085
|
+
EcsRunnerProvider.imageBuilder(scope: Construct, id: string, props?: RunnerImageBuilderProps)
|
|
2086
|
+
```
|
|
2087
|
+
|
|
2088
|
+
Create new image builder that builds ECS specific runner images using Ubuntu.
|
|
2089
|
+
|
|
2090
|
+
Included components:
|
|
2091
|
+
* `RunnerImageComponent.requiredPackages()`
|
|
2092
|
+
* `RunnerImageComponent.runnerUser()`
|
|
2093
|
+
* `RunnerImageComponent.git()`
|
|
2094
|
+
* `RunnerImageComponent.githubCli()`
|
|
2095
|
+
* `RunnerImageComponent.awsCli()`
|
|
2096
|
+
* `RunnerImageComponent.dockerInDocker()`
|
|
2097
|
+
* `RunnerImageComponent.githubRunner()`
|
|
2098
|
+
|
|
2099
|
+
###### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.imageBuilder.parameter.scope"></a>
|
|
2100
|
+
|
|
2101
|
+
- *Type:* constructs.Construct
|
|
2102
|
+
|
|
2103
|
+
---
|
|
2104
|
+
|
|
2105
|
+
###### `id`<sup>Required</sup> <a name="id" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.imageBuilder.parameter.id"></a>
|
|
2106
|
+
|
|
2107
|
+
- *Type:* string
|
|
2108
|
+
|
|
2109
|
+
---
|
|
2110
|
+
|
|
2111
|
+
###### `props`<sup>Optional</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.imageBuilder.parameter.props"></a>
|
|
2112
|
+
|
|
2113
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerImageBuilderProps">RunnerImageBuilderProps</a>
|
|
2114
|
+
|
|
2115
|
+
---
|
|
2116
|
+
|
|
2117
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
2118
|
+
|
|
2119
|
+
| **Name** | **Type** | **Description** |
|
|
2120
|
+
| --- | --- | --- |
|
|
2121
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
2122
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.property.connections">connections</a></code> | <code>aws-cdk-lib.aws_ec2.Connections</code> | The network connections associated with this resource. |
|
|
2123
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.property.grantPrincipal">grantPrincipal</a></code> | <code>aws-cdk-lib.aws_iam.IPrincipal</code> | Grant principal used to add permissions to the runner role. |
|
|
2124
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.property.labels">labels</a></code> | <code>string[]</code> | Labels associated with this provider. |
|
|
2125
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.property.logGroup">logGroup</a></code> | <code>aws-cdk-lib.aws_logs.ILogGroup</code> | Log group where provided runners will save their logs. |
|
|
2126
|
+
|
|
2127
|
+
---
|
|
2128
|
+
|
|
2129
|
+
##### `node`<sup>Required</sup> <a name="node" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.property.node"></a>
|
|
2130
|
+
|
|
2131
|
+
```typescript
|
|
2132
|
+
public readonly node: Node;
|
|
2133
|
+
```
|
|
2134
|
+
|
|
2135
|
+
- *Type:* constructs.Node
|
|
2136
|
+
|
|
2137
|
+
The tree node.
|
|
2138
|
+
|
|
2139
|
+
---
|
|
2140
|
+
|
|
2141
|
+
##### `connections`<sup>Required</sup> <a name="connections" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.property.connections"></a>
|
|
2142
|
+
|
|
2143
|
+
```typescript
|
|
2144
|
+
public readonly connections: Connections;
|
|
2145
|
+
```
|
|
2146
|
+
|
|
2147
|
+
- *Type:* aws-cdk-lib.aws_ec2.Connections
|
|
2148
|
+
|
|
2149
|
+
The network connections associated with this resource.
|
|
2150
|
+
|
|
2151
|
+
---
|
|
2152
|
+
|
|
2153
|
+
##### `grantPrincipal`<sup>Required</sup> <a name="grantPrincipal" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.property.grantPrincipal"></a>
|
|
2154
|
+
|
|
2155
|
+
```typescript
|
|
2156
|
+
public readonly grantPrincipal: IPrincipal;
|
|
2157
|
+
```
|
|
2158
|
+
|
|
2159
|
+
- *Type:* aws-cdk-lib.aws_iam.IPrincipal
|
|
2160
|
+
|
|
2161
|
+
Grant principal used to add permissions to the runner role.
|
|
2162
|
+
|
|
2163
|
+
---
|
|
2164
|
+
|
|
2165
|
+
##### `labels`<sup>Required</sup> <a name="labels" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.property.labels"></a>
|
|
2166
|
+
|
|
2167
|
+
```typescript
|
|
2168
|
+
public readonly labels: string[];
|
|
2169
|
+
```
|
|
2170
|
+
|
|
2171
|
+
- *Type:* string[]
|
|
2172
|
+
|
|
2173
|
+
Labels associated with this provider.
|
|
2174
|
+
|
|
2175
|
+
---
|
|
2176
|
+
|
|
2177
|
+
##### `logGroup`<sup>Required</sup> <a name="logGroup" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.property.logGroup"></a>
|
|
2178
|
+
|
|
2179
|
+
```typescript
|
|
2180
|
+
public readonly logGroup: ILogGroup;
|
|
2181
|
+
```
|
|
2182
|
+
|
|
2183
|
+
- *Type:* aws-cdk-lib.aws_logs.ILogGroup
|
|
2184
|
+
|
|
2185
|
+
Log group where provided runners will save their logs.
|
|
2186
|
+
|
|
2187
|
+
Note that this is not the job log, but the runner itself. It will not contain output from the GitHub Action but only metadata on its execution.
|
|
2188
|
+
|
|
2189
|
+
---
|
|
2190
|
+
|
|
2191
|
+
|
|
1937
2192
|
### FargateRunner <a name="FargateRunner" id="@cloudsnorkel/cdk-github-runners.FargateRunner"></a>
|
|
1938
2193
|
|
|
1939
2194
|
#### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.FargateRunner.Initializer"></a>
|
|
@@ -4550,6 +4805,68 @@ VPC where builder instances will be launched.
|
|
|
4550
4805
|
|
|
4551
4806
|
---
|
|
4552
4807
|
|
|
4808
|
+
### ApiGatewayAccessProps <a name="ApiGatewayAccessProps" id="@cloudsnorkel/cdk-github-runners.ApiGatewayAccessProps"></a>
|
|
4809
|
+
|
|
4810
|
+
#### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.ApiGatewayAccessProps.Initializer"></a>
|
|
4811
|
+
|
|
4812
|
+
```typescript
|
|
4813
|
+
import { ApiGatewayAccessProps } from '@cloudsnorkel/cdk-github-runners'
|
|
4814
|
+
|
|
4815
|
+
const apiGatewayAccessProps: ApiGatewayAccessProps = { ... }
|
|
4816
|
+
```
|
|
4817
|
+
|
|
4818
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
4819
|
+
|
|
4820
|
+
| **Name** | **Type** | **Description** |
|
|
4821
|
+
| --- | --- | --- |
|
|
4822
|
+
| <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. |
|
|
4823
|
+
| <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. |
|
|
4824
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ApiGatewayAccessProps.property.allowedVpc">allowedVpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | Creates a private API Gateway and allows access from the specified VPC. |
|
|
4825
|
+
|
|
4826
|
+
---
|
|
4827
|
+
|
|
4828
|
+
##### `allowedIps`<sup>Optional</sup> <a name="allowedIps" id="@cloudsnorkel/cdk-github-runners.ApiGatewayAccessProps.property.allowedIps"></a>
|
|
4829
|
+
|
|
4830
|
+
```typescript
|
|
4831
|
+
public readonly allowedIps: string[];
|
|
4832
|
+
```
|
|
4833
|
+
|
|
4834
|
+
- *Type:* string[]
|
|
4835
|
+
|
|
4836
|
+
List of IP addresses in CIDR notation that are allowed to access the API Gateway.
|
|
4837
|
+
|
|
4838
|
+
If not specified on public API Gateway, all IP addresses are allowed.
|
|
4839
|
+
|
|
4840
|
+
If not specified on private API Gateway, no IP addresses are allowed (but specified security groups are).
|
|
4841
|
+
|
|
4842
|
+
---
|
|
4843
|
+
|
|
4844
|
+
##### `allowedSecurityGroups`<sup>Optional</sup> <a name="allowedSecurityGroups" id="@cloudsnorkel/cdk-github-runners.ApiGatewayAccessProps.property.allowedSecurityGroups"></a>
|
|
4845
|
+
|
|
4846
|
+
```typescript
|
|
4847
|
+
public readonly allowedSecurityGroups: ISecurityGroup[];
|
|
4848
|
+
```
|
|
4849
|
+
|
|
4850
|
+
- *Type:* aws-cdk-lib.aws_ec2.ISecurityGroup[]
|
|
4851
|
+
|
|
4852
|
+
List of security groups that are allowed to access the API Gateway.
|
|
4853
|
+
|
|
4854
|
+
Only works for private API Gateways with {@link allowedVpc}.
|
|
4855
|
+
|
|
4856
|
+
---
|
|
4857
|
+
|
|
4858
|
+
##### `allowedVpc`<sup>Optional</sup> <a name="allowedVpc" id="@cloudsnorkel/cdk-github-runners.ApiGatewayAccessProps.property.allowedVpc"></a>
|
|
4859
|
+
|
|
4860
|
+
```typescript
|
|
4861
|
+
public readonly allowedVpc: IVpc;
|
|
4862
|
+
```
|
|
4863
|
+
|
|
4864
|
+
- *Type:* aws-cdk-lib.aws_ec2.IVpc
|
|
4865
|
+
|
|
4866
|
+
Creates a private API Gateway and allows access from the specified VPC.
|
|
4867
|
+
|
|
4868
|
+
---
|
|
4869
|
+
|
|
4553
4870
|
### AwsImageBuilderRunnerImageBuilderProps <a name="AwsImageBuilderRunnerImageBuilderProps" id="@cloudsnorkel/cdk-github-runners.AwsImageBuilderRunnerImageBuilderProps"></a>
|
|
4554
4871
|
|
|
4555
4872
|
#### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.AwsImageBuilderRunnerImageBuilderProps.Initializer"></a>
|
|
@@ -5518,24 +5835,322 @@ VPC where runner instances will be launched.
|
|
|
5518
5835
|
|
|
5519
5836
|
---
|
|
5520
5837
|
|
|
5521
|
-
###
|
|
5838
|
+
### EcsRunnerProviderProps <a name="EcsRunnerProviderProps" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps"></a>
|
|
5522
5839
|
|
|
5523
|
-
Properties for
|
|
5840
|
+
Properties for EcsRunnerProvider.
|
|
5524
5841
|
|
|
5525
|
-
#### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.
|
|
5842
|
+
#### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.Initializer"></a>
|
|
5526
5843
|
|
|
5527
5844
|
```typescript
|
|
5528
|
-
import {
|
|
5845
|
+
import { EcsRunnerProviderProps } from '@cloudsnorkel/cdk-github-runners'
|
|
5529
5846
|
|
|
5530
|
-
const
|
|
5847
|
+
const ecsRunnerProviderProps: EcsRunnerProviderProps = { ... }
|
|
5531
5848
|
```
|
|
5532
5849
|
|
|
5533
5850
|
#### Properties <a name="Properties" id="Properties"></a>
|
|
5534
5851
|
|
|
5535
5852
|
| **Name** | **Type** | **Description** |
|
|
5536
5853
|
| --- | --- | --- |
|
|
5537
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.
|
|
5538
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.
|
|
5854
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.logRetention">logRetention</a></code> | <code>aws-cdk-lib.aws_logs.RetentionDays</code> | The number of days log events are kept in CloudWatch Logs. |
|
|
5855
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.retryOptions">retryOptions</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.ProviderRetryOptions">ProviderRetryOptions</a></code> | Options to retry operation in case of failure like missing capacity, or API quota issues. |
|
|
5856
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.assignPublicIp">assignPublicIp</a></code> | <code>boolean</code> | Assign public IP to the runner task. |
|
|
5857
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.capacityProvider">capacityProvider</a></code> | <code>aws-cdk-lib.aws_ecs.AsgCapacityProvider</code> | Existing capacity provider to use. |
|
|
5858
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.cluster">cluster</a></code> | <code>aws-cdk-lib.aws_ecs.Cluster</code> | Existing ECS cluster to use. |
|
|
5859
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.cpu">cpu</a></code> | <code>number</code> | The number of cpu units used by the task. |
|
|
5860
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.dockerInDocker">dockerInDocker</a></code> | <code>boolean</code> | Support building and running Docker images by enabling Docker-in-Docker (dind) and the required CodeBuild privileged mode. |
|
|
5861
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.imageBuilder">imageBuilder</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerImageBuilder">IRunnerImageBuilder</a></code> | Runner image builder used to build Docker images containing GitHub Runner and all requirements. |
|
|
5862
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.instanceType">instanceType</a></code> | <code>aws-cdk-lib.aws_ec2.InstanceType</code> | Instance type of ECS cluster instances. |
|
|
5863
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.labels">labels</a></code> | <code>string[]</code> | GitHub Actions labels used for this provider. |
|
|
5864
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.maxInstances">maxInstances</a></code> | <code>number</code> | The maximum number of instances to run in the cluster. |
|
|
5865
|
+
| <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. |
|
|
5866
|
+
| <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. |
|
|
5867
|
+
| <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. |
|
|
5868
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.spotMaxPrice">spotMaxPrice</a></code> | <code>string</code> | Use spot capacity and set a maximum price for spot instances. |
|
|
5869
|
+
| <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. |
|
|
5870
|
+
| <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. |
|
|
5871
|
+
| <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. |
|
|
5872
|
+
|
|
5873
|
+
---
|
|
5874
|
+
|
|
5875
|
+
##### `logRetention`<sup>Optional</sup> <a name="logRetention" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.logRetention"></a>
|
|
5876
|
+
|
|
5877
|
+
```typescript
|
|
5878
|
+
public readonly logRetention: RetentionDays;
|
|
5879
|
+
```
|
|
5880
|
+
|
|
5881
|
+
- *Type:* aws-cdk-lib.aws_logs.RetentionDays
|
|
5882
|
+
- *Default:* logs.RetentionDays.ONE_MONTH
|
|
5883
|
+
|
|
5884
|
+
The number of days log events are kept in CloudWatch Logs.
|
|
5885
|
+
|
|
5886
|
+
When updating
|
|
5887
|
+
this property, unsetting it doesn't remove the log retention policy. To
|
|
5888
|
+
remove the retention policy, set the value to `INFINITE`.
|
|
5889
|
+
|
|
5890
|
+
---
|
|
5891
|
+
|
|
5892
|
+
##### `retryOptions`<sup>Optional</sup> <a name="retryOptions" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.retryOptions"></a>
|
|
5893
|
+
|
|
5894
|
+
```typescript
|
|
5895
|
+
public readonly retryOptions: ProviderRetryOptions;
|
|
5896
|
+
```
|
|
5897
|
+
|
|
5898
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.ProviderRetryOptions">ProviderRetryOptions</a>
|
|
5899
|
+
- *Default:* retry 10 times up to about 45 minutes
|
|
5900
|
+
|
|
5901
|
+
Options to retry operation in case of failure like missing capacity, or API quota issues.
|
|
5902
|
+
|
|
5903
|
+
---
|
|
5904
|
+
|
|
5905
|
+
##### `assignPublicIp`<sup>Optional</sup> <a name="assignPublicIp" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.assignPublicIp"></a>
|
|
5906
|
+
|
|
5907
|
+
```typescript
|
|
5908
|
+
public readonly assignPublicIp: boolean;
|
|
5909
|
+
```
|
|
5910
|
+
|
|
5911
|
+
- *Type:* boolean
|
|
5912
|
+
- *Default:* true
|
|
5913
|
+
|
|
5914
|
+
Assign public IP to the runner task.
|
|
5915
|
+
|
|
5916
|
+
Make sure the task will have access to GitHub. A public IP might be required unless you have NAT gateway.
|
|
5917
|
+
|
|
5918
|
+
---
|
|
5919
|
+
|
|
5920
|
+
##### `capacityProvider`<sup>Optional</sup> <a name="capacityProvider" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.capacityProvider"></a>
|
|
5921
|
+
|
|
5922
|
+
```typescript
|
|
5923
|
+
public readonly capacityProvider: AsgCapacityProvider;
|
|
5924
|
+
```
|
|
5925
|
+
|
|
5926
|
+
- *Type:* aws-cdk-lib.aws_ecs.AsgCapacityProvider
|
|
5927
|
+
- *Default:* new capacity provider
|
|
5928
|
+
|
|
5929
|
+
Existing capacity provider to use.
|
|
5930
|
+
|
|
5931
|
+
---
|
|
5932
|
+
|
|
5933
|
+
##### `cluster`<sup>Optional</sup> <a name="cluster" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.cluster"></a>
|
|
5934
|
+
|
|
5935
|
+
```typescript
|
|
5936
|
+
public readonly cluster: Cluster;
|
|
5937
|
+
```
|
|
5938
|
+
|
|
5939
|
+
- *Type:* aws-cdk-lib.aws_ecs.Cluster
|
|
5940
|
+
- *Default:* a new cluster
|
|
5941
|
+
|
|
5942
|
+
Existing ECS cluster to use.
|
|
5943
|
+
|
|
5944
|
+
---
|
|
5945
|
+
|
|
5946
|
+
##### `cpu`<sup>Optional</sup> <a name="cpu" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.cpu"></a>
|
|
5947
|
+
|
|
5948
|
+
```typescript
|
|
5949
|
+
public readonly cpu: number;
|
|
5950
|
+
```
|
|
5951
|
+
|
|
5952
|
+
- *Type:* number
|
|
5953
|
+
- *Default:* 1024
|
|
5954
|
+
|
|
5955
|
+
The number of cpu units used by the task.
|
|
5956
|
+
|
|
5957
|
+
1024 units is 1 vCPU. Fractions of a vCPU are supported.
|
|
5958
|
+
|
|
5959
|
+
---
|
|
5960
|
+
|
|
5961
|
+
##### `dockerInDocker`<sup>Optional</sup> <a name="dockerInDocker" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.dockerInDocker"></a>
|
|
5962
|
+
|
|
5963
|
+
```typescript
|
|
5964
|
+
public readonly dockerInDocker: boolean;
|
|
5965
|
+
```
|
|
5966
|
+
|
|
5967
|
+
- *Type:* boolean
|
|
5968
|
+
- *Default:* true
|
|
5969
|
+
|
|
5970
|
+
Support building and running Docker images by enabling Docker-in-Docker (dind) and the required CodeBuild privileged mode.
|
|
5971
|
+
|
|
5972
|
+
Disabling this can
|
|
5973
|
+
speed up provisioning of CodeBuild runners. If you don't intend on running or building Docker images, disable this for faster start-up times.
|
|
5974
|
+
|
|
5975
|
+
---
|
|
5976
|
+
|
|
5977
|
+
##### `imageBuilder`<sup>Optional</sup> <a name="imageBuilder" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.imageBuilder"></a>
|
|
5978
|
+
|
|
5979
|
+
```typescript
|
|
5980
|
+
public readonly imageBuilder: IRunnerImageBuilder;
|
|
5981
|
+
```
|
|
5982
|
+
|
|
5983
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerImageBuilder">IRunnerImageBuilder</a>
|
|
5984
|
+
- *Default:* EcsRunnerProvider.imageBuilder()
|
|
5985
|
+
|
|
5986
|
+
Runner image builder used to build Docker images containing GitHub Runner and all requirements.
|
|
5987
|
+
|
|
5988
|
+
The image builder determines the OS and architecture of the runner.
|
|
5989
|
+
|
|
5990
|
+
---
|
|
5991
|
+
|
|
5992
|
+
##### `instanceType`<sup>Optional</sup> <a name="instanceType" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.instanceType"></a>
|
|
5993
|
+
|
|
5994
|
+
```typescript
|
|
5995
|
+
public readonly instanceType: InstanceType;
|
|
5996
|
+
```
|
|
5997
|
+
|
|
5998
|
+
- *Type:* aws-cdk-lib.aws_ec2.InstanceType
|
|
5999
|
+
- *Default:* m5.large or m6g.large
|
|
6000
|
+
|
|
6001
|
+
Instance type of ECS cluster instances.
|
|
6002
|
+
|
|
6003
|
+
Only used when creating a new cluster.
|
|
6004
|
+
|
|
6005
|
+
---
|
|
6006
|
+
|
|
6007
|
+
##### `labels`<sup>Optional</sup> <a name="labels" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.labels"></a>
|
|
6008
|
+
|
|
6009
|
+
```typescript
|
|
6010
|
+
public readonly labels: string[];
|
|
6011
|
+
```
|
|
6012
|
+
|
|
6013
|
+
- *Type:* string[]
|
|
6014
|
+
- *Default:* ['ecs']
|
|
6015
|
+
|
|
6016
|
+
GitHub Actions labels used for this provider.
|
|
6017
|
+
|
|
6018
|
+
These labels are used to identify which provider should spawn a new on-demand runner. Every job sends a webhook with the labels it's looking for
|
|
6019
|
+
based on runs-on. We match the labels from the webhook with the labels specified here. If all the labels specified here are present in the
|
|
6020
|
+
job's labels, this provider will be chosen and spawn a new runner.
|
|
6021
|
+
|
|
6022
|
+
---
|
|
6023
|
+
|
|
6024
|
+
##### `maxInstances`<sup>Optional</sup> <a name="maxInstances" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.maxInstances"></a>
|
|
6025
|
+
|
|
6026
|
+
```typescript
|
|
6027
|
+
public readonly maxInstances: number;
|
|
6028
|
+
```
|
|
6029
|
+
|
|
6030
|
+
- *Type:* number
|
|
6031
|
+
- *Default:* 5
|
|
6032
|
+
|
|
6033
|
+
The maximum number of instances to run in the cluster.
|
|
6034
|
+
|
|
6035
|
+
Only used when creating a new cluster.
|
|
6036
|
+
|
|
6037
|
+
---
|
|
6038
|
+
|
|
6039
|
+
##### `memoryLimitMiB`<sup>Optional</sup> <a name="memoryLimitMiB" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.memoryLimitMiB"></a>
|
|
6040
|
+
|
|
6041
|
+
```typescript
|
|
6042
|
+
public readonly memoryLimitMiB: number;
|
|
6043
|
+
```
|
|
6044
|
+
|
|
6045
|
+
- *Type:* number
|
|
6046
|
+
- *Default:* 3500
|
|
6047
|
+
|
|
6048
|
+
The amount (in MiB) of memory used by the task.
|
|
6049
|
+
|
|
6050
|
+
---
|
|
6051
|
+
|
|
6052
|
+
##### `minInstances`<sup>Optional</sup> <a name="minInstances" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.minInstances"></a>
|
|
6053
|
+
|
|
6054
|
+
```typescript
|
|
6055
|
+
public readonly minInstances: number;
|
|
6056
|
+
```
|
|
6057
|
+
|
|
6058
|
+
- *Type:* number
|
|
6059
|
+
- *Default:* 0
|
|
6060
|
+
|
|
6061
|
+
The minimum number of instances to run in the cluster.
|
|
6062
|
+
|
|
6063
|
+
Only used when creating a new cluster.
|
|
6064
|
+
|
|
6065
|
+
---
|
|
6066
|
+
|
|
6067
|
+
##### `securityGroups`<sup>Optional</sup> <a name="securityGroups" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.securityGroups"></a>
|
|
6068
|
+
|
|
6069
|
+
```typescript
|
|
6070
|
+
public readonly securityGroups: ISecurityGroup[];
|
|
6071
|
+
```
|
|
6072
|
+
|
|
6073
|
+
- *Type:* aws-cdk-lib.aws_ec2.ISecurityGroup[]
|
|
6074
|
+
- *Default:* a new security group
|
|
6075
|
+
|
|
6076
|
+
Security groups to assign to the task.
|
|
6077
|
+
|
|
6078
|
+
---
|
|
6079
|
+
|
|
6080
|
+
##### `spotMaxPrice`<sup>Optional</sup> <a name="spotMaxPrice" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.spotMaxPrice"></a>
|
|
6081
|
+
|
|
6082
|
+
```typescript
|
|
6083
|
+
public readonly spotMaxPrice: string;
|
|
6084
|
+
```
|
|
6085
|
+
|
|
6086
|
+
- *Type:* string
|
|
6087
|
+
- *Default:* no spot capacity
|
|
6088
|
+
|
|
6089
|
+
Use spot capacity and set a maximum price for spot instances.
|
|
6090
|
+
|
|
6091
|
+
---
|
|
6092
|
+
|
|
6093
|
+
##### `storageSize`<sup>Optional</sup> <a name="storageSize" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.storageSize"></a>
|
|
6094
|
+
|
|
6095
|
+
```typescript
|
|
6096
|
+
public readonly storageSize: Size;
|
|
6097
|
+
```
|
|
6098
|
+
|
|
6099
|
+
- *Type:* aws-cdk-lib.Size
|
|
6100
|
+
- *Default:* default size for AMI (usually 30GB for Linux and 50GB for Windows)
|
|
6101
|
+
|
|
6102
|
+
Size of volume available for launched cluster instances.
|
|
6103
|
+
|
|
6104
|
+
This modifies the boot volume size and doesn't add any additional volumes.
|
|
6105
|
+
|
|
6106
|
+
Each instance can be used by multiple runners, so make sure there is enough space for all of them.
|
|
6107
|
+
|
|
6108
|
+
---
|
|
6109
|
+
|
|
6110
|
+
##### `subnetSelection`<sup>Optional</sup> <a name="subnetSelection" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.subnetSelection"></a>
|
|
6111
|
+
|
|
6112
|
+
```typescript
|
|
6113
|
+
public readonly subnetSelection: SubnetSelection;
|
|
6114
|
+
```
|
|
6115
|
+
|
|
6116
|
+
- *Type:* aws-cdk-lib.aws_ec2.SubnetSelection
|
|
6117
|
+
- *Default:* ECS default
|
|
6118
|
+
|
|
6119
|
+
Subnets to run the runners in.
|
|
6120
|
+
|
|
6121
|
+
---
|
|
6122
|
+
|
|
6123
|
+
##### `vpc`<sup>Optional</sup> <a name="vpc" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.vpc"></a>
|
|
6124
|
+
|
|
6125
|
+
```typescript
|
|
6126
|
+
public readonly vpc: IVpc;
|
|
6127
|
+
```
|
|
6128
|
+
|
|
6129
|
+
- *Type:* aws-cdk-lib.aws_ec2.IVpc
|
|
6130
|
+
- *Default:* default account VPC
|
|
6131
|
+
|
|
6132
|
+
VPC to launch the runners in.
|
|
6133
|
+
|
|
6134
|
+
---
|
|
6135
|
+
|
|
6136
|
+
### FargateRunnerProviderProps <a name="FargateRunnerProviderProps" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProviderProps"></a>
|
|
6137
|
+
|
|
6138
|
+
Properties for FargateRunnerProvider.
|
|
6139
|
+
|
|
6140
|
+
#### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProviderProps.Initializer"></a>
|
|
6141
|
+
|
|
6142
|
+
```typescript
|
|
6143
|
+
import { FargateRunnerProviderProps } from '@cloudsnorkel/cdk-github-runners'
|
|
6144
|
+
|
|
6145
|
+
const fargateRunnerProviderProps: FargateRunnerProviderProps = { ... }
|
|
6146
|
+
```
|
|
6147
|
+
|
|
6148
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
6149
|
+
|
|
6150
|
+
| **Name** | **Type** | **Description** |
|
|
6151
|
+
| --- | --- | --- |
|
|
6152
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProviderProps.property.logRetention">logRetention</a></code> | <code>aws-cdk-lib.aws_logs.RetentionDays</code> | The number of days log events are kept in CloudWatch Logs. |
|
|
6153
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProviderProps.property.retryOptions">retryOptions</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.ProviderRetryOptions">ProviderRetryOptions</a></code> | Options to retry operation in case of failure like missing capacity, or API quota issues. |
|
|
5539
6154
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProviderProps.property.assignPublicIp">assignPublicIp</a></code> | <code>boolean</code> | Assign public IP to the runner task. |
|
|
5540
6155
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProviderProps.property.cluster">cluster</a></code> | <code>aws-cdk-lib.aws_ecs.Cluster</code> | Existing Fargate cluster to use. |
|
|
5541
6156
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProviderProps.property.cpu">cpu</a></code> | <code>number</code> | The number of cpu units used by the task. |
|
|
@@ -5819,8 +6434,11 @@ const gitHubRunnersProps: GitHubRunnersProps = { ... }
|
|
|
5819
6434
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.logOptions">logOptions</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.LogOptions">LogOptions</a></code> | Logging options for the state machine that manages the runners. |
|
|
5820
6435
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.providers">providers</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>[]</code> | List of runner providers to use. |
|
|
5821
6436
|
| <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. |
|
|
6437
|
+
| <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. |
|
|
6438
|
+
| <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. |
|
|
5822
6439
|
| <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. |
|
|
5823
6440
|
| <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. |
|
|
6441
|
+
| <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. |
|
|
5824
6442
|
|
|
5825
6443
|
---
|
|
5826
6444
|
|
|
@@ -5928,6 +6546,36 @@ Use this with to provide access to GitHub Enterprise Server hosted inside a VPC.
|
|
|
5928
6546
|
|
|
5929
6547
|
---
|
|
5930
6548
|
|
|
6549
|
+
##### `setupAccess`<sup>Optional</sup> <a name="setupAccess" id="@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.setupAccess"></a>
|
|
6550
|
+
|
|
6551
|
+
```typescript
|
|
6552
|
+
public readonly setupAccess: LambdaAccess;
|
|
6553
|
+
```
|
|
6554
|
+
|
|
6555
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.LambdaAccess">LambdaAccess</a>
|
|
6556
|
+
- *Default:* LambdaAccess.lambdaUrl()
|
|
6557
|
+
|
|
6558
|
+
Access configuration for the setup function.
|
|
6559
|
+
|
|
6560
|
+
Once you finish the setup process, you can set this to `LambdaAccess.noAccess()` to remove access to the setup function. You can also use `LambdaAccess.apiGateway({ allowedIps: ['my-ip/0']})` to limit access to your IP only.
|
|
6561
|
+
|
|
6562
|
+
---
|
|
6563
|
+
|
|
6564
|
+
##### `statusAccess`<sup>Optional</sup> <a name="statusAccess" id="@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.statusAccess"></a>
|
|
6565
|
+
|
|
6566
|
+
```typescript
|
|
6567
|
+
public readonly statusAccess: LambdaAccess;
|
|
6568
|
+
```
|
|
6569
|
+
|
|
6570
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.LambdaAccess">LambdaAccess</a>
|
|
6571
|
+
- *Default:* LambdaAccess.noAccess()
|
|
6572
|
+
|
|
6573
|
+
Access configuration for the status function.
|
|
6574
|
+
|
|
6575
|
+
This function returns a lot of sensitive information about the runner, so you should only allow access to it from trusted IPs, if at all.
|
|
6576
|
+
|
|
6577
|
+
---
|
|
6578
|
+
|
|
5931
6579
|
##### `vpc`<sup>Optional</sup> <a name="vpc" id="@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.vpc"></a>
|
|
5932
6580
|
|
|
5933
6581
|
```typescript
|
|
@@ -5956,6 +6604,25 @@ Use this with GitHub Enterprise Server hosted that's inaccessible from outside t
|
|
|
5956
6604
|
|
|
5957
6605
|
---
|
|
5958
6606
|
|
|
6607
|
+
##### `webhookAccess`<sup>Optional</sup> <a name="webhookAccess" id="@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.webhookAccess"></a>
|
|
6608
|
+
|
|
6609
|
+
```typescript
|
|
6610
|
+
public readonly webhookAccess: LambdaAccess;
|
|
6611
|
+
```
|
|
6612
|
+
|
|
6613
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.LambdaAccess">LambdaAccess</a>
|
|
6614
|
+
- *Default:* LambdaAccess.lambdaUrl()
|
|
6615
|
+
|
|
6616
|
+
Access configuration for the webhook function.
|
|
6617
|
+
|
|
6618
|
+
This function is called by GitHub when a new workflow job is scheduled. For an extra layer of security, you can set this to `LambdaAccess.apiGateway({ allowedIps: LambdaAccess.githubWebhookIps() })`.
|
|
6619
|
+
|
|
6620
|
+
You can also set this to `LambdaAccess.privateApiGateway()` if your GitHub Enterprise Server is hosted in a VPC. This will create an API Gateway endpoint that's only accessible from within the VPC.
|
|
6621
|
+
|
|
6622
|
+
*WARNING*: changing access type may change the URL. When the URL changes, you must update GitHub as well.
|
|
6623
|
+
|
|
6624
|
+
---
|
|
6625
|
+
|
|
5959
6626
|
### ImageBuilderAsset <a name="ImageBuilderAsset" id="@cloudsnorkel/cdk-github-runners.ImageBuilderAsset"></a>
|
|
5960
6627
|
|
|
5961
6628
|
An asset including file or directory to place inside the built image.
|
|
@@ -7262,6 +7929,107 @@ X86_64.
|
|
|
7262
7929
|
|
|
7263
7930
|
---
|
|
7264
7931
|
|
|
7932
|
+
### LambdaAccess <a name="LambdaAccess" id="@cloudsnorkel/cdk-github-runners.LambdaAccess"></a>
|
|
7933
|
+
|
|
7934
|
+
Access configuration options for Lambda functions like setup and webhook function.
|
|
7935
|
+
|
|
7936
|
+
Use this to limit access to these functions.
|
|
7937
|
+
|
|
7938
|
+
#### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.LambdaAccess.Initializer"></a>
|
|
7939
|
+
|
|
7940
|
+
```typescript
|
|
7941
|
+
import { LambdaAccess } from '@cloudsnorkel/cdk-github-runners'
|
|
7942
|
+
|
|
7943
|
+
new LambdaAccess()
|
|
7944
|
+
```
|
|
7945
|
+
|
|
7946
|
+
| **Name** | **Type** | **Description** |
|
|
7947
|
+
| --- | --- | --- |
|
|
7948
|
+
|
|
7949
|
+
---
|
|
7950
|
+
|
|
7951
|
+
|
|
7952
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
7953
|
+
|
|
7954
|
+
| **Name** | **Description** |
|
|
7955
|
+
| --- | --- |
|
|
7956
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaAccess.apiGateway">apiGateway</a></code> | Provide access using API Gateway. |
|
|
7957
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaAccess.githubWebhookIps">githubWebhookIps</a></code> | Downloads the list of IP addresses used by GitHub.com for webhooks. |
|
|
7958
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaAccess.lambdaUrl">lambdaUrl</a></code> | Provide access using Lambda URL. |
|
|
7959
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaAccess.noAccess">noAccess</a></code> | Disables access to the configured Lambda function. |
|
|
7960
|
+
|
|
7961
|
+
---
|
|
7962
|
+
|
|
7963
|
+
##### `apiGateway` <a name="apiGateway" id="@cloudsnorkel/cdk-github-runners.LambdaAccess.apiGateway"></a>
|
|
7964
|
+
|
|
7965
|
+
```typescript
|
|
7966
|
+
import { LambdaAccess } from '@cloudsnorkel/cdk-github-runners'
|
|
7967
|
+
|
|
7968
|
+
LambdaAccess.apiGateway(props?: ApiGatewayAccessProps)
|
|
7969
|
+
```
|
|
7970
|
+
|
|
7971
|
+
Provide access using API Gateway.
|
|
7972
|
+
|
|
7973
|
+
This is the most secure option, but requires additional configuration. It allows you to limit access to specific IP addresses and even to a specific VPC.
|
|
7974
|
+
|
|
7975
|
+
To limit access to GitHub.com use:
|
|
7976
|
+
|
|
7977
|
+
```
|
|
7978
|
+
LambdaAccess.apiGateway({
|
|
7979
|
+
allowedIps: LambdaAccess.githubWebhookIps(),
|
|
7980
|
+
});
|
|
7981
|
+
```
|
|
7982
|
+
|
|
7983
|
+
Alternatively, get and manually update the list manually with:
|
|
7984
|
+
|
|
7985
|
+
```
|
|
7986
|
+
curl https://api.github.com/meta | jq .hooks
|
|
7987
|
+
```
|
|
7988
|
+
|
|
7989
|
+
###### `props`<sup>Optional</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.LambdaAccess.apiGateway.parameter.props"></a>
|
|
7990
|
+
|
|
7991
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.ApiGatewayAccessProps">ApiGatewayAccessProps</a>
|
|
7992
|
+
|
|
7993
|
+
---
|
|
7994
|
+
|
|
7995
|
+
##### `githubWebhookIps` <a name="githubWebhookIps" id="@cloudsnorkel/cdk-github-runners.LambdaAccess.githubWebhookIps"></a>
|
|
7996
|
+
|
|
7997
|
+
```typescript
|
|
7998
|
+
import { LambdaAccess } from '@cloudsnorkel/cdk-github-runners'
|
|
7999
|
+
|
|
8000
|
+
LambdaAccess.githubWebhookIps()
|
|
8001
|
+
```
|
|
8002
|
+
|
|
8003
|
+
Downloads the list of IP addresses used by GitHub.com for webhooks.
|
|
8004
|
+
|
|
8005
|
+
Note that downloading dynamic data during deployment is not recommended in CDK. This is a workaround for the lack of a better solution.
|
|
8006
|
+
|
|
8007
|
+
##### `lambdaUrl` <a name="lambdaUrl" id="@cloudsnorkel/cdk-github-runners.LambdaAccess.lambdaUrl"></a>
|
|
8008
|
+
|
|
8009
|
+
```typescript
|
|
8010
|
+
import { LambdaAccess } from '@cloudsnorkel/cdk-github-runners'
|
|
8011
|
+
|
|
8012
|
+
LambdaAccess.lambdaUrl()
|
|
8013
|
+
```
|
|
8014
|
+
|
|
8015
|
+
Provide access using Lambda URL.
|
|
8016
|
+
|
|
8017
|
+
This is the default and simplest option. It puts no limits on the requester, but the Lambda functions themselves authenticate every request.
|
|
8018
|
+
|
|
8019
|
+
##### `noAccess` <a name="noAccess" id="@cloudsnorkel/cdk-github-runners.LambdaAccess.noAccess"></a>
|
|
8020
|
+
|
|
8021
|
+
```typescript
|
|
8022
|
+
import { LambdaAccess } from '@cloudsnorkel/cdk-github-runners'
|
|
8023
|
+
|
|
8024
|
+
LambdaAccess.noAccess()
|
|
8025
|
+
```
|
|
8026
|
+
|
|
8027
|
+
Disables access to the configured Lambda function.
|
|
8028
|
+
|
|
8029
|
+
This is useful for the setup function after setup is done.
|
|
8030
|
+
|
|
8031
|
+
|
|
8032
|
+
|
|
7265
8033
|
### LinuxUbuntuComponents <a name="LinuxUbuntuComponents" id="@cloudsnorkel/cdk-github-runners.LinuxUbuntuComponents"></a>
|
|
7266
8034
|
|
|
7267
8035
|
Components for Ubuntu Linux that can be used with AWS Image Builder based builders.
|
|
@@ -8490,7 +9258,7 @@ Log group name for the image builder where history of image builds can be analyz
|
|
|
8490
9258
|
|
|
8491
9259
|
- *Extends:* aws-cdk-lib.aws_ec2.IConnectable, aws-cdk-lib.aws_iam.IGrantable, constructs.IConstruct
|
|
8492
9260
|
|
|
8493
|
-
- *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner">CodeBuildRunner</a>, <a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider">CodeBuildRunnerProvider</a>, <a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner">Ec2Runner</a>, <a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider">Ec2RunnerProvider</a>, <a href="#@cloudsnorkel/cdk-github-runners.FargateRunner">FargateRunner</a>, <a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProvider">FargateRunnerProvider</a>, <a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner">LambdaRunner</a>, <a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider">LambdaRunnerProvider</a>, <a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>
|
|
9261
|
+
- *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner">CodeBuildRunner</a>, <a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider">CodeBuildRunnerProvider</a>, <a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner">Ec2Runner</a>, <a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider">Ec2RunnerProvider</a>, <a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider">EcsRunnerProvider</a>, <a href="#@cloudsnorkel/cdk-github-runners.FargateRunner">FargateRunner</a>, <a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProvider">FargateRunnerProvider</a>, <a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner">LambdaRunner</a>, <a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider">LambdaRunnerProvider</a>, <a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>
|
|
8494
9262
|
|
|
8495
9263
|
Interface for all runner providers.
|
|
8496
9264
|
|