cloudsnorkel.cdk-github-runners 0.11.5__py3-none-any.whl → 0.12.0__py3-none-any.whl
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.
- cloudsnorkel/cdk_github_runners/__init__.py +851 -699
- cloudsnorkel/cdk_github_runners/_jsii/__init__.py +2 -2
- cloudsnorkel/cdk_github_runners/_jsii/cdk-github-runners@0.12.0.jsii.tgz +0 -0
- {cloudsnorkel.cdk_github_runners-0.11.5.dist-info → cloudsnorkel.cdk_github_runners-0.12.0.dist-info}/METADATA +14 -25
- cloudsnorkel.cdk_github_runners-0.12.0.dist-info/RECORD +9 -0
- {cloudsnorkel.cdk_github_runners-0.11.5.dist-info → cloudsnorkel.cdk_github_runners-0.12.0.dist-info}/WHEEL +1 -1
- cloudsnorkel/cdk_github_runners/_jsii/cdk-github-runners@0.11.5.jsii.tgz +0 -0
- cloudsnorkel.cdk_github_runners-0.11.5.dist-info/RECORD +0 -9
- {cloudsnorkel.cdk_github_runners-0.11.5.dist-info → cloudsnorkel.cdk_github_runners-0.12.0.dist-info}/LICENSE +0 -0
- {cloudsnorkel.cdk_github_runners-0.11.5.dist-info → cloudsnorkel.cdk_github_runners-0.12.0.dist-info}/top_level.txt +0 -0
|
@@ -207,19 +207,13 @@ new GitHubRunners(this, 'runners', {
|
|
|
207
207
|
Another way to customize runners is by modifying the image used to spin them up. The image contains the [runner](https://github.com/actions/runner), any required dependencies, and integration code with the provider. You may choose to customize this image by adding more packages, for example.
|
|
208
208
|
|
|
209
209
|
```python
|
|
210
|
-
const myBuilder =
|
|
211
|
-
dockerfilePath: FargateRunner.LINUX_X64_DOCKERFILE_PATH,
|
|
212
|
-
runnerVersion: RunnerVersion.specific('2.291.0'),
|
|
213
|
-
rebuildInterval: Duration.days(14),
|
|
214
|
-
});
|
|
210
|
+
const myBuilder = FargateRunnerProvider.imageBuilder(this, 'image builder');
|
|
215
211
|
myBuilder.addComponent(
|
|
216
|
-
RunnerImageComponent.custom({ commands: ['apt install -y nginx xz-utils'] })
|
|
212
|
+
RunnerImageComponent.custom({ commands: ['apt install -y nginx xz-utils'] }),
|
|
217
213
|
);
|
|
218
214
|
|
|
219
215
|
const myProvider = new FargateRunnerProvider(this, 'fargate runner', {
|
|
220
216
|
labels: ['customized-fargate'],
|
|
221
|
-
vpc: vpc,
|
|
222
|
-
securityGroups: [runnerSg],
|
|
223
217
|
imageBuilder: myBuilder,
|
|
224
218
|
});
|
|
225
219
|
|
|
@@ -247,24 +241,20 @@ Windows images can also be customized the same way.
|
|
|
247
241
|
const myWindowsBuilder = FargateRunnerProvider.imageBuilder(this, 'Windows image builder', {
|
|
248
242
|
architecture: Architecture.X86_64,
|
|
249
243
|
os: Os.WINDOWS,
|
|
250
|
-
runnerVersion: RunnerVersion.specific('2.291.0'),
|
|
251
|
-
rebuildInterval: Duration.days(14),
|
|
252
244
|
});
|
|
253
245
|
myWindowsBuilder.addComponent(
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
246
|
+
RunnerImageComponent.custom({
|
|
247
|
+
name: 'Ninja',
|
|
248
|
+
commands: [
|
|
249
|
+
'Invoke-WebRequest -UseBasicParsing -Uri "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip" -OutFile ninja.zip',
|
|
250
|
+
'Expand-Archive ninja.zip -DestinationPath C:\\actions',
|
|
251
|
+
'del ninja.zip',
|
|
252
|
+
],
|
|
253
|
+
}),
|
|
262
254
|
);
|
|
263
255
|
|
|
264
256
|
const myProvider = new FargateRunnerProvider(this, 'fargate runner', {
|
|
265
257
|
labels: ['customized-windows-fargate'],
|
|
266
|
-
vpc: vpc,
|
|
267
|
-
securityGroups: [runnerSg],
|
|
268
258
|
imageBuilder: myWindowsBuilder,
|
|
269
259
|
});
|
|
270
260
|
|
|
@@ -1562,6 +1552,7 @@ class GitHubRunners(
|
|
|
1562
1552
|
idle_timeout: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
|
1563
1553
|
log_options: typing.Optional[typing.Union["LogOptions", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1564
1554
|
providers: typing.Optional[typing.Sequence["IRunnerProvider"]] = None,
|
|
1555
|
+
require_self_hosted_label: typing.Optional[builtins.bool] = None,
|
|
1565
1556
|
retry_options: typing.Optional[typing.Union["ProviderRetryOptions", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1566
1557
|
security_group: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup] = None,
|
|
1567
1558
|
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
@@ -1579,6 +1570,7 @@ class GitHubRunners(
|
|
|
1579
1570
|
:param idle_timeout: (experimental) Time to wait before stopping a runner that remains idle. If the user cancelled the job, or if another runner stole it, this stops the runner to avoid wasting resources. Default: 5 minutes
|
|
1580
1571
|
:param log_options: (experimental) Logging options for the state machine that manages the runners. Default: no logs
|
|
1581
1572
|
:param providers: (experimental) List of runner providers to use. At least one provider is required. Provider will be selected when its label matches the labels requested by the workflow job. Default: CodeBuild, Lambda and Fargate runners with all the defaults (no VPC or default account VPC)
|
|
1573
|
+
:param require_self_hosted_label: (experimental) Whether to require the ``self-hosted`` label. If ``true``, the runner will only start if the workflow job explicitly requests the ``self-hosted`` label. Be careful when setting this to ``false``. Avoid setting up providers with generic label requirements like ``linux`` as they may match workflows that are not meant to run on self-hosted runners. Default: true
|
|
1582
1574
|
:param retry_options: (experimental) Options to retry operation in case of failure like missing capacity, or API quota issues. GitHub jobs time out after not being able to get a runner for 24 hours. You should not retry for more than 24 hours. Total time spent waiting can be calculated with interval * (backoffRate ^ maxAttempts) / (backoffRate - 1). Default: retry 23 times up to about 24 hours
|
|
1583
1575
|
:param security_group: (deprecated) Security group attached to all management functions. Use this with to provide access to GitHub Enterprise Server hosted inside a VPC.
|
|
1584
1576
|
:param security_groups: (experimental) Security groups attached to all management functions. Use this with to provide access to GitHub Enterprise Server hosted inside a VPC.
|
|
@@ -1600,6 +1592,7 @@ class GitHubRunners(
|
|
|
1600
1592
|
idle_timeout=idle_timeout,
|
|
1601
1593
|
log_options=log_options,
|
|
1602
1594
|
providers=providers,
|
|
1595
|
+
require_self_hosted_label=require_self_hosted_label,
|
|
1603
1596
|
retry_options=retry_options,
|
|
1604
1597
|
security_group=security_group,
|
|
1605
1598
|
security_groups=security_groups,
|
|
@@ -1878,6 +1871,7 @@ class GitHubRunners(
|
|
|
1878
1871
|
"idle_timeout": "idleTimeout",
|
|
1879
1872
|
"log_options": "logOptions",
|
|
1880
1873
|
"providers": "providers",
|
|
1874
|
+
"require_self_hosted_label": "requireSelfHostedLabel",
|
|
1881
1875
|
"retry_options": "retryOptions",
|
|
1882
1876
|
"security_group": "securityGroup",
|
|
1883
1877
|
"security_groups": "securityGroups",
|
|
@@ -1897,6 +1891,7 @@ class GitHubRunnersProps:
|
|
|
1897
1891
|
idle_timeout: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
|
1898
1892
|
log_options: typing.Optional[typing.Union["LogOptions", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1899
1893
|
providers: typing.Optional[typing.Sequence["IRunnerProvider"]] = None,
|
|
1894
|
+
require_self_hosted_label: typing.Optional[builtins.bool] = None,
|
|
1900
1895
|
retry_options: typing.Optional[typing.Union["ProviderRetryOptions", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1901
1896
|
security_group: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup] = None,
|
|
1902
1897
|
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
@@ -1913,6 +1908,7 @@ class GitHubRunnersProps:
|
|
|
1913
1908
|
:param idle_timeout: (experimental) Time to wait before stopping a runner that remains idle. If the user cancelled the job, or if another runner stole it, this stops the runner to avoid wasting resources. Default: 5 minutes
|
|
1914
1909
|
:param log_options: (experimental) Logging options for the state machine that manages the runners. Default: no logs
|
|
1915
1910
|
:param providers: (experimental) List of runner providers to use. At least one provider is required. Provider will be selected when its label matches the labels requested by the workflow job. Default: CodeBuild, Lambda and Fargate runners with all the defaults (no VPC or default account VPC)
|
|
1911
|
+
:param require_self_hosted_label: (experimental) Whether to require the ``self-hosted`` label. If ``true``, the runner will only start if the workflow job explicitly requests the ``self-hosted`` label. Be careful when setting this to ``false``. Avoid setting up providers with generic label requirements like ``linux`` as they may match workflows that are not meant to run on self-hosted runners. Default: true
|
|
1916
1912
|
:param retry_options: (experimental) Options to retry operation in case of failure like missing capacity, or API quota issues. GitHub jobs time out after not being able to get a runner for 24 hours. You should not retry for more than 24 hours. Total time spent waiting can be calculated with interval * (backoffRate ^ maxAttempts) / (backoffRate - 1). Default: retry 23 times up to about 24 hours
|
|
1917
1913
|
:param security_group: (deprecated) Security group attached to all management functions. Use this with to provide access to GitHub Enterprise Server hosted inside a VPC.
|
|
1918
1914
|
:param security_groups: (experimental) Security groups attached to all management functions. Use this with to provide access to GitHub Enterprise Server hosted inside a VPC.
|
|
@@ -1937,6 +1933,7 @@ class GitHubRunnersProps:
|
|
|
1937
1933
|
check_type(argname="argument idle_timeout", value=idle_timeout, expected_type=type_hints["idle_timeout"])
|
|
1938
1934
|
check_type(argname="argument log_options", value=log_options, expected_type=type_hints["log_options"])
|
|
1939
1935
|
check_type(argname="argument providers", value=providers, expected_type=type_hints["providers"])
|
|
1936
|
+
check_type(argname="argument require_self_hosted_label", value=require_self_hosted_label, expected_type=type_hints["require_self_hosted_label"])
|
|
1940
1937
|
check_type(argname="argument retry_options", value=retry_options, expected_type=type_hints["retry_options"])
|
|
1941
1938
|
check_type(argname="argument security_group", value=security_group, expected_type=type_hints["security_group"])
|
|
1942
1939
|
check_type(argname="argument security_groups", value=security_groups, expected_type=type_hints["security_groups"])
|
|
@@ -1956,6 +1953,8 @@ class GitHubRunnersProps:
|
|
|
1956
1953
|
self._values["log_options"] = log_options
|
|
1957
1954
|
if providers is not None:
|
|
1958
1955
|
self._values["providers"] = providers
|
|
1956
|
+
if require_self_hosted_label is not None:
|
|
1957
|
+
self._values["require_self_hosted_label"] = require_self_hosted_label
|
|
1959
1958
|
if retry_options is not None:
|
|
1960
1959
|
self._values["retry_options"] = retry_options
|
|
1961
1960
|
if security_group is not None:
|
|
@@ -2050,6 +2049,21 @@ class GitHubRunnersProps:
|
|
|
2050
2049
|
result = self._values.get("providers")
|
|
2051
2050
|
return typing.cast(typing.Optional[typing.List["IRunnerProvider"]], result)
|
|
2052
2051
|
|
|
2052
|
+
@builtins.property
|
|
2053
|
+
def require_self_hosted_label(self) -> typing.Optional[builtins.bool]:
|
|
2054
|
+
'''(experimental) Whether to require the ``self-hosted`` label.
|
|
2055
|
+
|
|
2056
|
+
If ``true``, the runner will only start if the workflow job explicitly requests the ``self-hosted`` label.
|
|
2057
|
+
|
|
2058
|
+
Be careful when setting this to ``false``. Avoid setting up providers with generic label requirements like ``linux`` as they may match workflows that are not meant to run on self-hosted runners.
|
|
2059
|
+
|
|
2060
|
+
:default: true
|
|
2061
|
+
|
|
2062
|
+
:stability: experimental
|
|
2063
|
+
'''
|
|
2064
|
+
result = self._values.get("require_self_hosted_label")
|
|
2065
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
2066
|
+
|
|
2053
2067
|
@builtins.property
|
|
2054
2068
|
def retry_options(self) -> typing.Optional["ProviderRetryOptions"]:
|
|
2055
2069
|
'''(experimental) Options to retry operation in case of failure like missing capacity, or API quota issues.
|
|
@@ -2905,6 +2919,27 @@ class ImageBuilderComponent(
|
|
|
2905
2919
|
|
|
2906
2920
|
jsii.create(self.__class__, self, [scope, id, props])
|
|
2907
2921
|
|
|
2922
|
+
@jsii.member(jsii_name="generateVersion")
|
|
2923
|
+
def _generate_version(
|
|
2924
|
+
self,
|
|
2925
|
+
type: builtins.str,
|
|
2926
|
+
name: builtins.str,
|
|
2927
|
+
data: typing.Any,
|
|
2928
|
+
) -> builtins.str:
|
|
2929
|
+
'''
|
|
2930
|
+
:param type: -
|
|
2931
|
+
:param name: -
|
|
2932
|
+
:param data: -
|
|
2933
|
+
|
|
2934
|
+
:stability: deprecated
|
|
2935
|
+
'''
|
|
2936
|
+
if __debug__:
|
|
2937
|
+
type_hints = typing.get_type_hints(_typecheckingstub__abecb3decfe8eebf190daa2e93a508111cc10650e6b9fbf65b3a34f3ed07ca24)
|
|
2938
|
+
check_type(argname="argument type", value=type, expected_type=type_hints["type"])
|
|
2939
|
+
check_type(argname="argument name", value=name, expected_type=type_hints["name"])
|
|
2940
|
+
check_type(argname="argument data", value=data, expected_type=type_hints["data"])
|
|
2941
|
+
return typing.cast(builtins.str, jsii.invoke(self, "generateVersion", [type, name, data]))
|
|
2942
|
+
|
|
2908
2943
|
@jsii.member(jsii_name="grantAssetsRead")
|
|
2909
2944
|
def grant_assets_read(self, grantee: _aws_cdk_aws_iam_ceddda9d.IGrantable) -> None:
|
|
2910
2945
|
'''(deprecated) Grants read permissions to the principal on the assets buckets.
|
|
@@ -2936,27 +2971,6 @@ class ImageBuilderComponent(
|
|
|
2936
2971
|
check_type(argname="argument commands", value=commands, expected_type=type_hints["commands"])
|
|
2937
2972
|
return typing.cast(typing.List[builtins.str], jsii.invoke(self, "prefixCommandsWithErrorHandling", [platform, commands]))
|
|
2938
2973
|
|
|
2939
|
-
@jsii.member(jsii_name="version")
|
|
2940
|
-
def _version(
|
|
2941
|
-
self,
|
|
2942
|
-
type: builtins.str,
|
|
2943
|
-
name: builtins.str,
|
|
2944
|
-
data: typing.Any,
|
|
2945
|
-
) -> builtins.str:
|
|
2946
|
-
'''
|
|
2947
|
-
:param type: -
|
|
2948
|
-
:param name: -
|
|
2949
|
-
:param data: -
|
|
2950
|
-
|
|
2951
|
-
:stability: deprecated
|
|
2952
|
-
'''
|
|
2953
|
-
if __debug__:
|
|
2954
|
-
type_hints = typing.get_type_hints(_typecheckingstub__e11323aa6f18ef1898e18067dba5908fdeabd333bfc1604f92c4c244adb28f7f)
|
|
2955
|
-
check_type(argname="argument type", value=type, expected_type=type_hints["type"])
|
|
2956
|
-
check_type(argname="argument name", value=name, expected_type=type_hints["name"])
|
|
2957
|
-
check_type(argname="argument data", value=data, expected_type=type_hints["data"])
|
|
2958
|
-
return typing.cast(builtins.str, jsii.invoke(self, "version", [type, name, data]))
|
|
2959
|
-
|
|
2960
2974
|
@builtins.property
|
|
2961
2975
|
@jsii.member(jsii_name="arn")
|
|
2962
2976
|
def arn(self) -> builtins.str:
|
|
@@ -3339,8 +3353,14 @@ class LambdaRunnerProvider(
|
|
|
3339
3353
|
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
3340
3354
|
subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
3341
3355
|
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
|
3342
|
-
) -> "
|
|
3343
|
-
'''(experimental) Create new image builder that builds Lambda specific runner images
|
|
3356
|
+
) -> "IConfigurableRunnerImageBuilder":
|
|
3357
|
+
'''(experimental) Create new image builder that builds Lambda specific runner images.
|
|
3358
|
+
|
|
3359
|
+
You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
|
|
3360
|
+
|
|
3361
|
+
You can add components to the image builder by calling ``imageBuilder.addComponent()``.
|
|
3362
|
+
|
|
3363
|
+
The default OS is Amazon Linux 2 running on x64 architecture.
|
|
3344
3364
|
|
|
3345
3365
|
Included components:
|
|
3346
3366
|
|
|
@@ -3396,7 +3416,7 @@ class LambdaRunnerProvider(
|
|
|
3396
3416
|
vpc=vpc,
|
|
3397
3417
|
)
|
|
3398
3418
|
|
|
3399
|
-
return typing.cast("
|
|
3419
|
+
return typing.cast("IConfigurableRunnerImageBuilder", jsii.sinvoke(cls, "imageBuilder", [scope, id, props]))
|
|
3400
3420
|
|
|
3401
3421
|
@jsii.member(jsii_name="getStepFunctionTask")
|
|
3402
3422
|
def get_step_function_task(
|
|
@@ -4372,25 +4392,30 @@ class RunnerImageAsset:
|
|
|
4372
4392
|
)
|
|
4373
4393
|
|
|
4374
4394
|
|
|
4375
|
-
@jsii.
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4395
|
+
@jsii.data_type(
|
|
4396
|
+
jsii_type="@cloudsnorkel/cdk-github-runners.RunnerImageBuilderProps",
|
|
4397
|
+
jsii_struct_bases=[],
|
|
4398
|
+
name_mapping={
|
|
4399
|
+
"architecture": "architecture",
|
|
4400
|
+
"aws_image_builder_options": "awsImageBuilderOptions",
|
|
4401
|
+
"base_ami": "baseAmi",
|
|
4402
|
+
"base_docker_image": "baseDockerImage",
|
|
4403
|
+
"builder_type": "builderType",
|
|
4404
|
+
"code_build_options": "codeBuildOptions",
|
|
4405
|
+
"components": "components",
|
|
4406
|
+
"log_removal_policy": "logRemovalPolicy",
|
|
4407
|
+
"log_retention": "logRetention",
|
|
4408
|
+
"os": "os",
|
|
4409
|
+
"rebuild_interval": "rebuildInterval",
|
|
4410
|
+
"runner_version": "runnerVersion",
|
|
4411
|
+
"security_groups": "securityGroups",
|
|
4412
|
+
"subnet_selection": "subnetSelection",
|
|
4413
|
+
"vpc": "vpc",
|
|
4414
|
+
},
|
|
4415
|
+
)
|
|
4416
|
+
class RunnerImageBuilderProps:
|
|
4390
4417
|
def __init__(
|
|
4391
4418
|
self,
|
|
4392
|
-
scope: _constructs_77d1e7e8.Construct,
|
|
4393
|
-
id: builtins.str,
|
|
4394
4419
|
*,
|
|
4395
4420
|
architecture: typing.Optional[Architecture] = None,
|
|
4396
4421
|
aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
@@ -4409,8 +4434,6 @@ class RunnerImageBuilder(
|
|
|
4409
4434
|
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
|
4410
4435
|
) -> None:
|
|
4411
4436
|
'''
|
|
4412
|
-
:param scope: -
|
|
4413
|
-
:param id: -
|
|
4414
4437
|
:param architecture: (experimental) Image architecture. Default: Architecture.X86_64
|
|
4415
4438
|
:param aws_image_builder_options: (experimental) Options specific to AWS Image Builder. Only used when builderType is RunnerImageBuilderType.AWS_IMAGE_BUILDER.
|
|
4416
4439
|
:param base_ami: (experimental) Base AMI from which runner AMIs will be built. This can be an actual AMI or an AWS Image Builder ARN that points to the latest AMI. For example ``arn:aws:imagebuilder:us-east-1:aws:image/ubuntu-server-22-lts-x86/x.x.x`` would always use the latest version of Ubuntu 22.04 in each build. If you want a specific version, you can replace ``x.x.x`` with that version. Default: latest Ubuntu 22.04 AMI for Os.LINUX_UBUNTU, latest Amazon Linux 2 AMI for Os.LINUX_AMAZON_2, latest Windows Server 2022 AMI for Os.WINDOWS
|
|
@@ -4429,553 +4452,255 @@ class RunnerImageBuilder(
|
|
|
4429
4452
|
|
|
4430
4453
|
:stability: experimental
|
|
4431
4454
|
'''
|
|
4455
|
+
if isinstance(aws_image_builder_options, dict):
|
|
4456
|
+
aws_image_builder_options = AwsImageBuilderRunnerImageBuilderProps(**aws_image_builder_options)
|
|
4457
|
+
if isinstance(code_build_options, dict):
|
|
4458
|
+
code_build_options = CodeBuildRunnerImageBuilderProps(**code_build_options)
|
|
4459
|
+
if isinstance(subnet_selection, dict):
|
|
4460
|
+
subnet_selection = _aws_cdk_aws_ec2_ceddda9d.SubnetSelection(**subnet_selection)
|
|
4432
4461
|
if __debug__:
|
|
4433
|
-
type_hints = typing.get_type_hints(
|
|
4434
|
-
check_type(argname="argument
|
|
4435
|
-
check_type(argname="argument
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4462
|
+
type_hints = typing.get_type_hints(_typecheckingstub__ab96b7f3871624e8430668114e7f5748ba5d253168db5b8f9a13955d0a82e43d)
|
|
4463
|
+
check_type(argname="argument architecture", value=architecture, expected_type=type_hints["architecture"])
|
|
4464
|
+
check_type(argname="argument aws_image_builder_options", value=aws_image_builder_options, expected_type=type_hints["aws_image_builder_options"])
|
|
4465
|
+
check_type(argname="argument base_ami", value=base_ami, expected_type=type_hints["base_ami"])
|
|
4466
|
+
check_type(argname="argument base_docker_image", value=base_docker_image, expected_type=type_hints["base_docker_image"])
|
|
4467
|
+
check_type(argname="argument builder_type", value=builder_type, expected_type=type_hints["builder_type"])
|
|
4468
|
+
check_type(argname="argument code_build_options", value=code_build_options, expected_type=type_hints["code_build_options"])
|
|
4469
|
+
check_type(argname="argument components", value=components, expected_type=type_hints["components"])
|
|
4470
|
+
check_type(argname="argument log_removal_policy", value=log_removal_policy, expected_type=type_hints["log_removal_policy"])
|
|
4471
|
+
check_type(argname="argument log_retention", value=log_retention, expected_type=type_hints["log_retention"])
|
|
4472
|
+
check_type(argname="argument os", value=os, expected_type=type_hints["os"])
|
|
4473
|
+
check_type(argname="argument rebuild_interval", value=rebuild_interval, expected_type=type_hints["rebuild_interval"])
|
|
4474
|
+
check_type(argname="argument runner_version", value=runner_version, expected_type=type_hints["runner_version"])
|
|
4475
|
+
check_type(argname="argument security_groups", value=security_groups, expected_type=type_hints["security_groups"])
|
|
4476
|
+
check_type(argname="argument subnet_selection", value=subnet_selection, expected_type=type_hints["subnet_selection"])
|
|
4477
|
+
check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
|
|
4478
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
4479
|
+
if architecture is not None:
|
|
4480
|
+
self._values["architecture"] = architecture
|
|
4481
|
+
if aws_image_builder_options is not None:
|
|
4482
|
+
self._values["aws_image_builder_options"] = aws_image_builder_options
|
|
4483
|
+
if base_ami is not None:
|
|
4484
|
+
self._values["base_ami"] = base_ami
|
|
4485
|
+
if base_docker_image is not None:
|
|
4486
|
+
self._values["base_docker_image"] = base_docker_image
|
|
4487
|
+
if builder_type is not None:
|
|
4488
|
+
self._values["builder_type"] = builder_type
|
|
4489
|
+
if code_build_options is not None:
|
|
4490
|
+
self._values["code_build_options"] = code_build_options
|
|
4491
|
+
if components is not None:
|
|
4492
|
+
self._values["components"] = components
|
|
4493
|
+
if log_removal_policy is not None:
|
|
4494
|
+
self._values["log_removal_policy"] = log_removal_policy
|
|
4495
|
+
if log_retention is not None:
|
|
4496
|
+
self._values["log_retention"] = log_retention
|
|
4497
|
+
if os is not None:
|
|
4498
|
+
self._values["os"] = os
|
|
4499
|
+
if rebuild_interval is not None:
|
|
4500
|
+
self._values["rebuild_interval"] = rebuild_interval
|
|
4501
|
+
if runner_version is not None:
|
|
4502
|
+
self._values["runner_version"] = runner_version
|
|
4503
|
+
if security_groups is not None:
|
|
4504
|
+
self._values["security_groups"] = security_groups
|
|
4505
|
+
if subnet_selection is not None:
|
|
4506
|
+
self._values["subnet_selection"] = subnet_selection
|
|
4507
|
+
if vpc is not None:
|
|
4508
|
+
self._values["vpc"] = vpc
|
|
4453
4509
|
|
|
4454
|
-
|
|
4510
|
+
@builtins.property
|
|
4511
|
+
def architecture(self) -> typing.Optional[Architecture]:
|
|
4512
|
+
'''(experimental) Image architecture.
|
|
4455
4513
|
|
|
4456
|
-
|
|
4457
|
-
@builtins.classmethod
|
|
4458
|
-
def new(
|
|
4459
|
-
cls,
|
|
4460
|
-
scope: _constructs_77d1e7e8.Construct,
|
|
4461
|
-
id: builtins.str,
|
|
4462
|
-
*,
|
|
4463
|
-
architecture: typing.Optional[Architecture] = None,
|
|
4464
|
-
aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4465
|
-
base_ami: typing.Optional[builtins.str] = None,
|
|
4466
|
-
base_docker_image: typing.Optional[builtins.str] = None,
|
|
4467
|
-
builder_type: typing.Optional["RunnerImageBuilderType"] = None,
|
|
4468
|
-
code_build_options: typing.Optional[typing.Union[CodeBuildRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4469
|
-
components: typing.Optional[typing.Sequence["RunnerImageComponent"]] = None,
|
|
4470
|
-
log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
4471
|
-
log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
|
|
4472
|
-
os: typing.Optional[Os] = None,
|
|
4473
|
-
rebuild_interval: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
|
4474
|
-
runner_version: typing.Optional["RunnerVersion"] = None,
|
|
4475
|
-
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
4476
|
-
subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4477
|
-
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
|
4478
|
-
) -> "RunnerImageBuilder":
|
|
4479
|
-
'''(experimental) Create a new image builder based on the provided properties.
|
|
4514
|
+
:default: Architecture.X86_64
|
|
4480
4515
|
|
|
4481
|
-
|
|
4516
|
+
:stability: experimental
|
|
4517
|
+
'''
|
|
4518
|
+
result = self._values.get("architecture")
|
|
4519
|
+
return typing.cast(typing.Optional[Architecture], result)
|
|
4482
4520
|
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
:param code_build_options: (experimental) Options specific to CodeBuild image builder. Only used when builderType is RunnerImageBuilderType.CODE_BUILD.
|
|
4491
|
-
:param components: (experimental) Components to install on the image. Default: none
|
|
4492
|
-
:param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
|
|
4493
|
-
:param log_retention: (experimental) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. Default: logs.RetentionDays.ONE_MONTH
|
|
4494
|
-
:param os: (experimental) Image OS. Default: OS.LINUX_UBUNTU
|
|
4495
|
-
:param rebuild_interval: (experimental) Schedule the image to be rebuilt every given interval. Useful for keeping the image up-do-date with the latest GitHub runner version and latest OS updates. Set to zero to disable. Default: Duration.days(7)
|
|
4496
|
-
:param runner_version: (experimental) Version of GitHub Runners to install. Default: latest version available
|
|
4497
|
-
:param security_groups: (experimental) Security Groups to assign to this instance.
|
|
4498
|
-
:param subnet_selection: (experimental) Where to place the network interfaces within the VPC. Default: no subnet
|
|
4499
|
-
:param vpc: (experimental) VPC to build the image in. Default: no VPC
|
|
4521
|
+
@builtins.property
|
|
4522
|
+
def aws_image_builder_options(
|
|
4523
|
+
self,
|
|
4524
|
+
) -> typing.Optional[AwsImageBuilderRunnerImageBuilderProps]:
|
|
4525
|
+
'''(experimental) Options specific to AWS Image Builder.
|
|
4526
|
+
|
|
4527
|
+
Only used when builderType is RunnerImageBuilderType.AWS_IMAGE_BUILDER.
|
|
4500
4528
|
|
|
4501
4529
|
:stability: experimental
|
|
4502
4530
|
'''
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
4506
|
-
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
4507
|
-
props = RunnerImageBuilderProps(
|
|
4508
|
-
architecture=architecture,
|
|
4509
|
-
aws_image_builder_options=aws_image_builder_options,
|
|
4510
|
-
base_ami=base_ami,
|
|
4511
|
-
base_docker_image=base_docker_image,
|
|
4512
|
-
builder_type=builder_type,
|
|
4513
|
-
code_build_options=code_build_options,
|
|
4514
|
-
components=components,
|
|
4515
|
-
log_removal_policy=log_removal_policy,
|
|
4516
|
-
log_retention=log_retention,
|
|
4517
|
-
os=os,
|
|
4518
|
-
rebuild_interval=rebuild_interval,
|
|
4519
|
-
runner_version=runner_version,
|
|
4520
|
-
security_groups=security_groups,
|
|
4521
|
-
subnet_selection=subnet_selection,
|
|
4522
|
-
vpc=vpc,
|
|
4523
|
-
)
|
|
4524
|
-
|
|
4525
|
-
return typing.cast("RunnerImageBuilder", jsii.sinvoke(cls, "new", [scope, id, props]))
|
|
4531
|
+
result = self._values.get("aws_image_builder_options")
|
|
4532
|
+
return typing.cast(typing.Optional[AwsImageBuilderRunnerImageBuilderProps], result)
|
|
4526
4533
|
|
|
4527
|
-
@
|
|
4528
|
-
def
|
|
4529
|
-
'''(experimental)
|
|
4534
|
+
@builtins.property
|
|
4535
|
+
def base_ami(self) -> typing.Optional[builtins.str]:
|
|
4536
|
+
'''(experimental) Base AMI from which runner AMIs will be built.
|
|
4530
4537
|
|
|
4531
|
-
|
|
4538
|
+
This can be an actual AMI or an AWS Image Builder ARN that points to the latest AMI. For example ``arn:aws:imagebuilder:us-east-1:aws:image/ubuntu-server-22-lts-x86/x.x.x`` would always use the latest version of Ubuntu 22.04 in each build. If you want a specific version, you can replace ``x.x.x`` with that version.
|
|
4532
4539
|
|
|
4533
|
-
:
|
|
4540
|
+
:default: latest Ubuntu 22.04 AMI for Os.LINUX_UBUNTU, latest Amazon Linux 2 AMI for Os.LINUX_AMAZON_2, latest Windows Server 2022 AMI for Os.WINDOWS
|
|
4534
4541
|
|
|
4535
4542
|
:stability: experimental
|
|
4536
4543
|
'''
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
check_type(argname="argument component", value=component, expected_type=type_hints["component"])
|
|
4540
|
-
return typing.cast(None, jsii.invoke(self, "addComponent", [component]))
|
|
4541
|
-
|
|
4542
|
-
@jsii.member(jsii_name="bindAmi")
|
|
4543
|
-
@abc.abstractmethod
|
|
4544
|
-
def bind_ami(self) -> RunnerAmi:
|
|
4545
|
-
'''(experimental) Build and return an AMI with GitHub Runner installed in it.
|
|
4544
|
+
result = self._values.get("base_ami")
|
|
4545
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
4546
4546
|
|
|
4547
|
-
|
|
4547
|
+
@builtins.property
|
|
4548
|
+
def base_docker_image(self) -> typing.Optional[builtins.str]:
|
|
4549
|
+
'''(experimental) Base image from which Docker runner images will be built.
|
|
4548
4550
|
|
|
4549
|
-
|
|
4551
|
+
:default: public.ecr.aws/lts/ubuntu:22.04 for Os.LINUX_UBUNTU, public.ecr.aws/amazonlinux/amazonlinux:2 for Os.LINUX_AMAZON_2, mcr.microsoft.com/windows/servercore:ltsc2019-amd64 for Os.WINDOWS
|
|
4550
4552
|
|
|
4551
4553
|
:stability: experimental
|
|
4552
4554
|
'''
|
|
4553
|
-
|
|
4555
|
+
result = self._values.get("base_docker_image")
|
|
4556
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
4554
4557
|
|
|
4555
|
-
@
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4558
|
+
@builtins.property
|
|
4559
|
+
def builder_type(self) -> typing.Optional["RunnerImageBuilderType"]:
|
|
4560
|
+
'''
|
|
4561
|
+
:default: CodeBuild for Linux Docker image, AWS Image Builder for Windows Docker image and any AMI
|
|
4559
4562
|
|
|
4560
|
-
|
|
4563
|
+
:stability: experimental
|
|
4564
|
+
'''
|
|
4565
|
+
result = self._values.get("builder_type")
|
|
4566
|
+
return typing.cast(typing.Optional["RunnerImageBuilderType"], result)
|
|
4561
4567
|
|
|
4562
|
-
|
|
4568
|
+
@builtins.property
|
|
4569
|
+
def code_build_options(self) -> typing.Optional[CodeBuildRunnerImageBuilderProps]:
|
|
4570
|
+
'''(experimental) Options specific to CodeBuild image builder.
|
|
4563
4571
|
|
|
4564
|
-
|
|
4572
|
+
Only used when builderType is RunnerImageBuilderType.CODE_BUILD.
|
|
4565
4573
|
|
|
4566
4574
|
:stability: experimental
|
|
4567
4575
|
'''
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
@jsii.member(jsii_name="removeComponent")
|
|
4571
|
-
def remove_component(self, component: "RunnerImageComponent") -> None:
|
|
4572
|
-
'''(experimental) Remove a component from the image builder.
|
|
4576
|
+
result = self._values.get("code_build_options")
|
|
4577
|
+
return typing.cast(typing.Optional[CodeBuildRunnerImageBuilderProps], result)
|
|
4573
4578
|
|
|
4574
|
-
|
|
4579
|
+
@builtins.property
|
|
4580
|
+
def components(self) -> typing.Optional[typing.List["RunnerImageComponent"]]:
|
|
4581
|
+
'''(experimental) Components to install on the image.
|
|
4575
4582
|
|
|
4576
|
-
:
|
|
4583
|
+
:default: none
|
|
4577
4584
|
|
|
4578
4585
|
:stability: experimental
|
|
4579
4586
|
'''
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
check_type(argname="argument component", value=component, expected_type=type_hints["component"])
|
|
4583
|
-
return typing.cast(None, jsii.invoke(self, "removeComponent", [component]))
|
|
4587
|
+
result = self._values.get("components")
|
|
4588
|
+
return typing.cast(typing.Optional[typing.List["RunnerImageComponent"]], result)
|
|
4584
4589
|
|
|
4585
4590
|
@builtins.property
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4591
|
+
def log_removal_policy(self) -> typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy]:
|
|
4592
|
+
'''(experimental) Removal policy for logs of image builds.
|
|
4593
|
+
|
|
4594
|
+
If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed.
|
|
4595
|
+
|
|
4596
|
+
We try to not leave anything behind when removed. But sometimes a log staying behind is useful.
|
|
4597
|
+
|
|
4598
|
+
:default: RemovalPolicy.DESTROY
|
|
4590
4599
|
|
|
4591
4600
|
:stability: experimental
|
|
4592
4601
|
'''
|
|
4593
|
-
|
|
4602
|
+
result = self._values.get("log_removal_policy")
|
|
4603
|
+
return typing.cast(typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy], result)
|
|
4594
4604
|
|
|
4595
4605
|
@builtins.property
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
'''(experimental) The
|
|
4606
|
+
def log_retention(
|
|
4607
|
+
self,
|
|
4608
|
+
) -> typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays]:
|
|
4609
|
+
'''(experimental) The number of days log events are kept in CloudWatch Logs.
|
|
4610
|
+
|
|
4611
|
+
When updating
|
|
4612
|
+
this property, unsetting it doesn't remove the log retention policy. To
|
|
4613
|
+
remove the retention policy, set the value to ``INFINITE``.
|
|
4614
|
+
|
|
4615
|
+
:default: logs.RetentionDays.ONE_MONTH
|
|
4600
4616
|
|
|
4601
4617
|
:stability: experimental
|
|
4602
4618
|
'''
|
|
4603
|
-
|
|
4619
|
+
result = self._values.get("log_retention")
|
|
4620
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays], result)
|
|
4604
4621
|
|
|
4605
4622
|
@builtins.property
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4623
|
+
def os(self) -> typing.Optional[Os]:
|
|
4624
|
+
'''(experimental) Image OS.
|
|
4625
|
+
|
|
4626
|
+
:default: OS.LINUX_UBUNTU
|
|
4627
|
+
|
|
4609
4628
|
:stability: experimental
|
|
4610
4629
|
'''
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
@_components.setter
|
|
4614
|
-
def _components(self, value: typing.List["RunnerImageComponent"]) -> None:
|
|
4615
|
-
if __debug__:
|
|
4616
|
-
type_hints = typing.get_type_hints(_typecheckingstub__705c18a1eedaa490aebad511aac32a801519a57162e30be4673a8ab87ca434dc)
|
|
4617
|
-
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
4618
|
-
jsii.set(self, "components", value)
|
|
4630
|
+
result = self._values.get("os")
|
|
4631
|
+
return typing.cast(typing.Optional[Os], result)
|
|
4619
4632
|
|
|
4633
|
+
@builtins.property
|
|
4634
|
+
def rebuild_interval(self) -> typing.Optional[_aws_cdk_ceddda9d.Duration]:
|
|
4635
|
+
'''(experimental) Schedule the image to be rebuilt every given interval.
|
|
4620
4636
|
|
|
4621
|
-
|
|
4622
|
-
@jsii.member(jsii_name="bindAmi")
|
|
4623
|
-
def bind_ami(self) -> RunnerAmi:
|
|
4624
|
-
'''(experimental) Build and return an AMI with GitHub Runner installed in it.
|
|
4637
|
+
Useful for keeping the image up-do-date with the latest GitHub runner version and latest OS updates.
|
|
4625
4638
|
|
|
4626
|
-
|
|
4639
|
+
Set to zero to disable.
|
|
4627
4640
|
|
|
4628
|
-
|
|
4641
|
+
:default: Duration.days(7)
|
|
4629
4642
|
|
|
4630
4643
|
:stability: experimental
|
|
4631
4644
|
'''
|
|
4632
|
-
|
|
4645
|
+
result = self._values.get("rebuild_interval")
|
|
4646
|
+
return typing.cast(typing.Optional[_aws_cdk_ceddda9d.Duration], result)
|
|
4633
4647
|
|
|
4634
|
-
@
|
|
4635
|
-
def
|
|
4636
|
-
'''(experimental)
|
|
4648
|
+
@builtins.property
|
|
4649
|
+
def runner_version(self) -> typing.Optional["RunnerVersion"]:
|
|
4650
|
+
'''(experimental) Version of GitHub Runners to install.
|
|
4637
4651
|
|
|
4638
|
-
|
|
4652
|
+
:default: latest version available
|
|
4639
4653
|
|
|
4640
|
-
|
|
4654
|
+
:stability: experimental
|
|
4655
|
+
'''
|
|
4656
|
+
result = self._values.get("runner_version")
|
|
4657
|
+
return typing.cast(typing.Optional["RunnerVersion"], result)
|
|
4641
4658
|
|
|
4642
|
-
|
|
4659
|
+
@builtins.property
|
|
4660
|
+
def security_groups(
|
|
4661
|
+
self,
|
|
4662
|
+
) -> typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]]:
|
|
4663
|
+
'''(experimental) Security Groups to assign to this instance.
|
|
4643
4664
|
|
|
4644
4665
|
:stability: experimental
|
|
4645
4666
|
'''
|
|
4646
|
-
|
|
4667
|
+
result = self._values.get("security_groups")
|
|
4668
|
+
return typing.cast(typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]], result)
|
|
4647
4669
|
|
|
4648
4670
|
@builtins.property
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4671
|
+
def subnet_selection(
|
|
4672
|
+
self,
|
|
4673
|
+
) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection]:
|
|
4674
|
+
'''(experimental) Where to place the network interfaces within the VPC.
|
|
4675
|
+
|
|
4676
|
+
:default: no subnet
|
|
4652
4677
|
|
|
4653
4678
|
:stability: experimental
|
|
4654
4679
|
'''
|
|
4655
|
-
|
|
4680
|
+
result = self._values.get("subnet_selection")
|
|
4681
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection], result)
|
|
4656
4682
|
|
|
4657
4683
|
@builtins.property
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4684
|
+
def vpc(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc]:
|
|
4685
|
+
'''(experimental) VPC to build the image in.
|
|
4686
|
+
|
|
4687
|
+
:default: no VPC
|
|
4661
4688
|
|
|
4662
4689
|
:stability: experimental
|
|
4663
4690
|
'''
|
|
4664
|
-
|
|
4691
|
+
result = self._values.get("vpc")
|
|
4692
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc], result)
|
|
4665
4693
|
|
|
4666
|
-
|
|
4667
|
-
|
|
4694
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
4695
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
4668
4696
|
|
|
4697
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
4698
|
+
return not (rhs == self)
|
|
4669
4699
|
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
"architecture": "architecture",
|
|
4675
|
-
"aws_image_builder_options": "awsImageBuilderOptions",
|
|
4676
|
-
"base_ami": "baseAmi",
|
|
4677
|
-
"base_docker_image": "baseDockerImage",
|
|
4678
|
-
"builder_type": "builderType",
|
|
4679
|
-
"code_build_options": "codeBuildOptions",
|
|
4680
|
-
"components": "components",
|
|
4681
|
-
"log_removal_policy": "logRemovalPolicy",
|
|
4682
|
-
"log_retention": "logRetention",
|
|
4683
|
-
"os": "os",
|
|
4684
|
-
"rebuild_interval": "rebuildInterval",
|
|
4685
|
-
"runner_version": "runnerVersion",
|
|
4686
|
-
"security_groups": "securityGroups",
|
|
4687
|
-
"subnet_selection": "subnetSelection",
|
|
4688
|
-
"vpc": "vpc",
|
|
4689
|
-
},
|
|
4690
|
-
)
|
|
4691
|
-
class RunnerImageBuilderProps:
|
|
4692
|
-
def __init__(
|
|
4693
|
-
self,
|
|
4694
|
-
*,
|
|
4695
|
-
architecture: typing.Optional[Architecture] = None,
|
|
4696
|
-
aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4697
|
-
base_ami: typing.Optional[builtins.str] = None,
|
|
4698
|
-
base_docker_image: typing.Optional[builtins.str] = None,
|
|
4699
|
-
builder_type: typing.Optional["RunnerImageBuilderType"] = None,
|
|
4700
|
-
code_build_options: typing.Optional[typing.Union[CodeBuildRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4701
|
-
components: typing.Optional[typing.Sequence["RunnerImageComponent"]] = None,
|
|
4702
|
-
log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
4703
|
-
log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
|
|
4704
|
-
os: typing.Optional[Os] = None,
|
|
4705
|
-
rebuild_interval: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
|
4706
|
-
runner_version: typing.Optional["RunnerVersion"] = None,
|
|
4707
|
-
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
4708
|
-
subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
4709
|
-
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
|
4710
|
-
) -> None:
|
|
4711
|
-
'''
|
|
4712
|
-
:param architecture: (experimental) Image architecture. Default: Architecture.X86_64
|
|
4713
|
-
:param aws_image_builder_options: (experimental) Options specific to AWS Image Builder. Only used when builderType is RunnerImageBuilderType.AWS_IMAGE_BUILDER.
|
|
4714
|
-
:param base_ami: (experimental) Base AMI from which runner AMIs will be built. This can be an actual AMI or an AWS Image Builder ARN that points to the latest AMI. For example ``arn:aws:imagebuilder:us-east-1:aws:image/ubuntu-server-22-lts-x86/x.x.x`` would always use the latest version of Ubuntu 22.04 in each build. If you want a specific version, you can replace ``x.x.x`` with that version. Default: latest Ubuntu 22.04 AMI for Os.LINUX_UBUNTU, latest Amazon Linux 2 AMI for Os.LINUX_AMAZON_2, latest Windows Server 2022 AMI for Os.WINDOWS
|
|
4715
|
-
:param base_docker_image: (experimental) Base image from which Docker runner images will be built. Default: public.ecr.aws/lts/ubuntu:22.04 for Os.LINUX_UBUNTU, public.ecr.aws/amazonlinux/amazonlinux:2 for Os.LINUX_AMAZON_2, mcr.microsoft.com/windows/servercore:ltsc2019-amd64 for Os.WINDOWS
|
|
4716
|
-
:param builder_type: Default: CodeBuild for Linux Docker image, AWS Image Builder for Windows Docker image and any AMI
|
|
4717
|
-
:param code_build_options: (experimental) Options specific to CodeBuild image builder. Only used when builderType is RunnerImageBuilderType.CODE_BUILD.
|
|
4718
|
-
:param components: (experimental) Components to install on the image. Default: none
|
|
4719
|
-
:param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
|
|
4720
|
-
:param log_retention: (experimental) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. Default: logs.RetentionDays.ONE_MONTH
|
|
4721
|
-
:param os: (experimental) Image OS. Default: OS.LINUX_UBUNTU
|
|
4722
|
-
:param rebuild_interval: (experimental) Schedule the image to be rebuilt every given interval. Useful for keeping the image up-do-date with the latest GitHub runner version and latest OS updates. Set to zero to disable. Default: Duration.days(7)
|
|
4723
|
-
:param runner_version: (experimental) Version of GitHub Runners to install. Default: latest version available
|
|
4724
|
-
:param security_groups: (experimental) Security Groups to assign to this instance.
|
|
4725
|
-
:param subnet_selection: (experimental) Where to place the network interfaces within the VPC. Default: no subnet
|
|
4726
|
-
:param vpc: (experimental) VPC to build the image in. Default: no VPC
|
|
4727
|
-
|
|
4728
|
-
:stability: experimental
|
|
4729
|
-
'''
|
|
4730
|
-
if isinstance(aws_image_builder_options, dict):
|
|
4731
|
-
aws_image_builder_options = AwsImageBuilderRunnerImageBuilderProps(**aws_image_builder_options)
|
|
4732
|
-
if isinstance(code_build_options, dict):
|
|
4733
|
-
code_build_options = CodeBuildRunnerImageBuilderProps(**code_build_options)
|
|
4734
|
-
if isinstance(subnet_selection, dict):
|
|
4735
|
-
subnet_selection = _aws_cdk_aws_ec2_ceddda9d.SubnetSelection(**subnet_selection)
|
|
4736
|
-
if __debug__:
|
|
4737
|
-
type_hints = typing.get_type_hints(_typecheckingstub__ab96b7f3871624e8430668114e7f5748ba5d253168db5b8f9a13955d0a82e43d)
|
|
4738
|
-
check_type(argname="argument architecture", value=architecture, expected_type=type_hints["architecture"])
|
|
4739
|
-
check_type(argname="argument aws_image_builder_options", value=aws_image_builder_options, expected_type=type_hints["aws_image_builder_options"])
|
|
4740
|
-
check_type(argname="argument base_ami", value=base_ami, expected_type=type_hints["base_ami"])
|
|
4741
|
-
check_type(argname="argument base_docker_image", value=base_docker_image, expected_type=type_hints["base_docker_image"])
|
|
4742
|
-
check_type(argname="argument builder_type", value=builder_type, expected_type=type_hints["builder_type"])
|
|
4743
|
-
check_type(argname="argument code_build_options", value=code_build_options, expected_type=type_hints["code_build_options"])
|
|
4744
|
-
check_type(argname="argument components", value=components, expected_type=type_hints["components"])
|
|
4745
|
-
check_type(argname="argument log_removal_policy", value=log_removal_policy, expected_type=type_hints["log_removal_policy"])
|
|
4746
|
-
check_type(argname="argument log_retention", value=log_retention, expected_type=type_hints["log_retention"])
|
|
4747
|
-
check_type(argname="argument os", value=os, expected_type=type_hints["os"])
|
|
4748
|
-
check_type(argname="argument rebuild_interval", value=rebuild_interval, expected_type=type_hints["rebuild_interval"])
|
|
4749
|
-
check_type(argname="argument runner_version", value=runner_version, expected_type=type_hints["runner_version"])
|
|
4750
|
-
check_type(argname="argument security_groups", value=security_groups, expected_type=type_hints["security_groups"])
|
|
4751
|
-
check_type(argname="argument subnet_selection", value=subnet_selection, expected_type=type_hints["subnet_selection"])
|
|
4752
|
-
check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
|
|
4753
|
-
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
4754
|
-
if architecture is not None:
|
|
4755
|
-
self._values["architecture"] = architecture
|
|
4756
|
-
if aws_image_builder_options is not None:
|
|
4757
|
-
self._values["aws_image_builder_options"] = aws_image_builder_options
|
|
4758
|
-
if base_ami is not None:
|
|
4759
|
-
self._values["base_ami"] = base_ami
|
|
4760
|
-
if base_docker_image is not None:
|
|
4761
|
-
self._values["base_docker_image"] = base_docker_image
|
|
4762
|
-
if builder_type is not None:
|
|
4763
|
-
self._values["builder_type"] = builder_type
|
|
4764
|
-
if code_build_options is not None:
|
|
4765
|
-
self._values["code_build_options"] = code_build_options
|
|
4766
|
-
if components is not None:
|
|
4767
|
-
self._values["components"] = components
|
|
4768
|
-
if log_removal_policy is not None:
|
|
4769
|
-
self._values["log_removal_policy"] = log_removal_policy
|
|
4770
|
-
if log_retention is not None:
|
|
4771
|
-
self._values["log_retention"] = log_retention
|
|
4772
|
-
if os is not None:
|
|
4773
|
-
self._values["os"] = os
|
|
4774
|
-
if rebuild_interval is not None:
|
|
4775
|
-
self._values["rebuild_interval"] = rebuild_interval
|
|
4776
|
-
if runner_version is not None:
|
|
4777
|
-
self._values["runner_version"] = runner_version
|
|
4778
|
-
if security_groups is not None:
|
|
4779
|
-
self._values["security_groups"] = security_groups
|
|
4780
|
-
if subnet_selection is not None:
|
|
4781
|
-
self._values["subnet_selection"] = subnet_selection
|
|
4782
|
-
if vpc is not None:
|
|
4783
|
-
self._values["vpc"] = vpc
|
|
4784
|
-
|
|
4785
|
-
@builtins.property
|
|
4786
|
-
def architecture(self) -> typing.Optional[Architecture]:
|
|
4787
|
-
'''(experimental) Image architecture.
|
|
4788
|
-
|
|
4789
|
-
:default: Architecture.X86_64
|
|
4790
|
-
|
|
4791
|
-
:stability: experimental
|
|
4792
|
-
'''
|
|
4793
|
-
result = self._values.get("architecture")
|
|
4794
|
-
return typing.cast(typing.Optional[Architecture], result)
|
|
4795
|
-
|
|
4796
|
-
@builtins.property
|
|
4797
|
-
def aws_image_builder_options(
|
|
4798
|
-
self,
|
|
4799
|
-
) -> typing.Optional[AwsImageBuilderRunnerImageBuilderProps]:
|
|
4800
|
-
'''(experimental) Options specific to AWS Image Builder.
|
|
4801
|
-
|
|
4802
|
-
Only used when builderType is RunnerImageBuilderType.AWS_IMAGE_BUILDER.
|
|
4803
|
-
|
|
4804
|
-
:stability: experimental
|
|
4805
|
-
'''
|
|
4806
|
-
result = self._values.get("aws_image_builder_options")
|
|
4807
|
-
return typing.cast(typing.Optional[AwsImageBuilderRunnerImageBuilderProps], result)
|
|
4808
|
-
|
|
4809
|
-
@builtins.property
|
|
4810
|
-
def base_ami(self) -> typing.Optional[builtins.str]:
|
|
4811
|
-
'''(experimental) Base AMI from which runner AMIs will be built.
|
|
4812
|
-
|
|
4813
|
-
This can be an actual AMI or an AWS Image Builder ARN that points to the latest AMI. For example ``arn:aws:imagebuilder:us-east-1:aws:image/ubuntu-server-22-lts-x86/x.x.x`` would always use the latest version of Ubuntu 22.04 in each build. If you want a specific version, you can replace ``x.x.x`` with that version.
|
|
4814
|
-
|
|
4815
|
-
:default: latest Ubuntu 22.04 AMI for Os.LINUX_UBUNTU, latest Amazon Linux 2 AMI for Os.LINUX_AMAZON_2, latest Windows Server 2022 AMI for Os.WINDOWS
|
|
4816
|
-
|
|
4817
|
-
:stability: experimental
|
|
4818
|
-
'''
|
|
4819
|
-
result = self._values.get("base_ami")
|
|
4820
|
-
return typing.cast(typing.Optional[builtins.str], result)
|
|
4821
|
-
|
|
4822
|
-
@builtins.property
|
|
4823
|
-
def base_docker_image(self) -> typing.Optional[builtins.str]:
|
|
4824
|
-
'''(experimental) Base image from which Docker runner images will be built.
|
|
4825
|
-
|
|
4826
|
-
:default: public.ecr.aws/lts/ubuntu:22.04 for Os.LINUX_UBUNTU, public.ecr.aws/amazonlinux/amazonlinux:2 for Os.LINUX_AMAZON_2, mcr.microsoft.com/windows/servercore:ltsc2019-amd64 for Os.WINDOWS
|
|
4827
|
-
|
|
4828
|
-
:stability: experimental
|
|
4829
|
-
'''
|
|
4830
|
-
result = self._values.get("base_docker_image")
|
|
4831
|
-
return typing.cast(typing.Optional[builtins.str], result)
|
|
4832
|
-
|
|
4833
|
-
@builtins.property
|
|
4834
|
-
def builder_type(self) -> typing.Optional["RunnerImageBuilderType"]:
|
|
4835
|
-
'''
|
|
4836
|
-
:default: CodeBuild for Linux Docker image, AWS Image Builder for Windows Docker image and any AMI
|
|
4837
|
-
|
|
4838
|
-
:stability: experimental
|
|
4839
|
-
'''
|
|
4840
|
-
result = self._values.get("builder_type")
|
|
4841
|
-
return typing.cast(typing.Optional["RunnerImageBuilderType"], result)
|
|
4842
|
-
|
|
4843
|
-
@builtins.property
|
|
4844
|
-
def code_build_options(self) -> typing.Optional[CodeBuildRunnerImageBuilderProps]:
|
|
4845
|
-
'''(experimental) Options specific to CodeBuild image builder.
|
|
4846
|
-
|
|
4847
|
-
Only used when builderType is RunnerImageBuilderType.CODE_BUILD.
|
|
4848
|
-
|
|
4849
|
-
:stability: experimental
|
|
4850
|
-
'''
|
|
4851
|
-
result = self._values.get("code_build_options")
|
|
4852
|
-
return typing.cast(typing.Optional[CodeBuildRunnerImageBuilderProps], result)
|
|
4853
|
-
|
|
4854
|
-
@builtins.property
|
|
4855
|
-
def components(self) -> typing.Optional[typing.List["RunnerImageComponent"]]:
|
|
4856
|
-
'''(experimental) Components to install on the image.
|
|
4857
|
-
|
|
4858
|
-
:default: none
|
|
4859
|
-
|
|
4860
|
-
:stability: experimental
|
|
4861
|
-
'''
|
|
4862
|
-
result = self._values.get("components")
|
|
4863
|
-
return typing.cast(typing.Optional[typing.List["RunnerImageComponent"]], result)
|
|
4864
|
-
|
|
4865
|
-
@builtins.property
|
|
4866
|
-
def log_removal_policy(self) -> typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy]:
|
|
4867
|
-
'''(experimental) Removal policy for logs of image builds.
|
|
4868
|
-
|
|
4869
|
-
If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed.
|
|
4870
|
-
|
|
4871
|
-
We try to not leave anything behind when removed. But sometimes a log staying behind is useful.
|
|
4872
|
-
|
|
4873
|
-
:default: RemovalPolicy.DESTROY
|
|
4874
|
-
|
|
4875
|
-
:stability: experimental
|
|
4876
|
-
'''
|
|
4877
|
-
result = self._values.get("log_removal_policy")
|
|
4878
|
-
return typing.cast(typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy], result)
|
|
4879
|
-
|
|
4880
|
-
@builtins.property
|
|
4881
|
-
def log_retention(
|
|
4882
|
-
self,
|
|
4883
|
-
) -> typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays]:
|
|
4884
|
-
'''(experimental) The number of days log events are kept in CloudWatch Logs.
|
|
4885
|
-
|
|
4886
|
-
When updating
|
|
4887
|
-
this property, unsetting it doesn't remove the log retention policy. To
|
|
4888
|
-
remove the retention policy, set the value to ``INFINITE``.
|
|
4889
|
-
|
|
4890
|
-
:default: logs.RetentionDays.ONE_MONTH
|
|
4891
|
-
|
|
4892
|
-
:stability: experimental
|
|
4893
|
-
'''
|
|
4894
|
-
result = self._values.get("log_retention")
|
|
4895
|
-
return typing.cast(typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays], result)
|
|
4896
|
-
|
|
4897
|
-
@builtins.property
|
|
4898
|
-
def os(self) -> typing.Optional[Os]:
|
|
4899
|
-
'''(experimental) Image OS.
|
|
4900
|
-
|
|
4901
|
-
:default: OS.LINUX_UBUNTU
|
|
4902
|
-
|
|
4903
|
-
:stability: experimental
|
|
4904
|
-
'''
|
|
4905
|
-
result = self._values.get("os")
|
|
4906
|
-
return typing.cast(typing.Optional[Os], result)
|
|
4907
|
-
|
|
4908
|
-
@builtins.property
|
|
4909
|
-
def rebuild_interval(self) -> typing.Optional[_aws_cdk_ceddda9d.Duration]:
|
|
4910
|
-
'''(experimental) Schedule the image to be rebuilt every given interval.
|
|
4911
|
-
|
|
4912
|
-
Useful for keeping the image up-do-date with the latest GitHub runner version and latest OS updates.
|
|
4913
|
-
|
|
4914
|
-
Set to zero to disable.
|
|
4915
|
-
|
|
4916
|
-
:default: Duration.days(7)
|
|
4917
|
-
|
|
4918
|
-
:stability: experimental
|
|
4919
|
-
'''
|
|
4920
|
-
result = self._values.get("rebuild_interval")
|
|
4921
|
-
return typing.cast(typing.Optional[_aws_cdk_ceddda9d.Duration], result)
|
|
4922
|
-
|
|
4923
|
-
@builtins.property
|
|
4924
|
-
def runner_version(self) -> typing.Optional["RunnerVersion"]:
|
|
4925
|
-
'''(experimental) Version of GitHub Runners to install.
|
|
4926
|
-
|
|
4927
|
-
:default: latest version available
|
|
4928
|
-
|
|
4929
|
-
:stability: experimental
|
|
4930
|
-
'''
|
|
4931
|
-
result = self._values.get("runner_version")
|
|
4932
|
-
return typing.cast(typing.Optional["RunnerVersion"], result)
|
|
4933
|
-
|
|
4934
|
-
@builtins.property
|
|
4935
|
-
def security_groups(
|
|
4936
|
-
self,
|
|
4937
|
-
) -> typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]]:
|
|
4938
|
-
'''(experimental) Security Groups to assign to this instance.
|
|
4939
|
-
|
|
4940
|
-
:stability: experimental
|
|
4941
|
-
'''
|
|
4942
|
-
result = self._values.get("security_groups")
|
|
4943
|
-
return typing.cast(typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]], result)
|
|
4944
|
-
|
|
4945
|
-
@builtins.property
|
|
4946
|
-
def subnet_selection(
|
|
4947
|
-
self,
|
|
4948
|
-
) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection]:
|
|
4949
|
-
'''(experimental) Where to place the network interfaces within the VPC.
|
|
4950
|
-
|
|
4951
|
-
:default: no subnet
|
|
4952
|
-
|
|
4953
|
-
:stability: experimental
|
|
4954
|
-
'''
|
|
4955
|
-
result = self._values.get("subnet_selection")
|
|
4956
|
-
return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection], result)
|
|
4957
|
-
|
|
4958
|
-
@builtins.property
|
|
4959
|
-
def vpc(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc]:
|
|
4960
|
-
'''(experimental) VPC to build the image in.
|
|
4961
|
-
|
|
4962
|
-
:default: no VPC
|
|
4963
|
-
|
|
4964
|
-
:stability: experimental
|
|
4965
|
-
'''
|
|
4966
|
-
result = self._values.get("vpc")
|
|
4967
|
-
return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc], result)
|
|
4968
|
-
|
|
4969
|
-
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
4970
|
-
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
4971
|
-
|
|
4972
|
-
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
4973
|
-
return not (rhs == self)
|
|
4974
|
-
|
|
4975
|
-
def __repr__(self) -> str:
|
|
4976
|
-
return "RunnerImageBuilderProps(%s)" % ", ".join(
|
|
4977
|
-
k + "=" + repr(v) for k, v in self._values.items()
|
|
4978
|
-
)
|
|
4700
|
+
def __repr__(self) -> str:
|
|
4701
|
+
return "RunnerImageBuilderProps(%s)" % ", ".join(
|
|
4702
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
4703
|
+
)
|
|
4979
4704
|
|
|
4980
4705
|
|
|
4981
4706
|
@jsii.enum(jsii_type="@cloudsnorkel/cdk-github-runners.RunnerImageBuilderType")
|
|
@@ -5047,7 +4772,7 @@ class RunnerImageComponent(
|
|
|
5047
4772
|
:param assets: (experimental) Assets to copy into the built image.
|
|
5048
4773
|
:param commands: (experimental) Commands to run in the built image.
|
|
5049
4774
|
:param docker_commands: (experimental) Docker commands to run in the built image. For example: ``['ENV foo=bar', 'RUN echo $foo']`` These commands are ignored when building AMIs.
|
|
5050
|
-
:param name: (experimental) Component name used for (1) image build logging and (2) identifier for {@link
|
|
4775
|
+
:param name: (experimental) Component name used for (1) image build logging and (2) identifier for {@link IConfigurableRunnerImageBuilder.removeComponent }. Name must only contain alphanumeric characters and dashes.
|
|
5051
4776
|
|
|
5052
4777
|
:stability: experimental
|
|
5053
4778
|
'''
|
|
@@ -5248,7 +4973,7 @@ class RunnerImageComponent(
|
|
|
5248
4973
|
def name(self) -> builtins.str:
|
|
5249
4974
|
'''(experimental) Component name.
|
|
5250
4975
|
|
|
5251
|
-
Used to identify component in image build logs, and for {@link
|
|
4976
|
+
Used to identify component in image build logs, and for {@link IConfigurableRunnerImageBuilder.removeComponent }
|
|
5252
4977
|
|
|
5253
4978
|
:stability: experimental
|
|
5254
4979
|
'''
|
|
@@ -5282,7 +5007,7 @@ class _RunnerImageComponentProxy(RunnerImageComponent):
|
|
|
5282
5007
|
def name(self) -> builtins.str:
|
|
5283
5008
|
'''(experimental) Component name.
|
|
5284
5009
|
|
|
5285
|
-
Used to identify component in image build logs, and for {@link
|
|
5010
|
+
Used to identify component in image build logs, and for {@link IConfigurableRunnerImageBuilder.removeComponent }
|
|
5286
5011
|
|
|
5287
5012
|
:stability: experimental
|
|
5288
5013
|
'''
|
|
@@ -5315,7 +5040,7 @@ class RunnerImageComponentCustomProps:
|
|
|
5315
5040
|
:param assets: (experimental) Assets to copy into the built image.
|
|
5316
5041
|
:param commands: (experimental) Commands to run in the built image.
|
|
5317
5042
|
:param docker_commands: (experimental) Docker commands to run in the built image. For example: ``['ENV foo=bar', 'RUN echo $foo']`` These commands are ignored when building AMIs.
|
|
5318
|
-
:param name: (experimental) Component name used for (1) image build logging and (2) identifier for {@link
|
|
5043
|
+
:param name: (experimental) Component name used for (1) image build logging and (2) identifier for {@link IConfigurableRunnerImageBuilder.removeComponent }. Name must only contain alphanumeric characters and dashes.
|
|
5319
5044
|
|
|
5320
5045
|
:stability: experimental
|
|
5321
5046
|
'''
|
|
@@ -5368,7 +5093,7 @@ class RunnerImageComponentCustomProps:
|
|
|
5368
5093
|
|
|
5369
5094
|
@builtins.property
|
|
5370
5095
|
def name(self) -> typing.Optional[builtins.str]:
|
|
5371
|
-
'''(experimental) Component name used for (1) image build logging and (2) identifier for {@link
|
|
5096
|
+
'''(experimental) Component name used for (1) image build logging and (2) identifier for {@link IConfigurableRunnerImageBuilder.removeComponent }.
|
|
5372
5097
|
|
|
5373
5098
|
Name must only contain alphanumeric characters and dashes.
|
|
5374
5099
|
|
|
@@ -6584,8 +6309,14 @@ class CodeBuildRunnerProvider(
|
|
|
6584
6309
|
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
6585
6310
|
subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
6586
6311
|
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
|
6587
|
-
) ->
|
|
6588
|
-
'''(experimental) Create new image builder that builds CodeBuild specific runner images
|
|
6312
|
+
) -> "IConfigurableRunnerImageBuilder":
|
|
6313
|
+
'''(experimental) Create new image builder that builds CodeBuild specific runner images.
|
|
6314
|
+
|
|
6315
|
+
You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
|
|
6316
|
+
|
|
6317
|
+
You can add components to the image builder by calling ``imageBuilder.addComponent()``.
|
|
6318
|
+
|
|
6319
|
+
The default OS is Ubuntu running on x64 architecture.
|
|
6589
6320
|
|
|
6590
6321
|
Included components:
|
|
6591
6322
|
|
|
@@ -6639,7 +6370,7 @@ class CodeBuildRunnerProvider(
|
|
|
6639
6370
|
vpc=vpc,
|
|
6640
6371
|
)
|
|
6641
6372
|
|
|
6642
|
-
return typing.cast(
|
|
6373
|
+
return typing.cast("IConfigurableRunnerImageBuilder", jsii.sinvoke(cls, "imageBuilder", [scope, id, props]))
|
|
6643
6374
|
|
|
6644
6375
|
@jsii.member(jsii_name="getStepFunctionTask")
|
|
6645
6376
|
def get_step_function_task(
|
|
@@ -7522,8 +7253,14 @@ class Ec2RunnerProvider(
|
|
|
7522
7253
|
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
7523
7254
|
subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
7524
7255
|
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
|
7525
|
-
) ->
|
|
7526
|
-
'''(experimental) Create new image builder that builds EC2 specific runner images
|
|
7256
|
+
) -> "IConfigurableRunnerImageBuilder":
|
|
7257
|
+
'''(experimental) Create new image builder that builds EC2 specific runner images.
|
|
7258
|
+
|
|
7259
|
+
You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
|
|
7260
|
+
|
|
7261
|
+
You can add components to the image builder by calling ``imageBuilder.addComponent()``.
|
|
7262
|
+
|
|
7263
|
+
The default OS is Ubuntu running on x64 architecture.
|
|
7527
7264
|
|
|
7528
7265
|
Included components:
|
|
7529
7266
|
|
|
@@ -7577,7 +7314,7 @@ class Ec2RunnerProvider(
|
|
|
7577
7314
|
vpc=vpc,
|
|
7578
7315
|
)
|
|
7579
7316
|
|
|
7580
|
-
return typing.cast(
|
|
7317
|
+
return typing.cast("IConfigurableRunnerImageBuilder", jsii.sinvoke(cls, "imageBuilder", [scope, id, props]))
|
|
7581
7318
|
|
|
7582
7319
|
@jsii.member(jsii_name="getStepFunctionTask")
|
|
7583
7320
|
def get_step_function_task(
|
|
@@ -8140,8 +7877,14 @@ class EcsRunnerProvider(
|
|
|
8140
7877
|
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
8141
7878
|
subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
8142
7879
|
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
|
8143
|
-
) ->
|
|
8144
|
-
'''(experimental) Create new image builder that builds ECS specific runner images
|
|
7880
|
+
) -> "IConfigurableRunnerImageBuilder":
|
|
7881
|
+
'''(experimental) Create new image builder that builds ECS specific runner images.
|
|
7882
|
+
|
|
7883
|
+
You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
|
|
7884
|
+
|
|
7885
|
+
You can add components to the image builder by calling ``imageBuilder.addComponent()``.
|
|
7886
|
+
|
|
7887
|
+
The default OS is Ubuntu running on x64 architecture.
|
|
8145
7888
|
|
|
8146
7889
|
Included components:
|
|
8147
7890
|
|
|
@@ -8195,7 +7938,7 @@ class EcsRunnerProvider(
|
|
|
8195
7938
|
vpc=vpc,
|
|
8196
7939
|
)
|
|
8197
7940
|
|
|
8198
|
-
return typing.cast(
|
|
7941
|
+
return typing.cast("IConfigurableRunnerImageBuilder", jsii.sinvoke(cls, "imageBuilder", [scope, id, props]))
|
|
8199
7942
|
|
|
8200
7943
|
@jsii.member(jsii_name="getStepFunctionTask")
|
|
8201
7944
|
def get_step_function_task(
|
|
@@ -8848,8 +8591,14 @@ class FargateRunnerProvider(
|
|
|
8848
8591
|
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
8849
8592
|
subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
8850
8593
|
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
|
8851
|
-
) ->
|
|
8852
|
-
'''(experimental) Create new image builder that builds Fargate specific runner images
|
|
8594
|
+
) -> "IConfigurableRunnerImageBuilder":
|
|
8595
|
+
'''(experimental) Create new image builder that builds Fargate specific runner images.
|
|
8596
|
+
|
|
8597
|
+
You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
|
|
8598
|
+
|
|
8599
|
+
You can add components to the image builder by calling ``imageBuilder.addComponent()``.
|
|
8600
|
+
|
|
8601
|
+
The default OS is Ubuntu running on x64 architecture.
|
|
8853
8602
|
|
|
8854
8603
|
Included components:
|
|
8855
8604
|
|
|
@@ -8902,7 +8651,7 @@ class FargateRunnerProvider(
|
|
|
8902
8651
|
vpc=vpc,
|
|
8903
8652
|
)
|
|
8904
8653
|
|
|
8905
|
-
return typing.cast(
|
|
8654
|
+
return typing.cast("IConfigurableRunnerImageBuilder", jsii.sinvoke(cls, "imageBuilder", [scope, id, props]))
|
|
8906
8655
|
|
|
8907
8656
|
@jsii.member(jsii_name="getStepFunctionTask")
|
|
8908
8657
|
def get_step_function_task(
|
|
@@ -9502,19 +9251,112 @@ class FargateRunnerProviderProps(RunnerProviderProps):
|
|
|
9502
9251
|
)
|
|
9503
9252
|
|
|
9504
9253
|
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9508
|
-
|
|
9254
|
+
@jsii.interface(
|
|
9255
|
+
jsii_type="@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder"
|
|
9256
|
+
)
|
|
9257
|
+
class IConfigurableRunnerImageBuilder(
|
|
9258
|
+
IRunnerImageBuilder,
|
|
9259
|
+
_aws_cdk_aws_ec2_ceddda9d.IConnectable,
|
|
9260
|
+
_aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
9261
|
+
typing_extensions.Protocol,
|
|
9509
9262
|
):
|
|
9510
|
-
'''
|
|
9511
|
-
:deprecated: use {@link LambdaRunnerProvider }
|
|
9263
|
+
'''(experimental) Interface for constructs that build an image that can be used in {@link IRunnerProvider }.
|
|
9512
9264
|
|
|
9513
|
-
|
|
9265
|
+
The image can be configured by adding or removing components. The image builder can be configured by adding grants or allowing connections.
|
|
9266
|
+
|
|
9267
|
+
An image can be a Docker image or AMI.
|
|
9268
|
+
|
|
9269
|
+
:stability: experimental
|
|
9514
9270
|
'''
|
|
9515
9271
|
|
|
9516
|
-
|
|
9517
|
-
|
|
9272
|
+
@jsii.member(jsii_name="addComponent")
|
|
9273
|
+
def add_component(self, component: RunnerImageComponent) -> None:
|
|
9274
|
+
'''(experimental) Add a component to the image builder.
|
|
9275
|
+
|
|
9276
|
+
The component will be added to the end of the list of components.
|
|
9277
|
+
|
|
9278
|
+
:param component: component to add.
|
|
9279
|
+
|
|
9280
|
+
:stability: experimental
|
|
9281
|
+
'''
|
|
9282
|
+
...
|
|
9283
|
+
|
|
9284
|
+
@jsii.member(jsii_name="removeComponent")
|
|
9285
|
+
def remove_component(self, component: RunnerImageComponent) -> None:
|
|
9286
|
+
'''(experimental) Remove a component from the image builder.
|
|
9287
|
+
|
|
9288
|
+
Removal is done by component name. Multiple components with the same name will all be removed.
|
|
9289
|
+
|
|
9290
|
+
:param component: component to remove.
|
|
9291
|
+
|
|
9292
|
+
:stability: experimental
|
|
9293
|
+
'''
|
|
9294
|
+
...
|
|
9295
|
+
|
|
9296
|
+
|
|
9297
|
+
class _IConfigurableRunnerImageBuilderProxy(
|
|
9298
|
+
jsii.proxy_for(IRunnerImageBuilder), # type: ignore[misc]
|
|
9299
|
+
jsii.proxy_for(_aws_cdk_aws_ec2_ceddda9d.IConnectable), # type: ignore[misc]
|
|
9300
|
+
jsii.proxy_for(_aws_cdk_aws_iam_ceddda9d.IGrantable), # type: ignore[misc]
|
|
9301
|
+
):
|
|
9302
|
+
'''(experimental) Interface for constructs that build an image that can be used in {@link IRunnerProvider }.
|
|
9303
|
+
|
|
9304
|
+
The image can be configured by adding or removing components. The image builder can be configured by adding grants or allowing connections.
|
|
9305
|
+
|
|
9306
|
+
An image can be a Docker image or AMI.
|
|
9307
|
+
|
|
9308
|
+
:stability: experimental
|
|
9309
|
+
'''
|
|
9310
|
+
|
|
9311
|
+
__jsii_type__: typing.ClassVar[str] = "@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder"
|
|
9312
|
+
|
|
9313
|
+
@jsii.member(jsii_name="addComponent")
|
|
9314
|
+
def add_component(self, component: RunnerImageComponent) -> None:
|
|
9315
|
+
'''(experimental) Add a component to the image builder.
|
|
9316
|
+
|
|
9317
|
+
The component will be added to the end of the list of components.
|
|
9318
|
+
|
|
9319
|
+
:param component: component to add.
|
|
9320
|
+
|
|
9321
|
+
:stability: experimental
|
|
9322
|
+
'''
|
|
9323
|
+
if __debug__:
|
|
9324
|
+
type_hints = typing.get_type_hints(_typecheckingstub__dc4625ad41fc3631b6e9812ae4ab86d19fc28eb849f5a5bf3a3ed7c4ebbeb066)
|
|
9325
|
+
check_type(argname="argument component", value=component, expected_type=type_hints["component"])
|
|
9326
|
+
return typing.cast(None, jsii.invoke(self, "addComponent", [component]))
|
|
9327
|
+
|
|
9328
|
+
@jsii.member(jsii_name="removeComponent")
|
|
9329
|
+
def remove_component(self, component: RunnerImageComponent) -> None:
|
|
9330
|
+
'''(experimental) Remove a component from the image builder.
|
|
9331
|
+
|
|
9332
|
+
Removal is done by component name. Multiple components with the same name will all be removed.
|
|
9333
|
+
|
|
9334
|
+
:param component: component to remove.
|
|
9335
|
+
|
|
9336
|
+
:stability: experimental
|
|
9337
|
+
'''
|
|
9338
|
+
if __debug__:
|
|
9339
|
+
type_hints = typing.get_type_hints(_typecheckingstub__3aa11e0e95269ba6ec5fded5dd768fb588157de9643a5fce8b09fc9b4e2a18c0)
|
|
9340
|
+
check_type(argname="argument component", value=component, expected_type=type_hints["component"])
|
|
9341
|
+
return typing.cast(None, jsii.invoke(self, "removeComponent", [component]))
|
|
9342
|
+
|
|
9343
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
|
|
9344
|
+
typing.cast(typing.Any, IConfigurableRunnerImageBuilder).__jsii_proxy_class__ = lambda : _IConfigurableRunnerImageBuilderProxy
|
|
9345
|
+
|
|
9346
|
+
|
|
9347
|
+
class LambdaRunner(
|
|
9348
|
+
LambdaRunnerProvider,
|
|
9349
|
+
metaclass=jsii.JSIIMeta,
|
|
9350
|
+
jsii_type="@cloudsnorkel/cdk-github-runners.LambdaRunner",
|
|
9351
|
+
):
|
|
9352
|
+
'''
|
|
9353
|
+
:deprecated: use {@link LambdaRunnerProvider }
|
|
9354
|
+
|
|
9355
|
+
:stability: deprecated
|
|
9356
|
+
'''
|
|
9357
|
+
|
|
9358
|
+
def __init__(
|
|
9359
|
+
self,
|
|
9518
9360
|
scope: _constructs_77d1e7e8.Construct,
|
|
9519
9361
|
id: builtins.str,
|
|
9520
9362
|
*,
|
|
@@ -9744,100 +9586,395 @@ class LambdaRunnerProviderProps(RunnerProviderProps):
|
|
|
9744
9586
|
|
|
9745
9587
|
:stability: experimental
|
|
9746
9588
|
'''
|
|
9747
|
-
result = self._values.get("labels")
|
|
9748
|
-
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
|
|
9589
|
+
result = self._values.get("labels")
|
|
9590
|
+
return typing.cast(typing.Optional[typing.List[builtins.str]], result)
|
|
9591
|
+
|
|
9592
|
+
@builtins.property
|
|
9593
|
+
def memory_size(self) -> typing.Optional[jsii.Number]:
|
|
9594
|
+
'''(experimental) The amount of memory, in MB, that is allocated to your Lambda function.
|
|
9595
|
+
|
|
9596
|
+
Lambda uses this value to proportionally allocate the amount of CPU
|
|
9597
|
+
power. For more information, see Resource Model in the AWS Lambda
|
|
9598
|
+
Developer Guide.
|
|
9599
|
+
|
|
9600
|
+
:default: 2048
|
|
9601
|
+
|
|
9602
|
+
:stability: experimental
|
|
9603
|
+
'''
|
|
9604
|
+
result = self._values.get("memory_size")
|
|
9605
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
9606
|
+
|
|
9607
|
+
@builtins.property
|
|
9608
|
+
def security_group(
|
|
9609
|
+
self,
|
|
9610
|
+
) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]:
|
|
9611
|
+
'''(deprecated) Security group to assign to this instance.
|
|
9612
|
+
|
|
9613
|
+
:default: public lambda with no security group
|
|
9614
|
+
|
|
9615
|
+
:deprecated: use {@link securityGroups }
|
|
9616
|
+
|
|
9617
|
+
:stability: deprecated
|
|
9618
|
+
'''
|
|
9619
|
+
result = self._values.get("security_group")
|
|
9620
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup], result)
|
|
9621
|
+
|
|
9622
|
+
@builtins.property
|
|
9623
|
+
def security_groups(
|
|
9624
|
+
self,
|
|
9625
|
+
) -> typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]]:
|
|
9626
|
+
'''(experimental) Security groups to assign to this instance.
|
|
9627
|
+
|
|
9628
|
+
:default: public lambda with no security group
|
|
9629
|
+
|
|
9630
|
+
:stability: experimental
|
|
9631
|
+
'''
|
|
9632
|
+
result = self._values.get("security_groups")
|
|
9633
|
+
return typing.cast(typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]], result)
|
|
9634
|
+
|
|
9635
|
+
@builtins.property
|
|
9636
|
+
def subnet_selection(
|
|
9637
|
+
self,
|
|
9638
|
+
) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection]:
|
|
9639
|
+
'''(experimental) Where to place the network interfaces within the VPC.
|
|
9640
|
+
|
|
9641
|
+
:default: no subnet
|
|
9642
|
+
|
|
9643
|
+
:stability: experimental
|
|
9644
|
+
'''
|
|
9645
|
+
result = self._values.get("subnet_selection")
|
|
9646
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection], result)
|
|
9647
|
+
|
|
9648
|
+
@builtins.property
|
|
9649
|
+
def timeout(self) -> typing.Optional[_aws_cdk_ceddda9d.Duration]:
|
|
9650
|
+
'''(experimental) The function execution time (in seconds) after which Lambda terminates the function.
|
|
9651
|
+
|
|
9652
|
+
Because the execution time affects cost, set this value
|
|
9653
|
+
based on the function's expected execution time.
|
|
9654
|
+
|
|
9655
|
+
:default: Duration.minutes(15)
|
|
9656
|
+
|
|
9657
|
+
:stability: experimental
|
|
9658
|
+
'''
|
|
9659
|
+
result = self._values.get("timeout")
|
|
9660
|
+
return typing.cast(typing.Optional[_aws_cdk_ceddda9d.Duration], result)
|
|
9661
|
+
|
|
9662
|
+
@builtins.property
|
|
9663
|
+
def vpc(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc]:
|
|
9664
|
+
'''(experimental) VPC to launch the runners in.
|
|
9665
|
+
|
|
9666
|
+
:default: no VPC
|
|
9667
|
+
|
|
9668
|
+
:stability: experimental
|
|
9669
|
+
'''
|
|
9670
|
+
result = self._values.get("vpc")
|
|
9671
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc], result)
|
|
9672
|
+
|
|
9673
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
9674
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
9675
|
+
|
|
9676
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
9677
|
+
return not (rhs == self)
|
|
9678
|
+
|
|
9679
|
+
def __repr__(self) -> str:
|
|
9680
|
+
return "LambdaRunnerProviderProps(%s)" % ", ".join(
|
|
9681
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
9682
|
+
)
|
|
9683
|
+
|
|
9684
|
+
|
|
9685
|
+
@jsii.implements(IConfigurableRunnerImageBuilder)
|
|
9686
|
+
class RunnerImageBuilder(
|
|
9687
|
+
_constructs_77d1e7e8.Construct,
|
|
9688
|
+
metaclass=jsii.JSIIAbstractClass,
|
|
9689
|
+
jsii_type="@cloudsnorkel/cdk-github-runners.RunnerImageBuilder",
|
|
9690
|
+
):
|
|
9691
|
+
'''(experimental) GitHub Runner image builder. Builds a Docker image or AMI with GitHub Runner and other requirements installed.
|
|
9692
|
+
|
|
9693
|
+
Images can be customized before passed into the provider by adding or removing components to be installed.
|
|
9694
|
+
|
|
9695
|
+
Images are rebuilt every week by default to ensure that the latest security patches are applied.
|
|
9696
|
+
|
|
9697
|
+
:stability: experimental
|
|
9698
|
+
'''
|
|
9699
|
+
|
|
9700
|
+
def __init__(
|
|
9701
|
+
self,
|
|
9702
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
9703
|
+
id: builtins.str,
|
|
9704
|
+
*,
|
|
9705
|
+
architecture: typing.Optional[Architecture] = None,
|
|
9706
|
+
aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
9707
|
+
base_ami: typing.Optional[builtins.str] = None,
|
|
9708
|
+
base_docker_image: typing.Optional[builtins.str] = None,
|
|
9709
|
+
builder_type: typing.Optional[RunnerImageBuilderType] = None,
|
|
9710
|
+
code_build_options: typing.Optional[typing.Union[CodeBuildRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
9711
|
+
components: typing.Optional[typing.Sequence[RunnerImageComponent]] = None,
|
|
9712
|
+
log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
9713
|
+
log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
|
|
9714
|
+
os: typing.Optional[Os] = None,
|
|
9715
|
+
rebuild_interval: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
|
9716
|
+
runner_version: typing.Optional[RunnerVersion] = None,
|
|
9717
|
+
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
9718
|
+
subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
9719
|
+
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
|
9720
|
+
) -> None:
|
|
9721
|
+
'''
|
|
9722
|
+
:param scope: -
|
|
9723
|
+
:param id: -
|
|
9724
|
+
:param architecture: (experimental) Image architecture. Default: Architecture.X86_64
|
|
9725
|
+
:param aws_image_builder_options: (experimental) Options specific to AWS Image Builder. Only used when builderType is RunnerImageBuilderType.AWS_IMAGE_BUILDER.
|
|
9726
|
+
:param base_ami: (experimental) Base AMI from which runner AMIs will be built. This can be an actual AMI or an AWS Image Builder ARN that points to the latest AMI. For example ``arn:aws:imagebuilder:us-east-1:aws:image/ubuntu-server-22-lts-x86/x.x.x`` would always use the latest version of Ubuntu 22.04 in each build. If you want a specific version, you can replace ``x.x.x`` with that version. Default: latest Ubuntu 22.04 AMI for Os.LINUX_UBUNTU, latest Amazon Linux 2 AMI for Os.LINUX_AMAZON_2, latest Windows Server 2022 AMI for Os.WINDOWS
|
|
9727
|
+
:param base_docker_image: (experimental) Base image from which Docker runner images will be built. Default: public.ecr.aws/lts/ubuntu:22.04 for Os.LINUX_UBUNTU, public.ecr.aws/amazonlinux/amazonlinux:2 for Os.LINUX_AMAZON_2, mcr.microsoft.com/windows/servercore:ltsc2019-amd64 for Os.WINDOWS
|
|
9728
|
+
:param builder_type: Default: CodeBuild for Linux Docker image, AWS Image Builder for Windows Docker image and any AMI
|
|
9729
|
+
:param code_build_options: (experimental) Options specific to CodeBuild image builder. Only used when builderType is RunnerImageBuilderType.CODE_BUILD.
|
|
9730
|
+
:param components: (experimental) Components to install on the image. Default: none
|
|
9731
|
+
:param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
|
|
9732
|
+
:param log_retention: (experimental) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. Default: logs.RetentionDays.ONE_MONTH
|
|
9733
|
+
:param os: (experimental) Image OS. Default: OS.LINUX_UBUNTU
|
|
9734
|
+
:param rebuild_interval: (experimental) Schedule the image to be rebuilt every given interval. Useful for keeping the image up-do-date with the latest GitHub runner version and latest OS updates. Set to zero to disable. Default: Duration.days(7)
|
|
9735
|
+
:param runner_version: (experimental) Version of GitHub Runners to install. Default: latest version available
|
|
9736
|
+
:param security_groups: (experimental) Security Groups to assign to this instance.
|
|
9737
|
+
:param subnet_selection: (experimental) Where to place the network interfaces within the VPC. Default: no subnet
|
|
9738
|
+
:param vpc: (experimental) VPC to build the image in. Default: no VPC
|
|
9739
|
+
|
|
9740
|
+
:stability: experimental
|
|
9741
|
+
'''
|
|
9742
|
+
if __debug__:
|
|
9743
|
+
type_hints = typing.get_type_hints(_typecheckingstub__963c9a4884bb9d7400672391dfb47486f969a1b8fe5616bba9cd493e8a71484b)
|
|
9744
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
9745
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
9746
|
+
props = RunnerImageBuilderProps(
|
|
9747
|
+
architecture=architecture,
|
|
9748
|
+
aws_image_builder_options=aws_image_builder_options,
|
|
9749
|
+
base_ami=base_ami,
|
|
9750
|
+
base_docker_image=base_docker_image,
|
|
9751
|
+
builder_type=builder_type,
|
|
9752
|
+
code_build_options=code_build_options,
|
|
9753
|
+
components=components,
|
|
9754
|
+
log_removal_policy=log_removal_policy,
|
|
9755
|
+
log_retention=log_retention,
|
|
9756
|
+
os=os,
|
|
9757
|
+
rebuild_interval=rebuild_interval,
|
|
9758
|
+
runner_version=runner_version,
|
|
9759
|
+
security_groups=security_groups,
|
|
9760
|
+
subnet_selection=subnet_selection,
|
|
9761
|
+
vpc=vpc,
|
|
9762
|
+
)
|
|
9763
|
+
|
|
9764
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
9765
|
+
|
|
9766
|
+
@jsii.member(jsii_name="new")
|
|
9767
|
+
@builtins.classmethod
|
|
9768
|
+
def new(
|
|
9769
|
+
cls,
|
|
9770
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
9771
|
+
id: builtins.str,
|
|
9772
|
+
*,
|
|
9773
|
+
architecture: typing.Optional[Architecture] = None,
|
|
9774
|
+
aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
9775
|
+
base_ami: typing.Optional[builtins.str] = None,
|
|
9776
|
+
base_docker_image: typing.Optional[builtins.str] = None,
|
|
9777
|
+
builder_type: typing.Optional[RunnerImageBuilderType] = None,
|
|
9778
|
+
code_build_options: typing.Optional[typing.Union[CodeBuildRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
9779
|
+
components: typing.Optional[typing.Sequence[RunnerImageComponent]] = None,
|
|
9780
|
+
log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
9781
|
+
log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
|
|
9782
|
+
os: typing.Optional[Os] = None,
|
|
9783
|
+
rebuild_interval: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
|
9784
|
+
runner_version: typing.Optional[RunnerVersion] = None,
|
|
9785
|
+
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
9786
|
+
subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
9787
|
+
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
|
9788
|
+
) -> IConfigurableRunnerImageBuilder:
|
|
9789
|
+
'''(experimental) Create a new image builder based on the provided properties.
|
|
9790
|
+
|
|
9791
|
+
The implementation will differ based on the OS, architecture, and requested builder type.
|
|
9792
|
+
|
|
9793
|
+
:param scope: -
|
|
9794
|
+
:param id: -
|
|
9795
|
+
:param architecture: (experimental) Image architecture. Default: Architecture.X86_64
|
|
9796
|
+
:param aws_image_builder_options: (experimental) Options specific to AWS Image Builder. Only used when builderType is RunnerImageBuilderType.AWS_IMAGE_BUILDER.
|
|
9797
|
+
:param base_ami: (experimental) Base AMI from which runner AMIs will be built. This can be an actual AMI or an AWS Image Builder ARN that points to the latest AMI. For example ``arn:aws:imagebuilder:us-east-1:aws:image/ubuntu-server-22-lts-x86/x.x.x`` would always use the latest version of Ubuntu 22.04 in each build. If you want a specific version, you can replace ``x.x.x`` with that version. Default: latest Ubuntu 22.04 AMI for Os.LINUX_UBUNTU, latest Amazon Linux 2 AMI for Os.LINUX_AMAZON_2, latest Windows Server 2022 AMI for Os.WINDOWS
|
|
9798
|
+
:param base_docker_image: (experimental) Base image from which Docker runner images will be built. Default: public.ecr.aws/lts/ubuntu:22.04 for Os.LINUX_UBUNTU, public.ecr.aws/amazonlinux/amazonlinux:2 for Os.LINUX_AMAZON_2, mcr.microsoft.com/windows/servercore:ltsc2019-amd64 for Os.WINDOWS
|
|
9799
|
+
:param builder_type: Default: CodeBuild for Linux Docker image, AWS Image Builder for Windows Docker image and any AMI
|
|
9800
|
+
:param code_build_options: (experimental) Options specific to CodeBuild image builder. Only used when builderType is RunnerImageBuilderType.CODE_BUILD.
|
|
9801
|
+
:param components: (experimental) Components to install on the image. Default: none
|
|
9802
|
+
:param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
|
|
9803
|
+
:param log_retention: (experimental) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. Default: logs.RetentionDays.ONE_MONTH
|
|
9804
|
+
:param os: (experimental) Image OS. Default: OS.LINUX_UBUNTU
|
|
9805
|
+
:param rebuild_interval: (experimental) Schedule the image to be rebuilt every given interval. Useful for keeping the image up-do-date with the latest GitHub runner version and latest OS updates. Set to zero to disable. Default: Duration.days(7)
|
|
9806
|
+
:param runner_version: (experimental) Version of GitHub Runners to install. Default: latest version available
|
|
9807
|
+
:param security_groups: (experimental) Security Groups to assign to this instance.
|
|
9808
|
+
:param subnet_selection: (experimental) Where to place the network interfaces within the VPC. Default: no subnet
|
|
9809
|
+
:param vpc: (experimental) VPC to build the image in. Default: no VPC
|
|
9810
|
+
|
|
9811
|
+
:stability: experimental
|
|
9812
|
+
'''
|
|
9813
|
+
if __debug__:
|
|
9814
|
+
type_hints = typing.get_type_hints(_typecheckingstub__c44d5704c54d7fdcf24ad39567c0e9f53f9837163bf8bf3b1b4e652e27c9ec75)
|
|
9815
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
9816
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
9817
|
+
props = RunnerImageBuilderProps(
|
|
9818
|
+
architecture=architecture,
|
|
9819
|
+
aws_image_builder_options=aws_image_builder_options,
|
|
9820
|
+
base_ami=base_ami,
|
|
9821
|
+
base_docker_image=base_docker_image,
|
|
9822
|
+
builder_type=builder_type,
|
|
9823
|
+
code_build_options=code_build_options,
|
|
9824
|
+
components=components,
|
|
9825
|
+
log_removal_policy=log_removal_policy,
|
|
9826
|
+
log_retention=log_retention,
|
|
9827
|
+
os=os,
|
|
9828
|
+
rebuild_interval=rebuild_interval,
|
|
9829
|
+
runner_version=runner_version,
|
|
9830
|
+
security_groups=security_groups,
|
|
9831
|
+
subnet_selection=subnet_selection,
|
|
9832
|
+
vpc=vpc,
|
|
9833
|
+
)
|
|
9834
|
+
|
|
9835
|
+
return typing.cast(IConfigurableRunnerImageBuilder, jsii.sinvoke(cls, "new", [scope, id, props]))
|
|
9836
|
+
|
|
9837
|
+
@jsii.member(jsii_name="addComponent")
|
|
9838
|
+
def add_component(self, component: RunnerImageComponent) -> None:
|
|
9839
|
+
'''(experimental) Add a component to the image builder.
|
|
9840
|
+
|
|
9841
|
+
The component will be added to the end of the list of components.
|
|
9842
|
+
|
|
9843
|
+
:param component: -
|
|
9844
|
+
|
|
9845
|
+
:stability: experimental
|
|
9846
|
+
'''
|
|
9847
|
+
if __debug__:
|
|
9848
|
+
type_hints = typing.get_type_hints(_typecheckingstub__9dec4d5fbab87fa223a0eb0a144ad5bd91f9cdd54d3337c971ce6435c76dc049)
|
|
9849
|
+
check_type(argname="argument component", value=component, expected_type=type_hints["component"])
|
|
9850
|
+
return typing.cast(None, jsii.invoke(self, "addComponent", [component]))
|
|
9851
|
+
|
|
9852
|
+
@jsii.member(jsii_name="bindAmi")
|
|
9853
|
+
@abc.abstractmethod
|
|
9854
|
+
def bind_ami(self) -> RunnerAmi:
|
|
9855
|
+
'''(experimental) Build and return an AMI with GitHub Runner installed in it.
|
|
9856
|
+
|
|
9857
|
+
Anything that ends up with a launch template pointing to an AMI that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing AMI and nothing else.
|
|
9858
|
+
|
|
9859
|
+
The AMI can be further updated over time manually or using a schedule as long as it is always written to the same launch template.
|
|
9860
|
+
|
|
9861
|
+
:stability: experimental
|
|
9862
|
+
'''
|
|
9863
|
+
...
|
|
9864
|
+
|
|
9865
|
+
@jsii.member(jsii_name="bindDockerImage")
|
|
9866
|
+
@abc.abstractmethod
|
|
9867
|
+
def bind_docker_image(self) -> RunnerImage:
|
|
9868
|
+
'''(experimental) Build and return a Docker image with GitHub Runner installed in it.
|
|
9869
|
+
|
|
9870
|
+
Anything that ends up with an ECR repository containing a Docker image that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing image and nothing else.
|
|
9871
|
+
|
|
9872
|
+
It's important that the specified image tag be available at the time the repository is available. Providers usually assume the image is ready and will fail if it's not.
|
|
9873
|
+
|
|
9874
|
+
The image can be further updated over time manually or using a schedule as long as it is always written to the same tag.
|
|
9875
|
+
|
|
9876
|
+
:stability: experimental
|
|
9877
|
+
'''
|
|
9878
|
+
...
|
|
9879
|
+
|
|
9880
|
+
@jsii.member(jsii_name="removeComponent")
|
|
9881
|
+
def remove_component(self, component: RunnerImageComponent) -> None:
|
|
9882
|
+
'''(experimental) Remove a component from the image builder.
|
|
9883
|
+
|
|
9884
|
+
Removal is done by component name. Multiple components with the same name will all be removed.
|
|
9885
|
+
|
|
9886
|
+
:param component: -
|
|
9887
|
+
|
|
9888
|
+
:stability: experimental
|
|
9889
|
+
'''
|
|
9890
|
+
if __debug__:
|
|
9891
|
+
type_hints = typing.get_type_hints(_typecheckingstub__1c4318b2834e7865918b5308b85c0fd80f22d29a067d68d4ee8537a6c0c88b3b)
|
|
9892
|
+
check_type(argname="argument component", value=component, expected_type=type_hints["component"])
|
|
9893
|
+
return typing.cast(None, jsii.invoke(self, "removeComponent", [component]))
|
|
9894
|
+
|
|
9895
|
+
@builtins.property
|
|
9896
|
+
@jsii.member(jsii_name="connections")
|
|
9897
|
+
@abc.abstractmethod
|
|
9898
|
+
def connections(self) -> _aws_cdk_aws_ec2_ceddda9d.Connections:
|
|
9899
|
+
'''(experimental) The network connections associated with this resource.
|
|
9900
|
+
|
|
9901
|
+
:stability: experimental
|
|
9902
|
+
'''
|
|
9903
|
+
...
|
|
9749
9904
|
|
|
9750
9905
|
@builtins.property
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
power. For more information, see Resource Model in the AWS Lambda
|
|
9756
|
-
Developer Guide.
|
|
9757
|
-
|
|
9758
|
-
:default: 2048
|
|
9906
|
+
@jsii.member(jsii_name="grantPrincipal")
|
|
9907
|
+
@abc.abstractmethod
|
|
9908
|
+
def grant_principal(self) -> _aws_cdk_aws_iam_ceddda9d.IPrincipal:
|
|
9909
|
+
'''(experimental) The principal to grant permissions to.
|
|
9759
9910
|
|
|
9760
9911
|
:stability: experimental
|
|
9761
9912
|
'''
|
|
9762
|
-
|
|
9763
|
-
return typing.cast(typing.Optional[jsii.Number], result)
|
|
9913
|
+
...
|
|
9764
9914
|
|
|
9765
9915
|
@builtins.property
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
9769
|
-
|
|
9916
|
+
@jsii.member(jsii_name="components")
|
|
9917
|
+
def _components(self) -> typing.List[RunnerImageComponent]:
|
|
9918
|
+
'''
|
|
9919
|
+
:stability: experimental
|
|
9920
|
+
'''
|
|
9921
|
+
return typing.cast(typing.List[RunnerImageComponent], jsii.get(self, "components"))
|
|
9770
9922
|
|
|
9771
|
-
|
|
9923
|
+
@_components.setter
|
|
9924
|
+
def _components(self, value: typing.List[RunnerImageComponent]) -> None:
|
|
9925
|
+
if __debug__:
|
|
9926
|
+
type_hints = typing.get_type_hints(_typecheckingstub__705c18a1eedaa490aebad511aac32a801519a57162e30be4673a8ab87ca434dc)
|
|
9927
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
9928
|
+
jsii.set(self, "components", value)
|
|
9772
9929
|
|
|
9773
|
-
:deprecated: use {@link securityGroups }
|
|
9774
9930
|
|
|
9775
|
-
|
|
9776
|
-
|
|
9777
|
-
|
|
9778
|
-
return
|
|
9931
|
+
class _RunnerImageBuilderProxy(RunnerImageBuilder):
|
|
9932
|
+
@jsii.member(jsii_name="bindAmi")
|
|
9933
|
+
def bind_ami(self) -> RunnerAmi:
|
|
9934
|
+
'''(experimental) Build and return an AMI with GitHub Runner installed in it.
|
|
9779
9935
|
|
|
9780
|
-
|
|
9781
|
-
def security_groups(
|
|
9782
|
-
self,
|
|
9783
|
-
) -> typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]]:
|
|
9784
|
-
'''(experimental) Security groups to assign to this instance.
|
|
9936
|
+
Anything that ends up with a launch template pointing to an AMI that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing AMI and nothing else.
|
|
9785
9937
|
|
|
9786
|
-
|
|
9938
|
+
The AMI can be further updated over time manually or using a schedule as long as it is always written to the same launch template.
|
|
9787
9939
|
|
|
9788
9940
|
:stability: experimental
|
|
9789
9941
|
'''
|
|
9790
|
-
|
|
9791
|
-
return typing.cast(typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]], result)
|
|
9942
|
+
return typing.cast(RunnerAmi, jsii.invoke(self, "bindAmi", []))
|
|
9792
9943
|
|
|
9793
|
-
@
|
|
9794
|
-
def
|
|
9795
|
-
|
|
9796
|
-
) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection]:
|
|
9797
|
-
'''(experimental) Where to place the network interfaces within the VPC.
|
|
9944
|
+
@jsii.member(jsii_name="bindDockerImage")
|
|
9945
|
+
def bind_docker_image(self) -> RunnerImage:
|
|
9946
|
+
'''(experimental) Build and return a Docker image with GitHub Runner installed in it.
|
|
9798
9947
|
|
|
9799
|
-
|
|
9948
|
+
Anything that ends up with an ECR repository containing a Docker image that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing image and nothing else.
|
|
9949
|
+
|
|
9950
|
+
It's important that the specified image tag be available at the time the repository is available. Providers usually assume the image is ready and will fail if it's not.
|
|
9951
|
+
|
|
9952
|
+
The image can be further updated over time manually or using a schedule as long as it is always written to the same tag.
|
|
9800
9953
|
|
|
9801
9954
|
:stability: experimental
|
|
9802
9955
|
'''
|
|
9803
|
-
|
|
9804
|
-
return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection], result)
|
|
9956
|
+
return typing.cast(RunnerImage, jsii.invoke(self, "bindDockerImage", []))
|
|
9805
9957
|
|
|
9806
9958
|
@builtins.property
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
Because the execution time affects cost, set this value
|
|
9811
|
-
based on the function's expected execution time.
|
|
9812
|
-
|
|
9813
|
-
:default: Duration.minutes(15)
|
|
9959
|
+
@jsii.member(jsii_name="connections")
|
|
9960
|
+
def connections(self) -> _aws_cdk_aws_ec2_ceddda9d.Connections:
|
|
9961
|
+
'''(experimental) The network connections associated with this resource.
|
|
9814
9962
|
|
|
9815
9963
|
:stability: experimental
|
|
9816
9964
|
'''
|
|
9817
|
-
|
|
9818
|
-
return typing.cast(typing.Optional[_aws_cdk_ceddda9d.Duration], result)
|
|
9965
|
+
return typing.cast(_aws_cdk_aws_ec2_ceddda9d.Connections, jsii.get(self, "connections"))
|
|
9819
9966
|
|
|
9820
9967
|
@builtins.property
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
:default: no VPC
|
|
9968
|
+
@jsii.member(jsii_name="grantPrincipal")
|
|
9969
|
+
def grant_principal(self) -> _aws_cdk_aws_iam_ceddda9d.IPrincipal:
|
|
9970
|
+
'''(experimental) The principal to grant permissions to.
|
|
9825
9971
|
|
|
9826
9972
|
:stability: experimental
|
|
9827
9973
|
'''
|
|
9828
|
-
|
|
9829
|
-
return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc], result)
|
|
9830
|
-
|
|
9831
|
-
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
9832
|
-
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
9833
|
-
|
|
9834
|
-
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
9835
|
-
return not (rhs == self)
|
|
9974
|
+
return typing.cast(_aws_cdk_aws_iam_ceddda9d.IPrincipal, jsii.get(self, "grantPrincipal"))
|
|
9836
9975
|
|
|
9837
|
-
|
|
9838
|
-
|
|
9839
|
-
k + "=" + repr(v) for k, v in self._values.items()
|
|
9840
|
-
)
|
|
9976
|
+
# Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
|
|
9977
|
+
typing.cast(typing.Any, RunnerImageBuilder).__jsii_proxy_class__ = lambda : _RunnerImageBuilderProxy
|
|
9841
9978
|
|
|
9842
9979
|
|
|
9843
9980
|
class CodeBuildRunner(
|
|
@@ -10086,6 +10223,7 @@ __all__ = [
|
|
|
10086
10223
|
"FargateRunnerProviderProps",
|
|
10087
10224
|
"GitHubRunners",
|
|
10088
10225
|
"GitHubRunnersProps",
|
|
10226
|
+
"IConfigurableRunnerImageBuilder",
|
|
10089
10227
|
"IRunnerAmiStatus",
|
|
10090
10228
|
"IRunnerImageBuilder",
|
|
10091
10229
|
"IRunnerImageStatus",
|
|
@@ -10228,6 +10366,7 @@ def _typecheckingstub__c1a45de07d09ed9f4fd0b9051aeff4571ceda633f49c0b30a5058ad6d
|
|
|
10228
10366
|
idle_timeout: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
|
10229
10367
|
log_options: typing.Optional[typing.Union[LogOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
10230
10368
|
providers: typing.Optional[typing.Sequence[IRunnerProvider]] = None,
|
|
10369
|
+
require_self_hosted_label: typing.Optional[builtins.bool] = None,
|
|
10231
10370
|
retry_options: typing.Optional[typing.Union[ProviderRetryOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
10232
10371
|
security_group: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup] = None,
|
|
10233
10372
|
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
@@ -10247,6 +10386,7 @@ def _typecheckingstub__4db12e50ec9bf1582f493963c13640e2d81a3a4afae3df834ecce0bf8
|
|
|
10247
10386
|
idle_timeout: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
|
10248
10387
|
log_options: typing.Optional[typing.Union[LogOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
10249
10388
|
providers: typing.Optional[typing.Sequence[IRunnerProvider]] = None,
|
|
10389
|
+
require_self_hosted_label: typing.Optional[builtins.bool] = None,
|
|
10250
10390
|
retry_options: typing.Optional[typing.Union[ProviderRetryOptions, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
10251
10391
|
security_group: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup] = None,
|
|
10252
10392
|
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
@@ -10293,6 +10433,14 @@ def _typecheckingstub__363ebaab8a0bcbaea3d32a9c7e3cb241f08cf49d6eea02ba40eaaef9a
|
|
|
10293
10433
|
"""Type checking stubs"""
|
|
10294
10434
|
pass
|
|
10295
10435
|
|
|
10436
|
+
def _typecheckingstub__abecb3decfe8eebf190daa2e93a508111cc10650e6b9fbf65b3a34f3ed07ca24(
|
|
10437
|
+
type: builtins.str,
|
|
10438
|
+
name: builtins.str,
|
|
10439
|
+
data: typing.Any,
|
|
10440
|
+
) -> None:
|
|
10441
|
+
"""Type checking stubs"""
|
|
10442
|
+
pass
|
|
10443
|
+
|
|
10296
10444
|
def _typecheckingstub__a450535474a302df6d17ac0b627edd05f72f54c900f36380517d39fc0a3b15e4(
|
|
10297
10445
|
grantee: _aws_cdk_aws_iam_ceddda9d.IGrantable,
|
|
10298
10446
|
) -> None:
|
|
@@ -10306,14 +10454,6 @@ def _typecheckingstub__bae848cd8ee55808c4c98a6e69173dc05ae5472e3b1443ee6fbc64e32
|
|
|
10306
10454
|
"""Type checking stubs"""
|
|
10307
10455
|
pass
|
|
10308
10456
|
|
|
10309
|
-
def _typecheckingstub__e11323aa6f18ef1898e18067dba5908fdeabd333bfc1604f92c4c244adb28f7f(
|
|
10310
|
-
type: builtins.str,
|
|
10311
|
-
name: builtins.str,
|
|
10312
|
-
data: typing.Any,
|
|
10313
|
-
) -> None:
|
|
10314
|
-
"""Type checking stubs"""
|
|
10315
|
-
pass
|
|
10316
|
-
|
|
10317
10457
|
def _typecheckingstub__b86439e194b36e470271c572c251444f98c4b86a68fa7e63cf41ae1fa9628d4a(
|
|
10318
10458
|
*,
|
|
10319
10459
|
commands: typing.Sequence[builtins.str],
|
|
@@ -10525,70 +10665,6 @@ def _typecheckingstub__21bedad36e17a5840ddb719458c9e0eb15a89e493efa80af28f6031d1
|
|
|
10525
10665
|
"""Type checking stubs"""
|
|
10526
10666
|
pass
|
|
10527
10667
|
|
|
10528
|
-
def _typecheckingstub__963c9a4884bb9d7400672391dfb47486f969a1b8fe5616bba9cd493e8a71484b(
|
|
10529
|
-
scope: _constructs_77d1e7e8.Construct,
|
|
10530
|
-
id: builtins.str,
|
|
10531
|
-
*,
|
|
10532
|
-
architecture: typing.Optional[Architecture] = None,
|
|
10533
|
-
aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
10534
|
-
base_ami: typing.Optional[builtins.str] = None,
|
|
10535
|
-
base_docker_image: typing.Optional[builtins.str] = None,
|
|
10536
|
-
builder_type: typing.Optional[RunnerImageBuilderType] = None,
|
|
10537
|
-
code_build_options: typing.Optional[typing.Union[CodeBuildRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
10538
|
-
components: typing.Optional[typing.Sequence[RunnerImageComponent]] = None,
|
|
10539
|
-
log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
10540
|
-
log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
|
|
10541
|
-
os: typing.Optional[Os] = None,
|
|
10542
|
-
rebuild_interval: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
|
10543
|
-
runner_version: typing.Optional[RunnerVersion] = None,
|
|
10544
|
-
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
10545
|
-
subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
10546
|
-
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
|
10547
|
-
) -> None:
|
|
10548
|
-
"""Type checking stubs"""
|
|
10549
|
-
pass
|
|
10550
|
-
|
|
10551
|
-
def _typecheckingstub__c44d5704c54d7fdcf24ad39567c0e9f53f9837163bf8bf3b1b4e652e27c9ec75(
|
|
10552
|
-
scope: _constructs_77d1e7e8.Construct,
|
|
10553
|
-
id: builtins.str,
|
|
10554
|
-
*,
|
|
10555
|
-
architecture: typing.Optional[Architecture] = None,
|
|
10556
|
-
aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
10557
|
-
base_ami: typing.Optional[builtins.str] = None,
|
|
10558
|
-
base_docker_image: typing.Optional[builtins.str] = None,
|
|
10559
|
-
builder_type: typing.Optional[RunnerImageBuilderType] = None,
|
|
10560
|
-
code_build_options: typing.Optional[typing.Union[CodeBuildRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
10561
|
-
components: typing.Optional[typing.Sequence[RunnerImageComponent]] = None,
|
|
10562
|
-
log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
10563
|
-
log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
|
|
10564
|
-
os: typing.Optional[Os] = None,
|
|
10565
|
-
rebuild_interval: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
|
10566
|
-
runner_version: typing.Optional[RunnerVersion] = None,
|
|
10567
|
-
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
10568
|
-
subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
10569
|
-
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
|
10570
|
-
) -> None:
|
|
10571
|
-
"""Type checking stubs"""
|
|
10572
|
-
pass
|
|
10573
|
-
|
|
10574
|
-
def _typecheckingstub__9dec4d5fbab87fa223a0eb0a144ad5bd91f9cdd54d3337c971ce6435c76dc049(
|
|
10575
|
-
component: RunnerImageComponent,
|
|
10576
|
-
) -> None:
|
|
10577
|
-
"""Type checking stubs"""
|
|
10578
|
-
pass
|
|
10579
|
-
|
|
10580
|
-
def _typecheckingstub__1c4318b2834e7865918b5308b85c0fd80f22d29a067d68d4ee8537a6c0c88b3b(
|
|
10581
|
-
component: RunnerImageComponent,
|
|
10582
|
-
) -> None:
|
|
10583
|
-
"""Type checking stubs"""
|
|
10584
|
-
pass
|
|
10585
|
-
|
|
10586
|
-
def _typecheckingstub__705c18a1eedaa490aebad511aac32a801519a57162e30be4673a8ab87ca434dc(
|
|
10587
|
-
value: typing.List[RunnerImageComponent],
|
|
10588
|
-
) -> None:
|
|
10589
|
-
"""Type checking stubs"""
|
|
10590
|
-
pass
|
|
10591
|
-
|
|
10592
10668
|
def _typecheckingstub__ab96b7f3871624e8430668114e7f5748ba5d253168db5b8f9a13955d0a82e43d(
|
|
10593
10669
|
*,
|
|
10594
10670
|
architecture: typing.Optional[Architecture] = None,
|
|
@@ -11337,6 +11413,18 @@ def _typecheckingstub__26cdeb87df1adf5c49e0f9c1c061c7138af674da9af221212e1505fc1
|
|
|
11337
11413
|
"""Type checking stubs"""
|
|
11338
11414
|
pass
|
|
11339
11415
|
|
|
11416
|
+
def _typecheckingstub__dc4625ad41fc3631b6e9812ae4ab86d19fc28eb849f5a5bf3a3ed7c4ebbeb066(
|
|
11417
|
+
component: RunnerImageComponent,
|
|
11418
|
+
) -> None:
|
|
11419
|
+
"""Type checking stubs"""
|
|
11420
|
+
pass
|
|
11421
|
+
|
|
11422
|
+
def _typecheckingstub__3aa11e0e95269ba6ec5fded5dd768fb588157de9643a5fce8b09fc9b4e2a18c0(
|
|
11423
|
+
component: RunnerImageComponent,
|
|
11424
|
+
) -> None:
|
|
11425
|
+
"""Type checking stubs"""
|
|
11426
|
+
pass
|
|
11427
|
+
|
|
11340
11428
|
def _typecheckingstub__80e9b84ecba02bdef856d3ee3f48a5e0a5e58ad813554fd529c0abe3af88217d(
|
|
11341
11429
|
scope: _constructs_77d1e7e8.Construct,
|
|
11342
11430
|
id: builtins.str,
|
|
@@ -11375,6 +11463,70 @@ def _typecheckingstub__45a4a92b817689da2d55675d278ad5c96699269cc41f3406b7fca6d7a
|
|
|
11375
11463
|
"""Type checking stubs"""
|
|
11376
11464
|
pass
|
|
11377
11465
|
|
|
11466
|
+
def _typecheckingstub__963c9a4884bb9d7400672391dfb47486f969a1b8fe5616bba9cd493e8a71484b(
|
|
11467
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
11468
|
+
id: builtins.str,
|
|
11469
|
+
*,
|
|
11470
|
+
architecture: typing.Optional[Architecture] = None,
|
|
11471
|
+
aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
11472
|
+
base_ami: typing.Optional[builtins.str] = None,
|
|
11473
|
+
base_docker_image: typing.Optional[builtins.str] = None,
|
|
11474
|
+
builder_type: typing.Optional[RunnerImageBuilderType] = None,
|
|
11475
|
+
code_build_options: typing.Optional[typing.Union[CodeBuildRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
11476
|
+
components: typing.Optional[typing.Sequence[RunnerImageComponent]] = None,
|
|
11477
|
+
log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
11478
|
+
log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
|
|
11479
|
+
os: typing.Optional[Os] = None,
|
|
11480
|
+
rebuild_interval: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
|
11481
|
+
runner_version: typing.Optional[RunnerVersion] = None,
|
|
11482
|
+
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
11483
|
+
subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
11484
|
+
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
|
11485
|
+
) -> None:
|
|
11486
|
+
"""Type checking stubs"""
|
|
11487
|
+
pass
|
|
11488
|
+
|
|
11489
|
+
def _typecheckingstub__c44d5704c54d7fdcf24ad39567c0e9f53f9837163bf8bf3b1b4e652e27c9ec75(
|
|
11490
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
11491
|
+
id: builtins.str,
|
|
11492
|
+
*,
|
|
11493
|
+
architecture: typing.Optional[Architecture] = None,
|
|
11494
|
+
aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
11495
|
+
base_ami: typing.Optional[builtins.str] = None,
|
|
11496
|
+
base_docker_image: typing.Optional[builtins.str] = None,
|
|
11497
|
+
builder_type: typing.Optional[RunnerImageBuilderType] = None,
|
|
11498
|
+
code_build_options: typing.Optional[typing.Union[CodeBuildRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
11499
|
+
components: typing.Optional[typing.Sequence[RunnerImageComponent]] = None,
|
|
11500
|
+
log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
|
|
11501
|
+
log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
|
|
11502
|
+
os: typing.Optional[Os] = None,
|
|
11503
|
+
rebuild_interval: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
|
11504
|
+
runner_version: typing.Optional[RunnerVersion] = None,
|
|
11505
|
+
security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
|
|
11506
|
+
subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
11507
|
+
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
|
11508
|
+
) -> None:
|
|
11509
|
+
"""Type checking stubs"""
|
|
11510
|
+
pass
|
|
11511
|
+
|
|
11512
|
+
def _typecheckingstub__9dec4d5fbab87fa223a0eb0a144ad5bd91f9cdd54d3337c971ce6435c76dc049(
|
|
11513
|
+
component: RunnerImageComponent,
|
|
11514
|
+
) -> None:
|
|
11515
|
+
"""Type checking stubs"""
|
|
11516
|
+
pass
|
|
11517
|
+
|
|
11518
|
+
def _typecheckingstub__1c4318b2834e7865918b5308b85c0fd80f22d29a067d68d4ee8537a6c0c88b3b(
|
|
11519
|
+
component: RunnerImageComponent,
|
|
11520
|
+
) -> None:
|
|
11521
|
+
"""Type checking stubs"""
|
|
11522
|
+
pass
|
|
11523
|
+
|
|
11524
|
+
def _typecheckingstub__705c18a1eedaa490aebad511aac32a801519a57162e30be4673a8ab87ca434dc(
|
|
11525
|
+
value: typing.List[RunnerImageComponent],
|
|
11526
|
+
) -> None:
|
|
11527
|
+
"""Type checking stubs"""
|
|
11528
|
+
pass
|
|
11529
|
+
|
|
11378
11530
|
def _typecheckingstub__1ab9454b0ecfcd12fc0ab07c0f0f4d7ce646a5a928f5e14092b0a6c42a4c3b79(
|
|
11379
11531
|
scope: _constructs_77d1e7e8.Construct,
|
|
11380
11532
|
id: builtins.str,
|