@cloudsnorkel/cdk-github-runners 0.14.22 → 0.14.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +126 -54
- package/API.md +60 -8
- package/README.md +65 -0
- package/assets/setup.lambda/index.html +7 -7
- package/lib/access.js +1 -1
- package/lib/image-builders/api.js +1 -1
- package/lib/image-builders/aws-image-builder/base-image.js +2 -2
- package/lib/image-builders/aws-image-builder/builder.js +1 -1
- package/lib/image-builders/aws-image-builder/deprecated/ami.js +1 -1
- package/lib/image-builders/aws-image-builder/deprecated/container.js +1 -1
- package/lib/image-builders/aws-image-builder/deprecated/linux-components.js +1 -1
- package/lib/image-builders/aws-image-builder/deprecated/windows-components.js +1 -1
- package/lib/image-builders/codebuild-deprecated.js +1 -1
- package/lib/image-builders/components.d.ts +15 -6
- package/lib/image-builders/components.js +101 -14
- package/lib/image-builders/static.js +1 -1
- package/lib/providers/codebuild.js +4 -4
- package/lib/providers/common.js +3 -3
- package/lib/providers/composite.js +1 -1
- package/lib/providers/ec2.js +14 -15
- package/lib/providers/ecs.js +1 -1
- package/lib/providers/fargate.js +4 -4
- package/lib/providers/lambda.js +2 -2
- package/lib/runner.d.ts +7 -1
- package/lib/runner.js +13 -6
- package/lib/secrets.js +6 -2
- package/package.json +15 -15
package/API.md
CHANGED
|
@@ -3447,7 +3447,7 @@ Creates CloudWatch Logs Insights saved queries that can be used to debug issues
|
|
|
3447
3447
|
##### `failedImageBuildsTopic` <a name="failedImageBuildsTopic" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.failedImageBuildsTopic"></a>
|
|
3448
3448
|
|
|
3449
3449
|
```typescript
|
|
3450
|
-
public failedImageBuildsTopic(): Topic
|
|
3450
|
+
public failedImageBuildsTopic(scope?: Construct): Topic
|
|
3451
3451
|
```
|
|
3452
3452
|
|
|
3453
3453
|
Creates a topic for notifications when a runner image build fails.
|
|
@@ -3456,6 +3456,18 @@ Runner images are rebuilt every week by default. This provides the latest GitHub
|
|
|
3456
3456
|
|
|
3457
3457
|
If you want to be sure you are using the latest runner version, you can use this topic to be notified when a build fails.
|
|
3458
3458
|
|
|
3459
|
+
When the image builder is defined in a separate stack (e.g. in a split-stacks setup), pass that stack or construct
|
|
3460
|
+
as the optional scope so the topic and failure-notification aspects are created in the same stack as the image
|
|
3461
|
+
builder. Otherwise the aspects may not find the image builder resources.
|
|
3462
|
+
|
|
3463
|
+
###### `scope`<sup>Optional</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.failedImageBuildsTopic.parameter.scope"></a>
|
|
3464
|
+
|
|
3465
|
+
- *Type:* constructs.Construct
|
|
3466
|
+
|
|
3467
|
+
Optional scope (e.g. the image builder stack) where the topic and aspects will be created. Defaults to this construct.
|
|
3468
|
+
|
|
3469
|
+
---
|
|
3470
|
+
|
|
3459
3471
|
##### `metricFailed` <a name="metricFailed" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.metricFailed"></a>
|
|
3460
3472
|
|
|
3461
3473
|
```typescript
|
|
@@ -10437,7 +10449,7 @@ Returns true if the image builder should be rebooted after this component is ins
|
|
|
10437
10449
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponent.dockerInDocker">dockerInDocker</a></code> | A component to install Docker-in-Docker. |
|
|
10438
10450
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponent.environmentVariables">environmentVariables</a></code> | A component to add environment variables for jobs the runner executes. |
|
|
10439
10451
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponent.extraCertificates">extraCertificates</a></code> | A component to add a trusted certificate authority. |
|
|
10440
|
-
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponent.git">git</a></code> | A component to install
|
|
10452
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponent.git">git</a></code> | A component to install Git. |
|
|
10441
10453
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponent.githubCli">githubCli</a></code> | A component to install the GitHub CLI. |
|
|
10442
10454
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponent.githubRunner">githubRunner</a></code> | A component to install the GitHub Actions Runner. |
|
|
10443
10455
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageComponent.lambdaEntrypoint">lambdaEntrypoint</a></code> | A component to set up the required Lambda entrypoint for Lambda runners. |
|
|
@@ -10451,11 +10463,19 @@ Returns true if the image builder should be rebooted after this component is ins
|
|
|
10451
10463
|
```typescript
|
|
10452
10464
|
import { RunnerImageComponent } from '@cloudsnorkel/cdk-github-runners'
|
|
10453
10465
|
|
|
10454
|
-
RunnerImageComponent.awsCli()
|
|
10466
|
+
RunnerImageComponent.awsCli(version?: string)
|
|
10455
10467
|
```
|
|
10456
10468
|
|
|
10457
10469
|
A component to install the AWS CLI.
|
|
10458
10470
|
|
|
10471
|
+
###### `version`<sup>Optional</sup> <a name="version" id="@cloudsnorkel/cdk-github-runners.RunnerImageComponent.awsCli.parameter.version"></a>
|
|
10472
|
+
|
|
10473
|
+
- *Type:* string
|
|
10474
|
+
|
|
10475
|
+
Software version to install (e.g. '2.15.0'). Default: latest.
|
|
10476
|
+
|
|
10477
|
+
---
|
|
10478
|
+
|
|
10459
10479
|
##### `cloudWatchAgent` <a name="cloudWatchAgent" id="@cloudsnorkel/cdk-github-runners.RunnerImageComponent.cloudWatchAgent"></a>
|
|
10460
10480
|
|
|
10461
10481
|
```typescript
|
|
@@ -10493,23 +10513,39 @@ Use this to customize the image for the runner.
|
|
|
10493
10513
|
```typescript
|
|
10494
10514
|
import { RunnerImageComponent } from '@cloudsnorkel/cdk-github-runners'
|
|
10495
10515
|
|
|
10496
|
-
RunnerImageComponent.docker()
|
|
10516
|
+
RunnerImageComponent.docker(version?: string)
|
|
10497
10517
|
```
|
|
10498
10518
|
|
|
10499
10519
|
A component to install Docker.
|
|
10500
10520
|
|
|
10501
10521
|
On Windows this sets up dockerd for Windows containers without Docker Desktop. If you need Linux containers on Windows, you'll need to install Docker Desktop which doesn't seem to play well with servers (PRs welcome).
|
|
10502
10522
|
|
|
10523
|
+
###### `version`<sup>Optional</sup> <a name="version" id="@cloudsnorkel/cdk-github-runners.RunnerImageComponent.docker.parameter.version"></a>
|
|
10524
|
+
|
|
10525
|
+
- *Type:* string
|
|
10526
|
+
|
|
10527
|
+
Software version to install (e.g. '29.1.5'). Default: latest. Only used on Windows; on Linux (Ubuntu, Amazon Linux 2 and Amazon Linux 2023) the package version format is not reliably predictable so latest is always used.
|
|
10528
|
+
|
|
10529
|
+
---
|
|
10530
|
+
|
|
10503
10531
|
##### ~~`dockerInDocker`~~ <a name="dockerInDocker" id="@cloudsnorkel/cdk-github-runners.RunnerImageComponent.dockerInDocker"></a>
|
|
10504
10532
|
|
|
10505
10533
|
```typescript
|
|
10506
10534
|
import { RunnerImageComponent } from '@cloudsnorkel/cdk-github-runners'
|
|
10507
10535
|
|
|
10508
|
-
RunnerImageComponent.dockerInDocker()
|
|
10536
|
+
RunnerImageComponent.dockerInDocker(version?: string)
|
|
10509
10537
|
```
|
|
10510
10538
|
|
|
10511
10539
|
A component to install Docker-in-Docker.
|
|
10512
10540
|
|
|
10541
|
+
###### `version`<sup>Optional</sup> <a name="version" id="@cloudsnorkel/cdk-github-runners.RunnerImageComponent.dockerInDocker.parameter.version"></a>
|
|
10542
|
+
|
|
10543
|
+
- *Type:* string
|
|
10544
|
+
|
|
10545
|
+
Software version to install (e.g. '29.1.5'). Default: latest.
|
|
10546
|
+
|
|
10547
|
+
---
|
|
10548
|
+
|
|
10513
10549
|
##### `environmentVariables` <a name="environmentVariables" id="@cloudsnorkel/cdk-github-runners.RunnerImageComponent.environmentVariables"></a>
|
|
10514
10550
|
|
|
10515
10551
|
```typescript
|
|
@@ -10565,21 +10601,37 @@ unique certificate name to be used on runner file system.
|
|
|
10565
10601
|
```typescript
|
|
10566
10602
|
import { RunnerImageComponent } from '@cloudsnorkel/cdk-github-runners'
|
|
10567
10603
|
|
|
10568
|
-
RunnerImageComponent.git()
|
|
10604
|
+
RunnerImageComponent.git(version?: string)
|
|
10569
10605
|
```
|
|
10570
10606
|
|
|
10571
|
-
A component to install
|
|
10607
|
+
A component to install Git.
|
|
10608
|
+
|
|
10609
|
+
###### `version`<sup>Optional</sup> <a name="version" id="@cloudsnorkel/cdk-github-runners.RunnerImageComponent.git.parameter.version"></a>
|
|
10610
|
+
|
|
10611
|
+
- *Type:* string
|
|
10612
|
+
|
|
10613
|
+
Software version to install (e.g. '2.43.0.windows.1'). Default: latest. Only used on Windows; on Linux the package manager is used.
|
|
10614
|
+
|
|
10615
|
+
---
|
|
10572
10616
|
|
|
10573
10617
|
##### `githubCli` <a name="githubCli" id="@cloudsnorkel/cdk-github-runners.RunnerImageComponent.githubCli"></a>
|
|
10574
10618
|
|
|
10575
10619
|
```typescript
|
|
10576
10620
|
import { RunnerImageComponent } from '@cloudsnorkel/cdk-github-runners'
|
|
10577
10621
|
|
|
10578
|
-
RunnerImageComponent.githubCli()
|
|
10622
|
+
RunnerImageComponent.githubCli(version?: string)
|
|
10579
10623
|
```
|
|
10580
10624
|
|
|
10581
10625
|
A component to install the GitHub CLI.
|
|
10582
10626
|
|
|
10627
|
+
###### `version`<sup>Optional</sup> <a name="version" id="@cloudsnorkel/cdk-github-runners.RunnerImageComponent.githubCli.parameter.version"></a>
|
|
10628
|
+
|
|
10629
|
+
- *Type:* string
|
|
10630
|
+
|
|
10631
|
+
Software version to install (e.g. '2.40.0'). Default: latest. Only used on Windows (x64/windows_amd64); on Linux the package manager is used.
|
|
10632
|
+
|
|
10633
|
+
---
|
|
10634
|
+
|
|
10583
10635
|
##### `githubRunner` <a name="githubRunner" id="@cloudsnorkel/cdk-github-runners.RunnerImageComponent.githubRunner"></a>
|
|
10584
10636
|
|
|
10585
10637
|
```typescript
|
package/README.md
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
[][11]
|
|
7
7
|
[][12]
|
|
8
8
|
[](https://github.com/CloudSnorkel/cdk-github-runners/actions/workflows/release.yml)
|
|
9
|
+
[][20]
|
|
9
10
|
[](https://github.com/CloudSnorkel/cdk-github-runners/blob/main/LICENSE)
|
|
10
11
|
|
|
11
12
|
Use this CDK construct to create ephemeral [self-hosted GitHub runners][1] on-demand inside your AWS account.
|
|
@@ -25,6 +26,23 @@ Self-hosted runners in AWS are useful when:
|
|
|
25
26
|
|
|
26
27
|
Ephemeral (or on-demand) runners are the [recommended way by GitHub][14] for auto-scaling, and they make sure all jobs run with a clean image. Runners are started on-demand. You don't pay unless a job is running.
|
|
27
28
|
|
|
29
|
+
## Table of Contents
|
|
30
|
+
|
|
31
|
+
- [API](#api)
|
|
32
|
+
- [Providers](#providers)
|
|
33
|
+
- [Installation](#installation)
|
|
34
|
+
- [Customizing](#customizing)
|
|
35
|
+
- [Composite Providers](#composite-providers)
|
|
36
|
+
- [Custom Provider Selection](#custom-provider-selection)
|
|
37
|
+
- [Examples](#examples)
|
|
38
|
+
- [Architecture](#architecture)
|
|
39
|
+
- [Troubleshooting](#troubleshooting)
|
|
40
|
+
- [Monitoring](#monitoring)
|
|
41
|
+
- [Getting Help](#getting-help)
|
|
42
|
+
- [Contributing](#contributing)
|
|
43
|
+
- [Sponsors](#sponsors)
|
|
44
|
+
- [Other Options](#other-options)
|
|
45
|
+
|
|
28
46
|
## API
|
|
29
47
|
|
|
30
48
|
The best way to browse API documentation is on [Constructs Hub][13]. It is available in all supported programming languages.
|
|
@@ -523,6 +541,14 @@ Other useful metrics to track:
|
|
|
523
541
|
1. Use `GitHubRunners.metricJobCompleted()` to get a metric for the number of completed jobs broken down by labels and job success.
|
|
524
542
|
2. Use `GitHubRunners.metricTime()` to get a metric for the total time a runner is running. This includes the overhead of starting the runner.
|
|
525
543
|
|
|
544
|
+
## Getting Help
|
|
545
|
+
|
|
546
|
+
Need help? We're here for you!
|
|
547
|
+
|
|
548
|
+
* 💬 **GitHub Discussions**: Ask questions, share ideas, or get help from the community by opening a [discussion][18]
|
|
549
|
+
* 🐛 **GitHub Issues**: Report bugs or request features by opening an [issue][16]
|
|
550
|
+
* 💬 **Discord**: Join our [Discord community][20] for real-time help and discussions
|
|
551
|
+
|
|
526
552
|
## Contributing
|
|
527
553
|
|
|
528
554
|
If you use and love this project, please consider contributing.
|
|
@@ -535,6 +561,43 @@ If you use and love this project, please consider contributing.
|
|
|
535
561
|
* Allow edits from maintainers so small adjustments can be made easily.
|
|
536
562
|
1. 💵 Consider [sponsoring][15] the project to show your support and optionally get your name listed below.
|
|
537
563
|
|
|
564
|
+
## Sponsors
|
|
565
|
+
|
|
566
|
+
Thanks to our generous sponsors who helped make this project possible!
|
|
567
|
+
|
|
568
|
+
<table>
|
|
569
|
+
<tr>
|
|
570
|
+
<td align="center">
|
|
571
|
+
<a href="https://github.com/threat-down">
|
|
572
|
+
<img src="https://github.com/threat-down.png?size=100" width="100" height="100" alt="ThreatDown" />
|
|
573
|
+
<br />
|
|
574
|
+
<sub><b>ThreatDown</b></sub>
|
|
575
|
+
</a>
|
|
576
|
+
</td>
|
|
577
|
+
<td align="center">
|
|
578
|
+
<a href="https://github.com/magicbell">
|
|
579
|
+
<img src="https://github.com/magicbell.png?size=100" width="100" height="100" alt="MagicBell" />
|
|
580
|
+
<br />
|
|
581
|
+
<sub><b>MagicBell</b></sub>
|
|
582
|
+
</a>
|
|
583
|
+
</td>
|
|
584
|
+
<td align="center">
|
|
585
|
+
<a href="https://github.com/fragment-dev">
|
|
586
|
+
<img src="https://github.com/fragment-dev.png?size=100" width="100" height="100" alt="Fragment" />
|
|
587
|
+
<br />
|
|
588
|
+
<sub><b>Fragment</b></sub>
|
|
589
|
+
</a>
|
|
590
|
+
</td>
|
|
591
|
+
<td align="center">
|
|
592
|
+
<a href="https://github.com/andresionek91">
|
|
593
|
+
<img src="https://github.com/andresionek91.png?size=100" width="100" height="100" alt="Andre Sionek" />
|
|
594
|
+
<br />
|
|
595
|
+
<sub><b>Andre Sionek</b></sub>
|
|
596
|
+
</a>
|
|
597
|
+
</td>
|
|
598
|
+
</tr>
|
|
599
|
+
</table>
|
|
600
|
+
|
|
538
601
|
## Other Options
|
|
539
602
|
|
|
540
603
|
1. [github-aws-runners/terraform-aws-github-runner][3] if you're using Terraform
|
|
@@ -558,3 +621,5 @@ If you use and love this project, please consider contributing.
|
|
|
558
621
|
[15]: https://github.com/sponsors/CloudSnorkel
|
|
559
622
|
[16]: https://github.com/CloudSnorkel/cdk-github-runners/issues
|
|
560
623
|
[17]: https://github.com/CloudSnorkel/cdk-github-runners/pulls
|
|
624
|
+
[18]: https://github.com/CloudSnorkel/cdk-github-runners/discussions
|
|
625
|
+
[20]: https://discord.gg/vdrTUTqQKv
|