@cloudsnorkel/cdk-github-runners 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +3 -0
- package/.jsii +1488 -374
- package/API.md +1174 -86
- package/README.md +19 -17
- package/lib/index.d.ts +2 -1
- package/lib/index.js +4 -1
- package/lib/lambdas/aws-image-builder-versioner/index.js +2469 -0
- package/lib/lambdas/build-image/index.js +77 -43
- package/lib/lambdas/delete-runner/index.js +4276 -2096
- package/lib/lambdas/setup/index.html +37 -0
- package/lib/lambdas/setup/index.js +166 -266
- package/lib/lambdas/status/index.js +4311 -2101
- package/lib/lambdas/token-retriever/index.js +4276 -2096
- package/lib/lambdas/update-lambda/index.js +5 -2
- package/lib/lambdas/webhook-handler/index.js +11 -5
- package/lib/providers/codebuild.d.ts +5 -1
- package/lib/providers/codebuild.js +16 -6
- package/lib/providers/common.d.ts +28 -1
- package/lib/providers/common.js +4 -4
- package/lib/providers/docker-images/codebuild/linux-arm64/Dockerfile +5 -1
- package/lib/providers/docker-images/codebuild/linux-x64/Dockerfile +5 -1
- package/lib/providers/docker-images/fargate/linux-arm64/Dockerfile +5 -1
- package/lib/providers/docker-images/fargate/linux-x64/Dockerfile +5 -1
- package/lib/providers/docker-images/lambda/linux-arm64/Dockerfile +4 -0
- package/lib/providers/docker-images/lambda/linux-x64/Dockerfile +4 -0
- package/lib/providers/fargate.d.ts +5 -1
- package/lib/providers/fargate.js +3 -3
- package/lib/providers/image-builders/codebuild.d.ts +10 -2
- package/lib/providers/image-builders/codebuild.js +20 -5
- package/lib/providers/image-builders/container.d.ts +220 -0
- package/lib/providers/image-builders/container.js +508 -0
- package/lib/providers/image-builders/static.js +2 -3
- package/lib/providers/lambda.d.ts +5 -1
- package/lib/providers/lambda.js +19 -8
- package/lib/runner.d.ts +54 -7
- package/lib/runner.js +59 -21
- package/lib/secrets.js +1 -1
- package/lib/utils.js +2 -2
- package/package.json +34 -15
- package/setup/index.html +12 -0
- package/setup/src/App.svelte +291 -0
- package/setup/src/app.scss +15 -0
- package/setup/src/main.ts +8 -0
- package/setup/src/vite-env.d.ts +2 -0
- package/setup/svelte.config.mjs +7 -0
- package/setup/tsconfig.json +21 -0
- package/setup/tsconfig.node.json +8 -0
- package/setup/vite.config.ts +15 -0
package/API.md
CHANGED
|
@@ -23,7 +23,7 @@ const builder = new CodeBuildImageBuilder(this, 'Builder', {
|
|
|
23
23
|
rebuildInterval: Duration.days(14),
|
|
24
24
|
});
|
|
25
25
|
builder.setBuildArg('EXTRA_PACKAGES', 'nginx xz-utils');
|
|
26
|
-
new
|
|
26
|
+
new FargateRunner(this, 'Fargate provider', {
|
|
27
27
|
label: 'customized-fargate',
|
|
28
28
|
imageBuilder: builder,
|
|
29
29
|
});
|
|
@@ -68,6 +68,7 @@ new CodeBuildImageBuilder(scope: Construct, id: string, props: CodeBuildImageBui
|
|
|
68
68
|
| **Name** | **Description** |
|
|
69
69
|
| --- | --- |
|
|
70
70
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
71
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addExtraCertificates">addExtraCertificates</a></code> | Add extra trusted certificates. This helps deal with self-signed certificates for GitHub Enterprise Server. |
|
|
71
72
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addFiles">addFiles</a></code> | Uploads a folder to the build server at a given folder name. |
|
|
72
73
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addPolicyStatement">addPolicyStatement</a></code> | Add a policy statement to the builder to access resources required to the image build. |
|
|
73
74
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addPostBuildCommand">addPostBuildCommand</a></code> | Adds a command that runs after `docker build` and `docker push`. |
|
|
@@ -85,6 +86,24 @@ public toString(): string
|
|
|
85
86
|
|
|
86
87
|
Returns a string representation of this construct.
|
|
87
88
|
|
|
89
|
+
##### `addExtraCertificates` <a name="addExtraCertificates" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addExtraCertificates"></a>
|
|
90
|
+
|
|
91
|
+
```typescript
|
|
92
|
+
public addExtraCertificates(path: string): void
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Add extra trusted certificates. This helps deal with self-signed certificates for GitHub Enterprise Server.
|
|
96
|
+
|
|
97
|
+
All first party Dockerfiles support this. Others may not.
|
|
98
|
+
|
|
99
|
+
###### `path`<sup>Required</sup> <a name="path" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addExtraCertificates.parameter.path"></a>
|
|
100
|
+
|
|
101
|
+
- *Type:* string
|
|
102
|
+
|
|
103
|
+
path to directory containing a file called certs.pem containing all the required certificates.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
88
107
|
##### `addFiles` <a name="addFiles" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addFiles"></a>
|
|
89
108
|
|
|
90
109
|
```typescript
|
|
@@ -361,6 +380,7 @@ Any object.
|
|
|
361
380
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
362
381
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.property.connections">connections</a></code> | <code>aws-cdk-lib.aws_ec2.Connections</code> | The network connections associated with this resource. |
|
|
363
382
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.property.grantPrincipal">grantPrincipal</a></code> | <code>aws-cdk-lib.aws_iam.IPrincipal</code> | Grant principal used to add permissions to the runner role. |
|
|
383
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.property.image">image</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImage">RunnerImage</a></code> | Docker image in CodeBuild project. |
|
|
364
384
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.property.label">label</a></code> | <code>string</code> | Label associated with this provider. |
|
|
365
385
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.property.project">project</a></code> | <code>aws-cdk-lib.aws_codebuild.Project</code> | CodeBuild project hosting the runner. |
|
|
366
386
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup</code> | Security group attached to the task. |
|
|
@@ -404,6 +424,18 @@ Grant principal used to add permissions to the runner role.
|
|
|
404
424
|
|
|
405
425
|
---
|
|
406
426
|
|
|
427
|
+
##### `image`<sup>Required</sup> <a name="image" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunner.property.image"></a>
|
|
428
|
+
|
|
429
|
+
```typescript
|
|
430
|
+
public readonly image: RunnerImage;
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerImage">RunnerImage</a>
|
|
434
|
+
|
|
435
|
+
Docker image in CodeBuild project.
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
407
439
|
##### `label`<sup>Required</sup> <a name="label" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunner.property.label"></a>
|
|
408
440
|
|
|
409
441
|
```typescript
|
|
@@ -505,6 +537,322 @@ Available build arguments that can be set in the image builder:
|
|
|
505
537
|
|
|
506
538
|
---
|
|
507
539
|
|
|
540
|
+
### ContainerImageBuilder <a name="ContainerImageBuilder" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder"></a>
|
|
541
|
+
|
|
542
|
+
- *Implements:* <a href="#@cloudsnorkel/cdk-github-runners.IImageBuilder">IImageBuilder</a>
|
|
543
|
+
|
|
544
|
+
An image builder that uses Image Builder to build Docker images pre-baked with all the GitHub Actions runner requirements.
|
|
545
|
+
|
|
546
|
+
Builders can be used with runner providers.
|
|
547
|
+
|
|
548
|
+
The CodeBuild builder is better and faster. Only use this one if you have no choice. For example, if you need Windows containers.
|
|
549
|
+
|
|
550
|
+
Each builder re-runs automatically at a set interval to make sure the images contain the latest versions of everything.
|
|
551
|
+
|
|
552
|
+
You can create an instance of this construct to customize the image used to spin-up runners. Some runner providers may require custom components. Check the runner provider documentation. The default components work with CodeBuild.
|
|
553
|
+
|
|
554
|
+
For example, to set a specific runner version, rebuild the image every 2 weeks, and add a few packages for the Fargate provider, use:
|
|
555
|
+
|
|
556
|
+
```
|
|
557
|
+
const builder = new ContainerImageBuilder(this, 'Builder', {
|
|
558
|
+
runnerVersion: RunnerVersion.specific('2.293.0'),
|
|
559
|
+
rebuildInterval: Duration.days(14),
|
|
560
|
+
});
|
|
561
|
+
new CodeBuildRunner(this, 'Fargate provider', {
|
|
562
|
+
label: 'windows-codebuild',
|
|
563
|
+
imageBuilder: builder,
|
|
564
|
+
});
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
#### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.Initializer"></a>
|
|
568
|
+
|
|
569
|
+
```typescript
|
|
570
|
+
import { ContainerImageBuilder } from '@cloudsnorkel/cdk-github-runners'
|
|
571
|
+
|
|
572
|
+
new ContainerImageBuilder(scope: Construct, id: string, props?: ContainerImageBuilderProps)
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
| **Name** | **Type** | **Description** |
|
|
576
|
+
| --- | --- | --- |
|
|
577
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
|
|
578
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
|
|
579
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.Initializer.parameter.props">props</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps">ContainerImageBuilderProps</a></code> | *No description.* |
|
|
580
|
+
|
|
581
|
+
---
|
|
582
|
+
|
|
583
|
+
##### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.Initializer.parameter.scope"></a>
|
|
584
|
+
|
|
585
|
+
- *Type:* constructs.Construct
|
|
586
|
+
|
|
587
|
+
---
|
|
588
|
+
|
|
589
|
+
##### `id`<sup>Required</sup> <a name="id" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.Initializer.parameter.id"></a>
|
|
590
|
+
|
|
591
|
+
- *Type:* string
|
|
592
|
+
|
|
593
|
+
---
|
|
594
|
+
|
|
595
|
+
##### `props`<sup>Optional</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.Initializer.parameter.props"></a>
|
|
596
|
+
|
|
597
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps">ContainerImageBuilderProps</a>
|
|
598
|
+
|
|
599
|
+
---
|
|
600
|
+
|
|
601
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
602
|
+
|
|
603
|
+
| **Name** | **Description** |
|
|
604
|
+
| --- | --- |
|
|
605
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
606
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.addComponent">addComponent</a></code> | Add a component to be installed. |
|
|
607
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.addExtraCertificates">addExtraCertificates</a></code> | Add extra trusted certificates. This helps deal with self-signed certificates for GitHub Enterprise Server. |
|
|
608
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.bind">bind</a></code> | Called by IRunnerProvider to finalize settings and create the image builder. |
|
|
609
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.prependComponent">prependComponent</a></code> | Add a component to be installed before any other components. |
|
|
610
|
+
|
|
611
|
+
---
|
|
612
|
+
|
|
613
|
+
##### `toString` <a name="toString" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.toString"></a>
|
|
614
|
+
|
|
615
|
+
```typescript
|
|
616
|
+
public toString(): string
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
Returns a string representation of this construct.
|
|
620
|
+
|
|
621
|
+
##### `addComponent` <a name="addComponent" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.addComponent"></a>
|
|
622
|
+
|
|
623
|
+
```typescript
|
|
624
|
+
public addComponent(component: ImageBuilderComponent): void
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
Add a component to be installed.
|
|
628
|
+
|
|
629
|
+
###### `component`<sup>Required</sup> <a name="component" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.addComponent.parameter.component"></a>
|
|
630
|
+
|
|
631
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent">ImageBuilderComponent</a>
|
|
632
|
+
|
|
633
|
+
---
|
|
634
|
+
|
|
635
|
+
##### `addExtraCertificates` <a name="addExtraCertificates" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.addExtraCertificates"></a>
|
|
636
|
+
|
|
637
|
+
```typescript
|
|
638
|
+
public addExtraCertificates(path: string): void
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
Add extra trusted certificates. This helps deal with self-signed certificates for GitHub Enterprise Server.
|
|
642
|
+
|
|
643
|
+
All first party Dockerfiles support this. Others may not.
|
|
644
|
+
|
|
645
|
+
###### `path`<sup>Required</sup> <a name="path" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.addExtraCertificates.parameter.path"></a>
|
|
646
|
+
|
|
647
|
+
- *Type:* string
|
|
648
|
+
|
|
649
|
+
path to directory containing a file called certs.pem containing all the required certificates.
|
|
650
|
+
|
|
651
|
+
---
|
|
652
|
+
|
|
653
|
+
##### `bind` <a name="bind" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.bind"></a>
|
|
654
|
+
|
|
655
|
+
```typescript
|
|
656
|
+
public bind(): RunnerImage
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+
Called by IRunnerProvider to finalize settings and create the image builder.
|
|
660
|
+
|
|
661
|
+
##### `prependComponent` <a name="prependComponent" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.prependComponent"></a>
|
|
662
|
+
|
|
663
|
+
```typescript
|
|
664
|
+
public prependComponent(component: ImageBuilderComponent): void
|
|
665
|
+
```
|
|
666
|
+
|
|
667
|
+
Add a component to be installed before any other components.
|
|
668
|
+
|
|
669
|
+
Useful for required system settings like certificates or proxy settings.
|
|
670
|
+
|
|
671
|
+
###### `component`<sup>Required</sup> <a name="component" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.prependComponent.parameter.component"></a>
|
|
672
|
+
|
|
673
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent">ImageBuilderComponent</a>
|
|
674
|
+
|
|
675
|
+
---
|
|
676
|
+
|
|
677
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
678
|
+
|
|
679
|
+
| **Name** | **Description** |
|
|
680
|
+
| --- | --- |
|
|
681
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
682
|
+
|
|
683
|
+
---
|
|
684
|
+
|
|
685
|
+
##### ~~`isConstruct`~~ <a name="isConstruct" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.isConstruct"></a>
|
|
686
|
+
|
|
687
|
+
```typescript
|
|
688
|
+
import { ContainerImageBuilder } from '@cloudsnorkel/cdk-github-runners'
|
|
689
|
+
|
|
690
|
+
ContainerImageBuilder.isConstruct(x: any)
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
Checks if `x` is a construct.
|
|
694
|
+
|
|
695
|
+
###### `x`<sup>Required</sup> <a name="x" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.isConstruct.parameter.x"></a>
|
|
696
|
+
|
|
697
|
+
- *Type:* any
|
|
698
|
+
|
|
699
|
+
Any object.
|
|
700
|
+
|
|
701
|
+
---
|
|
702
|
+
|
|
703
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
704
|
+
|
|
705
|
+
| **Name** | **Type** | **Description** |
|
|
706
|
+
| --- | --- | --- |
|
|
707
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
708
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.architecture">architecture</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a></code> | *No description.* |
|
|
709
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.description">description</a></code> | <code>string</code> | *No description.* |
|
|
710
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.instanceTypes">instanceTypes</a></code> | <code>string[]</code> | *No description.* |
|
|
711
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.logRemovalPolicy">logRemovalPolicy</a></code> | <code>aws-cdk-lib.RemovalPolicy</code> | *No description.* |
|
|
712
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.logRetention">logRetention</a></code> | <code>aws-cdk-lib.aws_logs.RetentionDays</code> | *No description.* |
|
|
713
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.os">os</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a></code> | *No description.* |
|
|
714
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.platform">platform</a></code> | <code>string</code> | *No description.* |
|
|
715
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.rebuildInterval">rebuildInterval</a></code> | <code>aws-cdk-lib.Duration</code> | *No description.* |
|
|
716
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.repository">repository</a></code> | <code>aws-cdk-lib.aws_ecr.IRepository</code> | *No description.* |
|
|
717
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.runnerVersion">runnerVersion</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerVersion">RunnerVersion</a></code> | *No description.* |
|
|
718
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.securityGroupIds">securityGroupIds</a></code> | <code>string[]</code> | *No description.* |
|
|
719
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.subnetId">subnetId</a></code> | <code>string</code> | *No description.* |
|
|
720
|
+
|
|
721
|
+
---
|
|
722
|
+
|
|
723
|
+
##### `node`<sup>Required</sup> <a name="node" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.node"></a>
|
|
724
|
+
|
|
725
|
+
```typescript
|
|
726
|
+
public readonly node: Node;
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
- *Type:* constructs.Node
|
|
730
|
+
|
|
731
|
+
The tree node.
|
|
732
|
+
|
|
733
|
+
---
|
|
734
|
+
|
|
735
|
+
##### `architecture`<sup>Required</sup> <a name="architecture" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.architecture"></a>
|
|
736
|
+
|
|
737
|
+
```typescript
|
|
738
|
+
public readonly architecture: Architecture;
|
|
739
|
+
```
|
|
740
|
+
|
|
741
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a>
|
|
742
|
+
|
|
743
|
+
---
|
|
744
|
+
|
|
745
|
+
##### `description`<sup>Required</sup> <a name="description" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.description"></a>
|
|
746
|
+
|
|
747
|
+
```typescript
|
|
748
|
+
public readonly description: string;
|
|
749
|
+
```
|
|
750
|
+
|
|
751
|
+
- *Type:* string
|
|
752
|
+
|
|
753
|
+
---
|
|
754
|
+
|
|
755
|
+
##### `instanceTypes`<sup>Required</sup> <a name="instanceTypes" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.instanceTypes"></a>
|
|
756
|
+
|
|
757
|
+
```typescript
|
|
758
|
+
public readonly instanceTypes: string[];
|
|
759
|
+
```
|
|
760
|
+
|
|
761
|
+
- *Type:* string[]
|
|
762
|
+
|
|
763
|
+
---
|
|
764
|
+
|
|
765
|
+
##### `logRemovalPolicy`<sup>Required</sup> <a name="logRemovalPolicy" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.logRemovalPolicy"></a>
|
|
766
|
+
|
|
767
|
+
```typescript
|
|
768
|
+
public readonly logRemovalPolicy: RemovalPolicy;
|
|
769
|
+
```
|
|
770
|
+
|
|
771
|
+
- *Type:* aws-cdk-lib.RemovalPolicy
|
|
772
|
+
|
|
773
|
+
---
|
|
774
|
+
|
|
775
|
+
##### `logRetention`<sup>Required</sup> <a name="logRetention" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.logRetention"></a>
|
|
776
|
+
|
|
777
|
+
```typescript
|
|
778
|
+
public readonly logRetention: RetentionDays;
|
|
779
|
+
```
|
|
780
|
+
|
|
781
|
+
- *Type:* aws-cdk-lib.aws_logs.RetentionDays
|
|
782
|
+
|
|
783
|
+
---
|
|
784
|
+
|
|
785
|
+
##### `os`<sup>Required</sup> <a name="os" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.os"></a>
|
|
786
|
+
|
|
787
|
+
```typescript
|
|
788
|
+
public readonly os: Os;
|
|
789
|
+
```
|
|
790
|
+
|
|
791
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a>
|
|
792
|
+
|
|
793
|
+
---
|
|
794
|
+
|
|
795
|
+
##### `platform`<sup>Required</sup> <a name="platform" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.platform"></a>
|
|
796
|
+
|
|
797
|
+
```typescript
|
|
798
|
+
public readonly platform: string;
|
|
799
|
+
```
|
|
800
|
+
|
|
801
|
+
- *Type:* string
|
|
802
|
+
|
|
803
|
+
---
|
|
804
|
+
|
|
805
|
+
##### `rebuildInterval`<sup>Required</sup> <a name="rebuildInterval" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.rebuildInterval"></a>
|
|
806
|
+
|
|
807
|
+
```typescript
|
|
808
|
+
public readonly rebuildInterval: Duration;
|
|
809
|
+
```
|
|
810
|
+
|
|
811
|
+
- *Type:* aws-cdk-lib.Duration
|
|
812
|
+
|
|
813
|
+
---
|
|
814
|
+
|
|
815
|
+
##### `repository`<sup>Required</sup> <a name="repository" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.repository"></a>
|
|
816
|
+
|
|
817
|
+
```typescript
|
|
818
|
+
public readonly repository: IRepository;
|
|
819
|
+
```
|
|
820
|
+
|
|
821
|
+
- *Type:* aws-cdk-lib.aws_ecr.IRepository
|
|
822
|
+
|
|
823
|
+
---
|
|
824
|
+
|
|
825
|
+
##### `runnerVersion`<sup>Required</sup> <a name="runnerVersion" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.runnerVersion"></a>
|
|
826
|
+
|
|
827
|
+
```typescript
|
|
828
|
+
public readonly runnerVersion: RunnerVersion;
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerVersion">RunnerVersion</a>
|
|
832
|
+
|
|
833
|
+
---
|
|
834
|
+
|
|
835
|
+
##### `securityGroupIds`<sup>Optional</sup> <a name="securityGroupIds" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.securityGroupIds"></a>
|
|
836
|
+
|
|
837
|
+
```typescript
|
|
838
|
+
public readonly securityGroupIds: string[];
|
|
839
|
+
```
|
|
840
|
+
|
|
841
|
+
- *Type:* string[]
|
|
842
|
+
|
|
843
|
+
---
|
|
844
|
+
|
|
845
|
+
##### `subnetId`<sup>Optional</sup> <a name="subnetId" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.property.subnetId"></a>
|
|
846
|
+
|
|
847
|
+
```typescript
|
|
848
|
+
public readonly subnetId: string;
|
|
849
|
+
```
|
|
850
|
+
|
|
851
|
+
- *Type:* string
|
|
852
|
+
|
|
853
|
+
---
|
|
854
|
+
|
|
855
|
+
|
|
508
856
|
### FargateRunner <a name="FargateRunner" id="@cloudsnorkel/cdk-github-runners.FargateRunner"></a>
|
|
509
857
|
|
|
510
858
|
- *Implements:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>
|
|
@@ -620,6 +968,7 @@ Any object.
|
|
|
620
968
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.connections">connections</a></code> | <code>aws-cdk-lib.aws_ec2.Connections</code> | The network connections associated with this resource. |
|
|
621
969
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.container">container</a></code> | <code>aws-cdk-lib.aws_ecs.ContainerDefinition</code> | Container definition hosting the runner. |
|
|
622
970
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.grantPrincipal">grantPrincipal</a></code> | <code>aws-cdk-lib.aws_iam.IPrincipal</code> | Grant principal used to add permissions to the runner role. |
|
|
971
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.image">image</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImage">RunnerImage</a></code> | Docker image used to start a new Fargate task. |
|
|
623
972
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.label">label</a></code> | <code>string</code> | Label associated with this provider. |
|
|
624
973
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.spot">spot</a></code> | <code>boolean</code> | Use spot pricing for Fargate tasks. |
|
|
625
974
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.task">task</a></code> | <code>aws-cdk-lib.aws_ecs.FargateTaskDefinition</code> | Fargate task hosting the runner. |
|
|
@@ -700,6 +1049,18 @@ Grant principal used to add permissions to the runner role.
|
|
|
700
1049
|
|
|
701
1050
|
---
|
|
702
1051
|
|
|
1052
|
+
##### `image`<sup>Required</sup> <a name="image" id="@cloudsnorkel/cdk-github-runners.FargateRunner.property.image"></a>
|
|
1053
|
+
|
|
1054
|
+
```typescript
|
|
1055
|
+
public readonly image: RunnerImage;
|
|
1056
|
+
```
|
|
1057
|
+
|
|
1058
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerImage">RunnerImage</a>
|
|
1059
|
+
|
|
1060
|
+
Docker image used to start a new Fargate task.
|
|
1061
|
+
|
|
1062
|
+
---
|
|
1063
|
+
|
|
703
1064
|
##### `label`<sup>Required</sup> <a name="label" id="@cloudsnorkel/cdk-github-runners.FargateRunner.property.label"></a>
|
|
704
1065
|
|
|
705
1066
|
```typescript
|
|
@@ -814,71 +1175,214 @@ It creates a webhook, secrets, and a step function to orchestrate all runs. Secr
|
|
|
814
1175
|
By default, this will create a runner provider of each available type with the defaults. This is good enough for the initial setup stage when you just want to get GitHub integration working.
|
|
815
1176
|
|
|
816
1177
|
```typescript
|
|
817
|
-
new GitHubRunners(
|
|
1178
|
+
new GitHubRunners(this, 'runners');
|
|
1179
|
+
```
|
|
1180
|
+
|
|
1181
|
+
Usually you'd want to configure the runner providers so the runners can run in a certain VPC or have certain permissions.
|
|
1182
|
+
|
|
1183
|
+
```typescript
|
|
1184
|
+
const vpc = ec2.Vpc.fromLookup(this, 'vpc', { vpcId: 'vpc-1234567' });
|
|
1185
|
+
const runnerSg = new ec2.SecurityGroup(this, 'runner security group', { vpc: vpc });
|
|
1186
|
+
const dbSg = ec2.SecurityGroup.fromSecurityGroupId(this, 'database security group', 'sg-1234567');
|
|
1187
|
+
const bucket = new s3.Bucket(this, 'runner bucket');
|
|
1188
|
+
|
|
1189
|
+
// create a custom CodeBuild provider
|
|
1190
|
+
const myProvider = new CodeBuildRunner(
|
|
1191
|
+
this, 'codebuild runner',
|
|
1192
|
+
{
|
|
1193
|
+
label: 'my-codebuild',
|
|
1194
|
+
vpc: vpc,
|
|
1195
|
+
securityGroup: runnerSg,
|
|
1196
|
+
},
|
|
1197
|
+
);
|
|
1198
|
+
// grant some permissions to the provider
|
|
1199
|
+
bucket.grantReadWrite(myProvider);
|
|
1200
|
+
dbSg.connections.allowFrom(runnerSg, ec2.Port.tcp(3306), 'allow runners to connect to MySQL database');
|
|
1201
|
+
|
|
1202
|
+
// create the runner infrastructure
|
|
1203
|
+
new GitHubRunners(
|
|
1204
|
+
this,
|
|
1205
|
+
'runners',
|
|
1206
|
+
{
|
|
1207
|
+
providers: [myProvider],
|
|
1208
|
+
}
|
|
1209
|
+
);
|
|
1210
|
+
```
|
|
1211
|
+
|
|
1212
|
+
#### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.Initializer"></a>
|
|
1213
|
+
|
|
1214
|
+
```typescript
|
|
1215
|
+
import { GitHubRunners } from '@cloudsnorkel/cdk-github-runners'
|
|
1216
|
+
|
|
1217
|
+
new GitHubRunners(scope: Construct, id: string, props?: GitHubRunnersProps)
|
|
1218
|
+
```
|
|
1219
|
+
|
|
1220
|
+
| **Name** | **Type** | **Description** |
|
|
1221
|
+
| --- | --- | --- |
|
|
1222
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
|
|
1223
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
|
|
1224
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.Initializer.parameter.props">props</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps">GitHubRunnersProps</a></code> | *No description.* |
|
|
1225
|
+
|
|
1226
|
+
---
|
|
1227
|
+
|
|
1228
|
+
##### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.Initializer.parameter.scope"></a>
|
|
1229
|
+
|
|
1230
|
+
- *Type:* constructs.Construct
|
|
1231
|
+
|
|
1232
|
+
---
|
|
1233
|
+
|
|
1234
|
+
##### `id`<sup>Required</sup> <a name="id" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.Initializer.parameter.id"></a>
|
|
1235
|
+
|
|
1236
|
+
- *Type:* string
|
|
1237
|
+
|
|
1238
|
+
---
|
|
1239
|
+
|
|
1240
|
+
##### `props`<sup>Optional</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.Initializer.parameter.props"></a>
|
|
1241
|
+
|
|
1242
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps">GitHubRunnersProps</a>
|
|
1243
|
+
|
|
1244
|
+
---
|
|
1245
|
+
|
|
1246
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
1247
|
+
|
|
1248
|
+
| **Name** | **Description** |
|
|
1249
|
+
| --- | --- |
|
|
1250
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
1251
|
+
|
|
1252
|
+
---
|
|
1253
|
+
|
|
1254
|
+
##### `toString` <a name="toString" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.toString"></a>
|
|
1255
|
+
|
|
1256
|
+
```typescript
|
|
1257
|
+
public toString(): string
|
|
1258
|
+
```
|
|
1259
|
+
|
|
1260
|
+
Returns a string representation of this construct.
|
|
1261
|
+
|
|
1262
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
1263
|
+
|
|
1264
|
+
| **Name** | **Description** |
|
|
1265
|
+
| --- | --- |
|
|
1266
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
1267
|
+
|
|
1268
|
+
---
|
|
1269
|
+
|
|
1270
|
+
##### ~~`isConstruct`~~ <a name="isConstruct" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.isConstruct"></a>
|
|
1271
|
+
|
|
1272
|
+
```typescript
|
|
1273
|
+
import { GitHubRunners } from '@cloudsnorkel/cdk-github-runners'
|
|
1274
|
+
|
|
1275
|
+
GitHubRunners.isConstruct(x: any)
|
|
818
1276
|
```
|
|
819
1277
|
|
|
820
|
-
|
|
1278
|
+
Checks if `x` is a construct.
|
|
1279
|
+
|
|
1280
|
+
###### `x`<sup>Required</sup> <a name="x" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.isConstruct.parameter.x"></a>
|
|
1281
|
+
|
|
1282
|
+
- *Type:* any
|
|
1283
|
+
|
|
1284
|
+
Any object.
|
|
1285
|
+
|
|
1286
|
+
---
|
|
1287
|
+
|
|
1288
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
1289
|
+
|
|
1290
|
+
| **Name** | **Type** | **Description** |
|
|
1291
|
+
| --- | --- | --- |
|
|
1292
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
1293
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.property.providers">providers</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>[]</code> | Configured runner providers. |
|
|
1294
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.property.secrets">secrets</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Secrets">Secrets</a></code> | Secrets for GitHub communication including webhook secret and runner authentication. |
|
|
1295
|
+
|
|
1296
|
+
---
|
|
1297
|
+
|
|
1298
|
+
##### `node`<sup>Required</sup> <a name="node" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.property.node"></a>
|
|
1299
|
+
|
|
1300
|
+
```typescript
|
|
1301
|
+
public readonly node: Node;
|
|
1302
|
+
```
|
|
1303
|
+
|
|
1304
|
+
- *Type:* constructs.Node
|
|
1305
|
+
|
|
1306
|
+
The tree node.
|
|
1307
|
+
|
|
1308
|
+
---
|
|
1309
|
+
|
|
1310
|
+
##### `providers`<sup>Required</sup> <a name="providers" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.property.providers"></a>
|
|
1311
|
+
|
|
1312
|
+
```typescript
|
|
1313
|
+
public readonly providers: IRunnerProvider[];
|
|
1314
|
+
```
|
|
1315
|
+
|
|
1316
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>[]
|
|
1317
|
+
|
|
1318
|
+
Configured runner providers.
|
|
1319
|
+
|
|
1320
|
+
---
|
|
1321
|
+
|
|
1322
|
+
##### `secrets`<sup>Required</sup> <a name="secrets" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.property.secrets"></a>
|
|
1323
|
+
|
|
1324
|
+
```typescript
|
|
1325
|
+
public readonly secrets: Secrets;
|
|
1326
|
+
```
|
|
1327
|
+
|
|
1328
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Secrets">Secrets</a>
|
|
1329
|
+
|
|
1330
|
+
Secrets for GitHub communication including webhook secret and runner authentication.
|
|
1331
|
+
|
|
1332
|
+
---
|
|
1333
|
+
|
|
1334
|
+
|
|
1335
|
+
### ImageBuilderComponent <a name="ImageBuilderComponent" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent"></a>
|
|
821
1336
|
|
|
822
|
-
|
|
823
|
-
const vpc = ec2.Vpc.fromLookup(stack, 'vpc', { vpcId: 'vpc-1234567' });
|
|
824
|
-
const runnerSg = new ec2.SecurityGroup(stack, 'runner security group', { vpc: vpc });
|
|
825
|
-
const dbSg = ec2.SecurityGroup.fromSecurityGroupId(stack, 'database security group', 'sg-1234567');
|
|
826
|
-
const bucket = new s3.Bucket(stack, 'runner bucket');
|
|
1337
|
+
Components are a set of commands to run and optional files to add to an image.
|
|
827
1338
|
|
|
828
|
-
|
|
829
|
-
const myProvider = new CodeBuildRunner(
|
|
830
|
-
stack, 'codebuild runner',
|
|
831
|
-
{
|
|
832
|
-
label: 'my-codebuild',
|
|
833
|
-
vpc: vpc,
|
|
834
|
-
securityGroup: runnerSg,
|
|
835
|
-
},
|
|
836
|
-
);
|
|
837
|
-
// grant some permissions to the provider
|
|
838
|
-
bucket.grantReadWrite(myProvider);
|
|
839
|
-
dbSg.connections.allowFrom(runnerSg, ec2.Port.tcp(3306), 'allow runners to connect to MySQL database');
|
|
1339
|
+
Components are the building blocks of images built by Image Builder.
|
|
840
1340
|
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
1341
|
+
Example:
|
|
1342
|
+
|
|
1343
|
+
```
|
|
1344
|
+
new ImageBuilderComponent(this, 'AWS CLI', {
|
|
1345
|
+
platform: 'Windows',
|
|
1346
|
+
displayName: 'AWS CLI',
|
|
1347
|
+
description: 'Install latest version of AWS CLI',
|
|
1348
|
+
commands: [
|
|
1349
|
+
'$ErrorActionPreference = \'Stop\'',
|
|
1350
|
+
'Start-Process msiexec.exe -Wait -ArgumentList \'/i https://awscli.amazonaws.com/AWSCLIV2.msi /qn\'',
|
|
1351
|
+
],
|
|
1352
|
+
}
|
|
849
1353
|
```
|
|
850
1354
|
|
|
851
|
-
#### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.
|
|
1355
|
+
#### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.Initializer"></a>
|
|
852
1356
|
|
|
853
1357
|
```typescript
|
|
854
|
-
import {
|
|
1358
|
+
import { ImageBuilderComponent } from '@cloudsnorkel/cdk-github-runners'
|
|
855
1359
|
|
|
856
|
-
new
|
|
1360
|
+
new ImageBuilderComponent(scope: Construct, id: string, props: ImageBuilderComponentProperties)
|
|
857
1361
|
```
|
|
858
1362
|
|
|
859
1363
|
| **Name** | **Type** | **Description** |
|
|
860
1364
|
| --- | --- | --- |
|
|
861
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.
|
|
862
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.
|
|
863
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.
|
|
1365
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
|
|
1366
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
|
|
1367
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.Initializer.parameter.props">props</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponentProperties">ImageBuilderComponentProperties</a></code> | *No description.* |
|
|
864
1368
|
|
|
865
1369
|
---
|
|
866
1370
|
|
|
867
|
-
##### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.
|
|
1371
|
+
##### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.Initializer.parameter.scope"></a>
|
|
868
1372
|
|
|
869
1373
|
- *Type:* constructs.Construct
|
|
870
1374
|
|
|
871
1375
|
---
|
|
872
1376
|
|
|
873
|
-
##### `id`<sup>Required</sup> <a name="id" id="@cloudsnorkel/cdk-github-runners.
|
|
1377
|
+
##### `id`<sup>Required</sup> <a name="id" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.Initializer.parameter.id"></a>
|
|
874
1378
|
|
|
875
1379
|
- *Type:* string
|
|
876
1380
|
|
|
877
1381
|
---
|
|
878
1382
|
|
|
879
|
-
##### `props`<sup>
|
|
1383
|
+
##### `props`<sup>Required</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.Initializer.parameter.props"></a>
|
|
880
1384
|
|
|
881
|
-
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.
|
|
1385
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponentProperties">ImageBuilderComponentProperties</a>
|
|
882
1386
|
|
|
883
1387
|
---
|
|
884
1388
|
|
|
@@ -886,11 +1390,13 @@ new GitHubRunners(scope: Construct, id: string, props?: GitHubRunnersProps)
|
|
|
886
1390
|
|
|
887
1391
|
| **Name** | **Description** |
|
|
888
1392
|
| --- | --- |
|
|
889
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.
|
|
1393
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
1394
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.applyRemovalPolicy">applyRemovalPolicy</a></code> | Apply the given removal policy to this resource. |
|
|
1395
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.grantAssetsRead">grantAssetsRead</a></code> | Grants read permissions to the principal on the assets buckets. |
|
|
890
1396
|
|
|
891
1397
|
---
|
|
892
1398
|
|
|
893
|
-
##### `toString` <a name="toString" id="@cloudsnorkel/cdk-github-runners.
|
|
1399
|
+
##### `toString` <a name="toString" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.toString"></a>
|
|
894
1400
|
|
|
895
1401
|
```typescript
|
|
896
1402
|
public toString(): string
|
|
@@ -898,25 +1404,62 @@ public toString(): string
|
|
|
898
1404
|
|
|
899
1405
|
Returns a string representation of this construct.
|
|
900
1406
|
|
|
1407
|
+
##### `applyRemovalPolicy` <a name="applyRemovalPolicy" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.applyRemovalPolicy"></a>
|
|
1408
|
+
|
|
1409
|
+
```typescript
|
|
1410
|
+
public applyRemovalPolicy(policy: RemovalPolicy): void
|
|
1411
|
+
```
|
|
1412
|
+
|
|
1413
|
+
Apply the given removal policy to this resource.
|
|
1414
|
+
|
|
1415
|
+
The Removal Policy controls what happens to this resource when it stops
|
|
1416
|
+
being managed by CloudFormation, either because you've removed it from the
|
|
1417
|
+
CDK application or because you've made a change that requires the resource
|
|
1418
|
+
to be replaced.
|
|
1419
|
+
|
|
1420
|
+
The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
|
|
1421
|
+
account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
|
|
1422
|
+
|
|
1423
|
+
###### `policy`<sup>Required</sup> <a name="policy" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.applyRemovalPolicy.parameter.policy"></a>
|
|
1424
|
+
|
|
1425
|
+
- *Type:* aws-cdk-lib.RemovalPolicy
|
|
1426
|
+
|
|
1427
|
+
---
|
|
1428
|
+
|
|
1429
|
+
##### `grantAssetsRead` <a name="grantAssetsRead" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.grantAssetsRead"></a>
|
|
1430
|
+
|
|
1431
|
+
```typescript
|
|
1432
|
+
public grantAssetsRead(grantee: IGrantable): void
|
|
1433
|
+
```
|
|
1434
|
+
|
|
1435
|
+
Grants read permissions to the principal on the assets buckets.
|
|
1436
|
+
|
|
1437
|
+
###### `grantee`<sup>Required</sup> <a name="grantee" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.grantAssetsRead.parameter.grantee"></a>
|
|
1438
|
+
|
|
1439
|
+
- *Type:* aws-cdk-lib.aws_iam.IGrantable
|
|
1440
|
+
|
|
1441
|
+
---
|
|
1442
|
+
|
|
901
1443
|
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
902
1444
|
|
|
903
1445
|
| **Name** | **Description** |
|
|
904
1446
|
| --- | --- |
|
|
905
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.
|
|
1447
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
1448
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.isResource">isResource</a></code> | Check whether the given construct is a Resource. |
|
|
906
1449
|
|
|
907
1450
|
---
|
|
908
1451
|
|
|
909
|
-
##### ~~`isConstruct`~~ <a name="isConstruct" id="@cloudsnorkel/cdk-github-runners.
|
|
1452
|
+
##### ~~`isConstruct`~~ <a name="isConstruct" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.isConstruct"></a>
|
|
910
1453
|
|
|
911
1454
|
```typescript
|
|
912
|
-
import {
|
|
1455
|
+
import { ImageBuilderComponent } from '@cloudsnorkel/cdk-github-runners'
|
|
913
1456
|
|
|
914
|
-
|
|
1457
|
+
ImageBuilderComponent.isConstruct(x: any)
|
|
915
1458
|
```
|
|
916
1459
|
|
|
917
1460
|
Checks if `x` is a construct.
|
|
918
1461
|
|
|
919
|
-
###### `x`<sup>Required</sup> <a name="x" id="@cloudsnorkel/cdk-github-runners.
|
|
1462
|
+
###### `x`<sup>Required</sup> <a name="x" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.isConstruct.parameter.x"></a>
|
|
920
1463
|
|
|
921
1464
|
- *Type:* any
|
|
922
1465
|
|
|
@@ -924,17 +1467,35 @@ Any object.
|
|
|
924
1467
|
|
|
925
1468
|
---
|
|
926
1469
|
|
|
1470
|
+
##### `isResource` <a name="isResource" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.isResource"></a>
|
|
1471
|
+
|
|
1472
|
+
```typescript
|
|
1473
|
+
import { ImageBuilderComponent } from '@cloudsnorkel/cdk-github-runners'
|
|
1474
|
+
|
|
1475
|
+
ImageBuilderComponent.isResource(construct: IConstruct)
|
|
1476
|
+
```
|
|
1477
|
+
|
|
1478
|
+
Check whether the given construct is a Resource.
|
|
1479
|
+
|
|
1480
|
+
###### `construct`<sup>Required</sup> <a name="construct" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.isResource.parameter.construct"></a>
|
|
1481
|
+
|
|
1482
|
+
- *Type:* constructs.IConstruct
|
|
1483
|
+
|
|
1484
|
+
---
|
|
1485
|
+
|
|
927
1486
|
#### Properties <a name="Properties" id="Properties"></a>
|
|
928
1487
|
|
|
929
1488
|
| **Name** | **Type** | **Description** |
|
|
930
1489
|
| --- | --- | --- |
|
|
931
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.
|
|
932
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.
|
|
933
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.
|
|
1490
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
1491
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.property.env">env</a></code> | <code>aws-cdk-lib.ResourceEnvironment</code> | The environment this resource belongs to. |
|
|
1492
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.property.stack">stack</a></code> | <code>aws-cdk-lib.Stack</code> | The stack in which this resource is defined. |
|
|
1493
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.property.arn">arn</a></code> | <code>string</code> | Component ARN. |
|
|
1494
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.property.platform">platform</a></code> | <code>string</code> | Supported platform for the component. |
|
|
934
1495
|
|
|
935
1496
|
---
|
|
936
1497
|
|
|
937
|
-
##### `node`<sup>Required</sup> <a name="node" id="@cloudsnorkel/cdk-github-runners.
|
|
1498
|
+
##### `node`<sup>Required</sup> <a name="node" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.property.node"></a>
|
|
938
1499
|
|
|
939
1500
|
```typescript
|
|
940
1501
|
public readonly node: Node;
|
|
@@ -946,27 +1507,58 @@ The tree node.
|
|
|
946
1507
|
|
|
947
1508
|
---
|
|
948
1509
|
|
|
949
|
-
##### `
|
|
1510
|
+
##### `env`<sup>Required</sup> <a name="env" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.property.env"></a>
|
|
950
1511
|
|
|
951
1512
|
```typescript
|
|
952
|
-
public readonly
|
|
1513
|
+
public readonly env: ResourceEnvironment;
|
|
953
1514
|
```
|
|
954
1515
|
|
|
955
|
-
- *Type:*
|
|
1516
|
+
- *Type:* aws-cdk-lib.ResourceEnvironment
|
|
956
1517
|
|
|
957
|
-
|
|
1518
|
+
The environment this resource belongs to.
|
|
1519
|
+
|
|
1520
|
+
For resources that are created and managed by the CDK
|
|
1521
|
+
(generally, those created by creating new class instances like Role, Bucket, etc.),
|
|
1522
|
+
this is always the same as the environment of the stack they belong to;
|
|
1523
|
+
however, for imported resources
|
|
1524
|
+
(those obtained from static methods like fromRoleArn, fromBucketName, etc.),
|
|
1525
|
+
that might be different than the stack they were imported into.
|
|
958
1526
|
|
|
959
1527
|
---
|
|
960
1528
|
|
|
961
|
-
##### `
|
|
1529
|
+
##### `stack`<sup>Required</sup> <a name="stack" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.property.stack"></a>
|
|
962
1530
|
|
|
963
1531
|
```typescript
|
|
964
|
-
public readonly
|
|
1532
|
+
public readonly stack: Stack;
|
|
965
1533
|
```
|
|
966
1534
|
|
|
967
|
-
- *Type:*
|
|
1535
|
+
- *Type:* aws-cdk-lib.Stack
|
|
968
1536
|
|
|
969
|
-
|
|
1537
|
+
The stack in which this resource is defined.
|
|
1538
|
+
|
|
1539
|
+
---
|
|
1540
|
+
|
|
1541
|
+
##### `arn`<sup>Required</sup> <a name="arn" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.property.arn"></a>
|
|
1542
|
+
|
|
1543
|
+
```typescript
|
|
1544
|
+
public readonly arn: string;
|
|
1545
|
+
```
|
|
1546
|
+
|
|
1547
|
+
- *Type:* string
|
|
1548
|
+
|
|
1549
|
+
Component ARN.
|
|
1550
|
+
|
|
1551
|
+
---
|
|
1552
|
+
|
|
1553
|
+
##### `platform`<sup>Required</sup> <a name="platform" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.property.platform"></a>
|
|
1554
|
+
|
|
1555
|
+
```typescript
|
|
1556
|
+
public readonly platform: string;
|
|
1557
|
+
```
|
|
1558
|
+
|
|
1559
|
+
- *Type:* string
|
|
1560
|
+
|
|
1561
|
+
Supported platform for the component.
|
|
970
1562
|
|
|
971
1563
|
---
|
|
972
1564
|
|
|
@@ -1084,6 +1676,7 @@ Any object.
|
|
|
1084
1676
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.property.connections">connections</a></code> | <code>aws-cdk-lib.aws_ec2.Connections</code> | The network connections associated with this resource. |
|
|
1085
1677
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.property.function">function</a></code> | <code>aws-cdk-lib.aws_lambda.Function</code> | The function hosting the GitHub runner. |
|
|
1086
1678
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.property.grantPrincipal">grantPrincipal</a></code> | <code>aws-cdk-lib.aws_iam.IPrincipal</code> | Grant principal used to add permissions to the runner role. |
|
|
1679
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.property.image">image</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImage">RunnerImage</a></code> | Docker image used to start Lambda function. |
|
|
1087
1680
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.property.label">label</a></code> | <code>string</code> | Label associated with this provider. |
|
|
1088
1681
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup</code> | Security group attached to the function. |
|
|
1089
1682
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | VPC used for hosting the function. |
|
|
@@ -1138,6 +1731,18 @@ Grant principal used to add permissions to the runner role.
|
|
|
1138
1731
|
|
|
1139
1732
|
---
|
|
1140
1733
|
|
|
1734
|
+
##### `image`<sup>Required</sup> <a name="image" id="@cloudsnorkel/cdk-github-runners.LambdaRunner.property.image"></a>
|
|
1735
|
+
|
|
1736
|
+
```typescript
|
|
1737
|
+
public readonly image: RunnerImage;
|
|
1738
|
+
```
|
|
1739
|
+
|
|
1740
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerImage">RunnerImage</a>
|
|
1741
|
+
|
|
1742
|
+
Docker image used to start Lambda function.
|
|
1743
|
+
|
|
1744
|
+
---
|
|
1745
|
+
|
|
1141
1746
|
##### `label`<sup>Required</sup> <a name="label" id="@cloudsnorkel/cdk-github-runners.LambdaRunner.property.label"></a>
|
|
1142
1747
|
|
|
1143
1748
|
```typescript
|
|
@@ -1403,7 +2008,7 @@ const codeBuildImageBuilderProps: CodeBuildImageBuilderProps = { ... }
|
|
|
1403
2008
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup</code> | Security Group to assign to this instance. |
|
|
1404
2009
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.subnetSelection">subnetSelection</a></code> | <code>aws-cdk-lib.aws_ec2.SubnetSelection</code> | Where to place the network interfaces within the VPC. |
|
|
1405
2010
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.timeout">timeout</a></code> | <code>aws-cdk-lib.Duration</code> | The number of minutes after which AWS CodeBuild stops the build if it's not complete. |
|
|
1406
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | VPC to
|
|
2011
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | VPC to build the image in. |
|
|
1407
2012
|
|
|
1408
2013
|
---
|
|
1409
2014
|
|
|
@@ -1577,7 +2182,7 @@ public readonly vpc: IVpc;
|
|
|
1577
2182
|
- *Type:* aws-cdk-lib.aws_ec2.IVpc
|
|
1578
2183
|
- *Default:* no VPC
|
|
1579
2184
|
|
|
1580
|
-
VPC to
|
|
2185
|
+
VPC to build the image in.
|
|
1581
2186
|
|
|
1582
2187
|
---
|
|
1583
2188
|
|
|
@@ -1688,34 +2293,205 @@ public readonly subnetSelection: SubnetSelection;
|
|
|
1688
2293
|
- *Type:* aws-cdk-lib.aws_ec2.SubnetSelection
|
|
1689
2294
|
- *Default:* no subnet
|
|
1690
2295
|
|
|
1691
|
-
Where to place the network interfaces within the VPC.
|
|
2296
|
+
Where to place the network interfaces within the VPC.
|
|
2297
|
+
|
|
2298
|
+
---
|
|
2299
|
+
|
|
2300
|
+
##### `timeout`<sup>Optional</sup> <a name="timeout" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProps.property.timeout"></a>
|
|
2301
|
+
|
|
2302
|
+
```typescript
|
|
2303
|
+
public readonly timeout: Duration;
|
|
2304
|
+
```
|
|
2305
|
+
|
|
2306
|
+
- *Type:* aws-cdk-lib.Duration
|
|
2307
|
+
- *Default:* Duration.hours(1)
|
|
2308
|
+
|
|
2309
|
+
The number of minutes after which AWS CodeBuild stops the build if it's not complete.
|
|
2310
|
+
|
|
2311
|
+
For valid values, see the timeoutInMinutes field in the AWS
|
|
2312
|
+
CodeBuild User Guide.
|
|
2313
|
+
|
|
2314
|
+
---
|
|
2315
|
+
|
|
2316
|
+
##### `vpc`<sup>Optional</sup> <a name="vpc" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProps.property.vpc"></a>
|
|
2317
|
+
|
|
2318
|
+
```typescript
|
|
2319
|
+
public readonly vpc: IVpc;
|
|
2320
|
+
```
|
|
2321
|
+
|
|
2322
|
+
- *Type:* aws-cdk-lib.aws_ec2.IVpc
|
|
2323
|
+
- *Default:* no VPC
|
|
2324
|
+
|
|
2325
|
+
VPC to launch the runners in.
|
|
2326
|
+
|
|
2327
|
+
---
|
|
2328
|
+
|
|
2329
|
+
### ContainerImageBuilderProps <a name="ContainerImageBuilderProps" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps"></a>
|
|
2330
|
+
|
|
2331
|
+
Properties for ContainerImageBuilder construct.
|
|
2332
|
+
|
|
2333
|
+
#### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.Initializer"></a>
|
|
2334
|
+
|
|
2335
|
+
```typescript
|
|
2336
|
+
import { ContainerImageBuilderProps } from '@cloudsnorkel/cdk-github-runners'
|
|
2337
|
+
|
|
2338
|
+
const containerImageBuilderProps: ContainerImageBuilderProps = { ... }
|
|
2339
|
+
```
|
|
2340
|
+
|
|
2341
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
2342
|
+
|
|
2343
|
+
| **Name** | **Type** | **Description** |
|
|
2344
|
+
| --- | --- | --- |
|
|
2345
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.architecture">architecture</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a></code> | Image architecture. |
|
|
2346
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.instanceType">instanceType</a></code> | <code>aws-cdk-lib.aws_ec2.InstanceType</code> | The instance type used to build the image. |
|
|
2347
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.logRemovalPolicy">logRemovalPolicy</a></code> | <code>aws-cdk-lib.RemovalPolicy</code> | Removal policy for logs of image builds. |
|
|
2348
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.logRetention">logRetention</a></code> | <code>aws-cdk-lib.aws_logs.RetentionDays</code> | The number of days log events are kept in CloudWatch Logs. |
|
|
2349
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.os">os</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a></code> | Image OS. |
|
|
2350
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.rebuildInterval">rebuildInterval</a></code> | <code>aws-cdk-lib.Duration</code> | Schedule the image to be rebuilt every given interval. |
|
|
2351
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.runnerVersion">runnerVersion</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerVersion">RunnerVersion</a></code> | Version of GitHub Runners to install. |
|
|
2352
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup</code> | Security Group to assign to this instance. |
|
|
2353
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.subnetSelection">subnetSelection</a></code> | <code>aws-cdk-lib.aws_ec2.SubnetSelection</code> | Where to place the network interfaces within the VPC. |
|
|
2354
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | VPC to launch the runners in. |
|
|
2355
|
+
|
|
2356
|
+
---
|
|
2357
|
+
|
|
2358
|
+
##### `architecture`<sup>Optional</sup> <a name="architecture" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.architecture"></a>
|
|
2359
|
+
|
|
2360
|
+
```typescript
|
|
2361
|
+
public readonly architecture: Architecture;
|
|
2362
|
+
```
|
|
2363
|
+
|
|
2364
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a>
|
|
2365
|
+
- *Default:* Architecture.X86_64
|
|
2366
|
+
|
|
2367
|
+
Image architecture.
|
|
2368
|
+
|
|
2369
|
+
---
|
|
2370
|
+
|
|
2371
|
+
##### `instanceType`<sup>Optional</sup> <a name="instanceType" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.instanceType"></a>
|
|
2372
|
+
|
|
2373
|
+
```typescript
|
|
2374
|
+
public readonly instanceType: InstanceType;
|
|
2375
|
+
```
|
|
2376
|
+
|
|
2377
|
+
- *Type:* aws-cdk-lib.aws_ec2.InstanceType
|
|
2378
|
+
- *Default:* m5.large
|
|
2379
|
+
|
|
2380
|
+
The instance type used to build the image.
|
|
2381
|
+
|
|
2382
|
+
---
|
|
2383
|
+
|
|
2384
|
+
##### `logRemovalPolicy`<sup>Optional</sup> <a name="logRemovalPolicy" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.logRemovalPolicy"></a>
|
|
2385
|
+
|
|
2386
|
+
```typescript
|
|
2387
|
+
public readonly logRemovalPolicy: RemovalPolicy;
|
|
2388
|
+
```
|
|
2389
|
+
|
|
2390
|
+
- *Type:* aws-cdk-lib.RemovalPolicy
|
|
2391
|
+
- *Default:* RemovalPolicy.DESTROY
|
|
2392
|
+
|
|
2393
|
+
Removal policy for logs of image builds.
|
|
2394
|
+
|
|
2395
|
+
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.
|
|
2396
|
+
|
|
2397
|
+
We try to not leave anything behind when removed. But sometimes a log staying behind is useful.
|
|
2398
|
+
|
|
2399
|
+
---
|
|
2400
|
+
|
|
2401
|
+
##### `logRetention`<sup>Optional</sup> <a name="logRetention" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.logRetention"></a>
|
|
2402
|
+
|
|
2403
|
+
```typescript
|
|
2404
|
+
public readonly logRetention: RetentionDays;
|
|
2405
|
+
```
|
|
2406
|
+
|
|
2407
|
+
- *Type:* aws-cdk-lib.aws_logs.RetentionDays
|
|
2408
|
+
- *Default:* logs.RetentionDays.ONE_MONTH
|
|
2409
|
+
|
|
2410
|
+
The number of days log events are kept in CloudWatch Logs.
|
|
2411
|
+
|
|
2412
|
+
When updating
|
|
2413
|
+
this property, unsetting it doesn't remove the log retention policy. To
|
|
2414
|
+
remove the retention policy, set the value to `INFINITE`.
|
|
2415
|
+
|
|
2416
|
+
---
|
|
2417
|
+
|
|
2418
|
+
##### `os`<sup>Optional</sup> <a name="os" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.os"></a>
|
|
2419
|
+
|
|
2420
|
+
```typescript
|
|
2421
|
+
public readonly os: Os;
|
|
2422
|
+
```
|
|
2423
|
+
|
|
2424
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a>
|
|
2425
|
+
- *Default:* OS.LINUX
|
|
2426
|
+
|
|
2427
|
+
Image OS.
|
|
2428
|
+
|
|
2429
|
+
---
|
|
2430
|
+
|
|
2431
|
+
##### `rebuildInterval`<sup>Optional</sup> <a name="rebuildInterval" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.rebuildInterval"></a>
|
|
2432
|
+
|
|
2433
|
+
```typescript
|
|
2434
|
+
public readonly rebuildInterval: Duration;
|
|
2435
|
+
```
|
|
2436
|
+
|
|
2437
|
+
- *Type:* aws-cdk-lib.Duration
|
|
2438
|
+
- *Default:* Duration.days(7)
|
|
2439
|
+
|
|
2440
|
+
Schedule the image to be rebuilt every given interval.
|
|
2441
|
+
|
|
2442
|
+
Useful for keeping the image up-do-date with the latest GitHub runner version and latest OS updates.
|
|
2443
|
+
|
|
2444
|
+
Set to zero to disable.
|
|
2445
|
+
|
|
2446
|
+
---
|
|
2447
|
+
|
|
2448
|
+
##### `runnerVersion`<sup>Optional</sup> <a name="runnerVersion" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.runnerVersion"></a>
|
|
2449
|
+
|
|
2450
|
+
```typescript
|
|
2451
|
+
public readonly runnerVersion: RunnerVersion;
|
|
2452
|
+
```
|
|
2453
|
+
|
|
2454
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerVersion">RunnerVersion</a>
|
|
2455
|
+
- *Default:* latest version available
|
|
2456
|
+
|
|
2457
|
+
Version of GitHub Runners to install.
|
|
2458
|
+
|
|
2459
|
+
---
|
|
2460
|
+
|
|
2461
|
+
##### `securityGroup`<sup>Optional</sup> <a name="securityGroup" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.securityGroup"></a>
|
|
2462
|
+
|
|
2463
|
+
```typescript
|
|
2464
|
+
public readonly securityGroup: ISecurityGroup;
|
|
2465
|
+
```
|
|
2466
|
+
|
|
2467
|
+
- *Type:* aws-cdk-lib.aws_ec2.ISecurityGroup
|
|
2468
|
+
- *Default:* default account security group
|
|
2469
|
+
|
|
2470
|
+
Security Group to assign to this instance.
|
|
1692
2471
|
|
|
1693
2472
|
---
|
|
1694
2473
|
|
|
1695
|
-
##### `
|
|
2474
|
+
##### `subnetSelection`<sup>Optional</sup> <a name="subnetSelection" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.subnetSelection"></a>
|
|
1696
2475
|
|
|
1697
2476
|
```typescript
|
|
1698
|
-
public readonly
|
|
2477
|
+
public readonly subnetSelection: SubnetSelection;
|
|
1699
2478
|
```
|
|
1700
2479
|
|
|
1701
|
-
- *Type:* aws-cdk-lib.
|
|
1702
|
-
- *Default:*
|
|
1703
|
-
|
|
1704
|
-
The number of minutes after which AWS CodeBuild stops the build if it's not complete.
|
|
2480
|
+
- *Type:* aws-cdk-lib.aws_ec2.SubnetSelection
|
|
2481
|
+
- *Default:* default VPC subnet
|
|
1705
2482
|
|
|
1706
|
-
|
|
1707
|
-
CodeBuild User Guide.
|
|
2483
|
+
Where to place the network interfaces within the VPC.
|
|
1708
2484
|
|
|
1709
2485
|
---
|
|
1710
2486
|
|
|
1711
|
-
##### `vpc`<sup>Optional</sup> <a name="vpc" id="@cloudsnorkel/cdk-github-runners.
|
|
2487
|
+
##### `vpc`<sup>Optional</sup> <a name="vpc" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilderProps.property.vpc"></a>
|
|
1712
2488
|
|
|
1713
2489
|
```typescript
|
|
1714
2490
|
public readonly vpc: IVpc;
|
|
1715
2491
|
```
|
|
1716
2492
|
|
|
1717
2493
|
- *Type:* aws-cdk-lib.aws_ec2.IVpc
|
|
1718
|
-
- *Default:*
|
|
2494
|
+
- *Default:* default account VPC
|
|
1719
2495
|
|
|
1720
2496
|
VPC to launch the runners in.
|
|
1721
2497
|
|
|
@@ -1962,7 +2738,61 @@ const gitHubRunnersProps: GitHubRunnersProps = { ... }
|
|
|
1962
2738
|
|
|
1963
2739
|
| **Name** | **Type** | **Description** |
|
|
1964
2740
|
| --- | --- | --- |
|
|
2741
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.allowPublicSubnet">allowPublicSubnet</a></code> | <code>boolean</code> | Allow management functions to run in public subnets. |
|
|
2742
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.extraCertificates">extraCertificates</a></code> | <code>string</code> | Path to a directory containing a file named certs.pem containing any additional certificates required to trust GitHub Enterprise Server. Use this when GitHub Enterprise Server certificates are self-signed. |
|
|
1965
2743
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.providers">providers</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>[]</code> | List of runner providers to use. |
|
|
2744
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup</code> | Security group attached to all management functions. |
|
|
2745
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | VPC used for all management functions. |
|
|
2746
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.vpcSubnets">vpcSubnets</a></code> | <code>aws-cdk-lib.aws_ec2.SubnetSelection</code> | VPC subnets used for all management functions. |
|
|
2747
|
+
|
|
2748
|
+
---
|
|
2749
|
+
|
|
2750
|
+
##### `allowPublicSubnet`<sup>Optional</sup> <a name="allowPublicSubnet" id="@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.allowPublicSubnet"></a>
|
|
2751
|
+
|
|
2752
|
+
```typescript
|
|
2753
|
+
public readonly allowPublicSubnet: boolean;
|
|
2754
|
+
```
|
|
2755
|
+
|
|
2756
|
+
- *Type:* boolean
|
|
2757
|
+
- *Default:* false
|
|
2758
|
+
|
|
2759
|
+
Allow management functions to run in public subnets.
|
|
2760
|
+
|
|
2761
|
+
Lambda Functions in a public subnet can NOT access the internet.
|
|
2762
|
+
|
|
2763
|
+
---
|
|
2764
|
+
|
|
2765
|
+
##### `extraCertificates`<sup>Optional</sup> <a name="extraCertificates" id="@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.extraCertificates"></a>
|
|
2766
|
+
|
|
2767
|
+
```typescript
|
|
2768
|
+
public readonly extraCertificates: string;
|
|
2769
|
+
```
|
|
2770
|
+
|
|
2771
|
+
- *Type:* string
|
|
2772
|
+
|
|
2773
|
+
Path to a directory containing a file named certs.pem containing any additional certificates required to trust GitHub Enterprise Server. Use this when GitHub Enterprise Server certificates are self-signed.
|
|
2774
|
+
|
|
2775
|
+
You may also want to use custom images for your runner providers that contain the same certificates. See {@link CodeBuildImageBuilder.addCertificates}.
|
|
2776
|
+
|
|
2777
|
+
```typescript
|
|
2778
|
+
const imageBuilder = new CodeBuildImageBuilder(this, 'Image Builder with Certs', {
|
|
2779
|
+
dockerfilePath: CodeBuildRunner.LINUX_X64_DOCKERFILE_PATH,
|
|
2780
|
+
});
|
|
2781
|
+
imageBuilder.addExtraCertificates('path-to-my-extra-certs-folder');
|
|
2782
|
+
|
|
2783
|
+
const provider = new CodeBuildRunner(this, 'CodeBuild', {
|
|
2784
|
+
imageBuilder: imageBuilder,
|
|
2785
|
+
});
|
|
2786
|
+
|
|
2787
|
+
new GitHubRunners(
|
|
2788
|
+
this,
|
|
2789
|
+
'runners',
|
|
2790
|
+
{
|
|
2791
|
+
providers: [provider],
|
|
2792
|
+
extraCertificates: 'path-to-my-extra-certs-folder',
|
|
2793
|
+
}
|
|
2794
|
+
);
|
|
2795
|
+
```
|
|
1966
2796
|
|
|
1967
2797
|
---
|
|
1968
2798
|
|
|
@@ -1981,6 +2811,181 @@ At least one provider is required. Provider will be selected when its label matc
|
|
|
1981
2811
|
|
|
1982
2812
|
---
|
|
1983
2813
|
|
|
2814
|
+
##### `securityGroup`<sup>Optional</sup> <a name="securityGroup" id="@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.securityGroup"></a>
|
|
2815
|
+
|
|
2816
|
+
```typescript
|
|
2817
|
+
public readonly securityGroup: ISecurityGroup;
|
|
2818
|
+
```
|
|
2819
|
+
|
|
2820
|
+
- *Type:* aws-cdk-lib.aws_ec2.ISecurityGroup
|
|
2821
|
+
|
|
2822
|
+
Security group attached to all management functions.
|
|
2823
|
+
|
|
2824
|
+
Use this with to provide access to GitHub Enterprise Server hosted inside a VPC.
|
|
2825
|
+
|
|
2826
|
+
---
|
|
2827
|
+
|
|
2828
|
+
##### `vpc`<sup>Optional</sup> <a name="vpc" id="@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.vpc"></a>
|
|
2829
|
+
|
|
2830
|
+
```typescript
|
|
2831
|
+
public readonly vpc: IVpc;
|
|
2832
|
+
```
|
|
2833
|
+
|
|
2834
|
+
- *Type:* aws-cdk-lib.aws_ec2.IVpc
|
|
2835
|
+
|
|
2836
|
+
VPC used for all management functions.
|
|
2837
|
+
|
|
2838
|
+
Use this with GitHub Enterprise Server hosted that's inaccessible from outside the VPC.
|
|
2839
|
+
|
|
2840
|
+
---
|
|
2841
|
+
|
|
2842
|
+
##### `vpcSubnets`<sup>Optional</sup> <a name="vpcSubnets" id="@cloudsnorkel/cdk-github-runners.GitHubRunnersProps.property.vpcSubnets"></a>
|
|
2843
|
+
|
|
2844
|
+
```typescript
|
|
2845
|
+
public readonly vpcSubnets: SubnetSelection;
|
|
2846
|
+
```
|
|
2847
|
+
|
|
2848
|
+
- *Type:* aws-cdk-lib.aws_ec2.SubnetSelection
|
|
2849
|
+
|
|
2850
|
+
VPC subnets used for all management functions.
|
|
2851
|
+
|
|
2852
|
+
Use this with GitHub Enterprise Server hosted that's inaccessible from outside the VPC.
|
|
2853
|
+
|
|
2854
|
+
---
|
|
2855
|
+
|
|
2856
|
+
### ImageBuilderAsset <a name="ImageBuilderAsset" id="@cloudsnorkel/cdk-github-runners.ImageBuilderAsset"></a>
|
|
2857
|
+
|
|
2858
|
+
An asset including file or directory to place inside the built image.
|
|
2859
|
+
|
|
2860
|
+
#### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.ImageBuilderAsset.Initializer"></a>
|
|
2861
|
+
|
|
2862
|
+
```typescript
|
|
2863
|
+
import { ImageBuilderAsset } from '@cloudsnorkel/cdk-github-runners'
|
|
2864
|
+
|
|
2865
|
+
const imageBuilderAsset: ImageBuilderAsset = { ... }
|
|
2866
|
+
```
|
|
2867
|
+
|
|
2868
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
2869
|
+
|
|
2870
|
+
| **Name** | **Type** | **Description** |
|
|
2871
|
+
| --- | --- | --- |
|
|
2872
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderAsset.property.asset">asset</a></code> | <code>aws-cdk-lib.aws_s3_assets.Asset</code> | Asset to place in the image. |
|
|
2873
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderAsset.property.path">path</a></code> | <code>string</code> | Path to place asset in the image. |
|
|
2874
|
+
|
|
2875
|
+
---
|
|
2876
|
+
|
|
2877
|
+
##### `asset`<sup>Required</sup> <a name="asset" id="@cloudsnorkel/cdk-github-runners.ImageBuilderAsset.property.asset"></a>
|
|
2878
|
+
|
|
2879
|
+
```typescript
|
|
2880
|
+
public readonly asset: Asset;
|
|
2881
|
+
```
|
|
2882
|
+
|
|
2883
|
+
- *Type:* aws-cdk-lib.aws_s3_assets.Asset
|
|
2884
|
+
|
|
2885
|
+
Asset to place in the image.
|
|
2886
|
+
|
|
2887
|
+
---
|
|
2888
|
+
|
|
2889
|
+
##### `path`<sup>Required</sup> <a name="path" id="@cloudsnorkel/cdk-github-runners.ImageBuilderAsset.property.path"></a>
|
|
2890
|
+
|
|
2891
|
+
```typescript
|
|
2892
|
+
public readonly path: string;
|
|
2893
|
+
```
|
|
2894
|
+
|
|
2895
|
+
- *Type:* string
|
|
2896
|
+
|
|
2897
|
+
Path to place asset in the image.
|
|
2898
|
+
|
|
2899
|
+
---
|
|
2900
|
+
|
|
2901
|
+
### ImageBuilderComponentProperties <a name="ImageBuilderComponentProperties" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponentProperties"></a>
|
|
2902
|
+
|
|
2903
|
+
Properties for ImageBuilderComponent construct.
|
|
2904
|
+
|
|
2905
|
+
#### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponentProperties.Initializer"></a>
|
|
2906
|
+
|
|
2907
|
+
```typescript
|
|
2908
|
+
import { ImageBuilderComponentProperties } from '@cloudsnorkel/cdk-github-runners'
|
|
2909
|
+
|
|
2910
|
+
const imageBuilderComponentProperties: ImageBuilderComponentProperties = { ... }
|
|
2911
|
+
```
|
|
2912
|
+
|
|
2913
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
2914
|
+
|
|
2915
|
+
| **Name** | **Type** | **Description** |
|
|
2916
|
+
| --- | --- | --- |
|
|
2917
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponentProperties.property.commands">commands</a></code> | <code>string[]</code> | Shell commands to run when adding this component to the image. |
|
|
2918
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponentProperties.property.description">description</a></code> | <code>string</code> | Component description. |
|
|
2919
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponentProperties.property.displayName">displayName</a></code> | <code>string</code> | Component display name. |
|
|
2920
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponentProperties.property.platform">platform</a></code> | <code>string</code> | Component platform. |
|
|
2921
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponentProperties.property.assets">assets</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderAsset">ImageBuilderAsset</a>[]</code> | Optional assets to add to the built image. |
|
|
2922
|
+
|
|
2923
|
+
---
|
|
2924
|
+
|
|
2925
|
+
##### `commands`<sup>Required</sup> <a name="commands" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponentProperties.property.commands"></a>
|
|
2926
|
+
|
|
2927
|
+
```typescript
|
|
2928
|
+
public readonly commands: string[];
|
|
2929
|
+
```
|
|
2930
|
+
|
|
2931
|
+
- *Type:* string[]
|
|
2932
|
+
|
|
2933
|
+
Shell commands to run when adding this component to the image.
|
|
2934
|
+
|
|
2935
|
+
On Linux, these are bash commands. On Windows, there are PowerShell commands.
|
|
2936
|
+
|
|
2937
|
+
---
|
|
2938
|
+
|
|
2939
|
+
##### `description`<sup>Required</sup> <a name="description" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponentProperties.property.description"></a>
|
|
2940
|
+
|
|
2941
|
+
```typescript
|
|
2942
|
+
public readonly description: string;
|
|
2943
|
+
```
|
|
2944
|
+
|
|
2945
|
+
- *Type:* string
|
|
2946
|
+
|
|
2947
|
+
Component description.
|
|
2948
|
+
|
|
2949
|
+
---
|
|
2950
|
+
|
|
2951
|
+
##### `displayName`<sup>Required</sup> <a name="displayName" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponentProperties.property.displayName"></a>
|
|
2952
|
+
|
|
2953
|
+
```typescript
|
|
2954
|
+
public readonly displayName: string;
|
|
2955
|
+
```
|
|
2956
|
+
|
|
2957
|
+
- *Type:* string
|
|
2958
|
+
|
|
2959
|
+
Component display name.
|
|
2960
|
+
|
|
2961
|
+
---
|
|
2962
|
+
|
|
2963
|
+
##### `platform`<sup>Required</sup> <a name="platform" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponentProperties.property.platform"></a>
|
|
2964
|
+
|
|
2965
|
+
```typescript
|
|
2966
|
+
public readonly platform: string;
|
|
2967
|
+
```
|
|
2968
|
+
|
|
2969
|
+
- *Type:* string
|
|
2970
|
+
|
|
2971
|
+
Component platform.
|
|
2972
|
+
|
|
2973
|
+
Must match the builder platform.
|
|
2974
|
+
|
|
2975
|
+
---
|
|
2976
|
+
|
|
2977
|
+
##### `assets`<sup>Optional</sup> <a name="assets" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponentProperties.property.assets"></a>
|
|
2978
|
+
|
|
2979
|
+
```typescript
|
|
2980
|
+
public readonly assets: ImageBuilderAsset[];
|
|
2981
|
+
```
|
|
2982
|
+
|
|
2983
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderAsset">ImageBuilderAsset</a>[]
|
|
2984
|
+
|
|
2985
|
+
Optional assets to add to the built image.
|
|
2986
|
+
|
|
2987
|
+
---
|
|
2988
|
+
|
|
1984
2989
|
### LambdaRunnerProps <a name="LambdaRunnerProps" id="@cloudsnorkel/cdk-github-runners.LambdaRunnerProps"></a>
|
|
1985
2990
|
|
|
1986
2991
|
#### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.LambdaRunnerProps.Initializer"></a>
|
|
@@ -2154,10 +3159,11 @@ const runnerImage: RunnerImage = { ... }
|
|
|
2154
3159
|
| **Name** | **Type** | **Description** |
|
|
2155
3160
|
| --- | --- | --- |
|
|
2156
3161
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImage.property.architecture">architecture</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a></code> | Architecture of the image. |
|
|
2157
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImage.property.imageDigest">imageDigest</a></code> | <code>string</code> | Image digest for providers that need to know the digest like Lambda. |
|
|
2158
3162
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImage.property.imageRepository">imageRepository</a></code> | <code>aws-cdk-lib.aws_ecr.IRepository</code> | ECR repository containing the image. |
|
|
2159
3163
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImage.property.imageTag">imageTag</a></code> | <code>string</code> | Static image tag where the image will be pushed. |
|
|
2160
3164
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImage.property.os">os</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a></code> | OS type of the image. |
|
|
3165
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImage.property.imageDigest">imageDigest</a></code> | <code>string</code> | Image digest for providers that need to know the digest like Lambda. |
|
|
3166
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImage.property.logGroup">logGroup</a></code> | <code>aws-cdk-lib.aws_logs.LogGroup</code> | Log group where image builds are logged. |
|
|
2161
3167
|
|
|
2162
3168
|
---
|
|
2163
3169
|
|
|
@@ -2173,20 +3179,6 @@ Architecture of the image.
|
|
|
2173
3179
|
|
|
2174
3180
|
---
|
|
2175
3181
|
|
|
2176
|
-
##### `imageDigest`<sup>Required</sup> <a name="imageDigest" id="@cloudsnorkel/cdk-github-runners.RunnerImage.property.imageDigest"></a>
|
|
2177
|
-
|
|
2178
|
-
```typescript
|
|
2179
|
-
public readonly imageDigest: string;
|
|
2180
|
-
```
|
|
2181
|
-
|
|
2182
|
-
- *Type:* string
|
|
2183
|
-
|
|
2184
|
-
Image digest for providers that need to know the digest like Lambda.
|
|
2185
|
-
|
|
2186
|
-
WARNING: the digest might change when the builder automatically rebuilds the image on a schedule. Do not expect for this digest to stay the same between deploys.
|
|
2187
|
-
|
|
2188
|
-
---
|
|
2189
|
-
|
|
2190
3182
|
##### `imageRepository`<sup>Required</sup> <a name="imageRepository" id="@cloudsnorkel/cdk-github-runners.RunnerImage.property.imageRepository"></a>
|
|
2191
3183
|
|
|
2192
3184
|
```typescript
|
|
@@ -2223,6 +3215,34 @@ OS type of the image.
|
|
|
2223
3215
|
|
|
2224
3216
|
---
|
|
2225
3217
|
|
|
3218
|
+
##### `imageDigest`<sup>Optional</sup> <a name="imageDigest" id="@cloudsnorkel/cdk-github-runners.RunnerImage.property.imageDigest"></a>
|
|
3219
|
+
|
|
3220
|
+
```typescript
|
|
3221
|
+
public readonly imageDigest: string;
|
|
3222
|
+
```
|
|
3223
|
+
|
|
3224
|
+
- *Type:* string
|
|
3225
|
+
|
|
3226
|
+
Image digest for providers that need to know the digest like Lambda.
|
|
3227
|
+
|
|
3228
|
+
If the digest is not specified, imageTag must always point to a new tag on update. If not, the build may try to use the old image.
|
|
3229
|
+
|
|
3230
|
+
WARNING: the digest might change when the builder automatically rebuilds the image on a schedule. Do not expect for this digest to stay the same between deploys.
|
|
3231
|
+
|
|
3232
|
+
---
|
|
3233
|
+
|
|
3234
|
+
##### `logGroup`<sup>Optional</sup> <a name="logGroup" id="@cloudsnorkel/cdk-github-runners.RunnerImage.property.logGroup"></a>
|
|
3235
|
+
|
|
3236
|
+
```typescript
|
|
3237
|
+
public readonly logGroup: LogGroup;
|
|
3238
|
+
```
|
|
3239
|
+
|
|
3240
|
+
- *Type:* aws-cdk-lib.aws_logs.LogGroup
|
|
3241
|
+
|
|
3242
|
+
Log group where image builds are logged.
|
|
3243
|
+
|
|
3244
|
+
---
|
|
3245
|
+
|
|
2226
3246
|
### RunnerProviderProps <a name="RunnerProviderProps" id="@cloudsnorkel/cdk-github-runners.RunnerProviderProps"></a>
|
|
2227
3247
|
|
|
2228
3248
|
Common properties for all runner providers.
|
|
@@ -2726,7 +3746,7 @@ image OS.
|
|
|
2726
3746
|
|
|
2727
3747
|
### IImageBuilder <a name="IImageBuilder" id="@cloudsnorkel/cdk-github-runners.IImageBuilder"></a>
|
|
2728
3748
|
|
|
2729
|
-
- *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder">CodeBuildImageBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.IImageBuilder">IImageBuilder</a>
|
|
3749
|
+
- *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder">CodeBuildImageBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder">ContainerImageBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.IImageBuilder">IImageBuilder</a>
|
|
2730
3750
|
|
|
2731
3751
|
Interface for constructs that build an image that can be used in {@link IRunnerProvider}.
|
|
2732
3752
|
|
|
@@ -2755,6 +3775,59 @@ ECR repository containing the image.
|
|
|
2755
3775
|
This method can be called multiple times if the image is bound to multiple providers. Make sure you cache the image when implementing or return an error if this builder doesn't support reusing images.
|
|
2756
3776
|
|
|
2757
3777
|
|
|
3778
|
+
### IRunnerImageStatus <a name="IRunnerImageStatus" id="@cloudsnorkel/cdk-github-runners.IRunnerImageStatus"></a>
|
|
3779
|
+
|
|
3780
|
+
- *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerImageStatus">IRunnerImageStatus</a>
|
|
3781
|
+
|
|
3782
|
+
Interface for runner image status used by status.json.
|
|
3783
|
+
|
|
3784
|
+
|
|
3785
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
3786
|
+
|
|
3787
|
+
| **Name** | **Type** | **Description** |
|
|
3788
|
+
| --- | --- | --- |
|
|
3789
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerImageStatus.property.imageBuilderLogGroup">imageBuilderLogGroup</a></code> | <code>string</code> | Log group name for the image builder where history of image builds can be analyzed. |
|
|
3790
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerImageStatus.property.imageRepository">imageRepository</a></code> | <code>string</code> | Image repository where runner image is pushed. |
|
|
3791
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerImageStatus.property.imageTag">imageTag</a></code> | <code>string</code> | Tag of image that should be used. |
|
|
3792
|
+
|
|
3793
|
+
---
|
|
3794
|
+
|
|
3795
|
+
##### `imageBuilderLogGroup`<sup>Optional</sup> <a name="imageBuilderLogGroup" id="@cloudsnorkel/cdk-github-runners.IRunnerImageStatus.property.imageBuilderLogGroup"></a>
|
|
3796
|
+
|
|
3797
|
+
```typescript
|
|
3798
|
+
public readonly imageBuilderLogGroup: string;
|
|
3799
|
+
```
|
|
3800
|
+
|
|
3801
|
+
- *Type:* string
|
|
3802
|
+
|
|
3803
|
+
Log group name for the image builder where history of image builds can be analyzed.
|
|
3804
|
+
|
|
3805
|
+
---
|
|
3806
|
+
|
|
3807
|
+
##### `imageRepository`<sup>Optional</sup> <a name="imageRepository" id="@cloudsnorkel/cdk-github-runners.IRunnerImageStatus.property.imageRepository"></a>
|
|
3808
|
+
|
|
3809
|
+
```typescript
|
|
3810
|
+
public readonly imageRepository: string;
|
|
3811
|
+
```
|
|
3812
|
+
|
|
3813
|
+
- *Type:* string
|
|
3814
|
+
|
|
3815
|
+
Image repository where runner image is pushed.
|
|
3816
|
+
|
|
3817
|
+
---
|
|
3818
|
+
|
|
3819
|
+
##### `imageTag`<sup>Optional</sup> <a name="imageTag" id="@cloudsnorkel/cdk-github-runners.IRunnerImageStatus.property.imageTag"></a>
|
|
3820
|
+
|
|
3821
|
+
```typescript
|
|
3822
|
+
public readonly imageTag: string;
|
|
3823
|
+
```
|
|
3824
|
+
|
|
3825
|
+
- *Type:* string
|
|
3826
|
+
|
|
3827
|
+
Tag of image that should be used.
|
|
3828
|
+
|
|
3829
|
+
---
|
|
3830
|
+
|
|
2758
3831
|
### IRunnerProvider <a name="IRunnerProvider" id="@cloudsnorkel/cdk-github-runners.IRunnerProvider"></a>
|
|
2759
3832
|
|
|
2760
3833
|
- *Extends:* aws-cdk-lib.aws_ec2.IConnectable, aws-cdk-lib.aws_iam.IGrantable
|
|
@@ -2797,6 +3870,7 @@ specific build parameters.
|
|
|
2797
3870
|
| --- | --- | --- |
|
|
2798
3871
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider.property.connections">connections</a></code> | <code>aws-cdk-lib.aws_ec2.Connections</code> | The network connections associated with this resource. |
|
|
2799
3872
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider.property.grantPrincipal">grantPrincipal</a></code> | <code>aws-cdk-lib.aws_iam.IPrincipal</code> | The principal to grant permissions to. |
|
|
3873
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider.property.image">image</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImage">RunnerImage</a></code> | Image used to create a new resource compute. |
|
|
2800
3874
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider.property.label">label</a></code> | <code>string</code> | GitHub Actions label associated with this runner provider. |
|
|
2801
3875
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup</code> | Security group associated with runners. |
|
|
2802
3876
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | VPC network in which runners will be placed. |
|
|
@@ -2827,6 +3901,20 @@ The principal to grant permissions to.
|
|
|
2827
3901
|
|
|
2828
3902
|
---
|
|
2829
3903
|
|
|
3904
|
+
##### `image`<sup>Required</sup> <a name="image" id="@cloudsnorkel/cdk-github-runners.IRunnerProvider.property.image"></a>
|
|
3905
|
+
|
|
3906
|
+
```typescript
|
|
3907
|
+
public readonly image: RunnerImage;
|
|
3908
|
+
```
|
|
3909
|
+
|
|
3910
|
+
- *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerImage">RunnerImage</a>
|
|
3911
|
+
|
|
3912
|
+
Image used to create a new resource compute.
|
|
3913
|
+
|
|
3914
|
+
Can be Docker image, AMI, or something else.
|
|
3915
|
+
|
|
3916
|
+
---
|
|
3917
|
+
|
|
2830
3918
|
##### `label`<sup>Required</sup> <a name="label" id="@cloudsnorkel/cdk-github-runners.IRunnerProvider.property.label"></a>
|
|
2831
3919
|
|
|
2832
3920
|
```typescript
|