@cloudsnorkel/cdk-github-runners 0.14.24 → 0.15.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.
Files changed (139) hide show
  1. package/.jsii +5400 -255
  2. package/API.md +1048 -24
  3. package/README.md +52 -0
  4. package/assets/delete-failed-runner.lambda/index.js +105 -9
  5. package/assets/idle-runner-repear.lambda/index.js +136 -14
  6. package/assets/image-builders/aws-image-builder/delete-resources.lambda/index.js +1 -1
  7. package/assets/image-builders/build-image.lambda/index.js +1 -1
  8. package/assets/providers/ami-root-device.lambda/index.js +1 -1
  9. package/assets/setup.lambda/index.html +7 -7
  10. package/assets/setup.lambda/index.js +101 -8
  11. package/assets/status.lambda/index.js +104 -8
  12. package/assets/token-retriever.lambda/index.js +104 -8
  13. package/assets/warm-runner-manager.lambda/index.js +5892 -0
  14. package/assets/webhook-handler.lambda/index.js +109 -11
  15. package/assets/webhook-redelivery.lambda/index.js +122 -24
  16. package/lib/access.js +1 -1
  17. package/lib/delete-failed-runner.lambda.js +2 -2
  18. package/lib/idle-runner-repear.lambda.js +33 -7
  19. package/lib/image-builders/api.js +1 -1
  20. package/lib/image-builders/aws-image-builder/base-image.d.ts +13 -0
  21. package/lib/image-builders/aws-image-builder/base-image.js +36 -3
  22. package/lib/image-builders/aws-image-builder/builder.js +4 -4
  23. package/lib/image-builders/aws-image-builder/delete-resources.lambda.js +2 -2
  24. package/lib/image-builders/aws-image-builder/deprecated/ami.js +1 -1
  25. package/lib/image-builders/aws-image-builder/deprecated/container.js +1 -1
  26. package/lib/image-builders/aws-image-builder/deprecated/linux-components.js +1 -1
  27. package/lib/image-builders/aws-image-builder/deprecated/windows-components.js +1 -1
  28. package/lib/image-builders/build-image.lambda.js +2 -2
  29. package/lib/image-builders/codebuild-deprecated.js +1 -1
  30. package/lib/image-builders/components.js +3 -3
  31. package/lib/image-builders/static.js +1 -1
  32. package/lib/index.d.ts +1 -0
  33. package/lib/index.js +2 -1
  34. package/lib/lambda-github.d.ts +1 -1
  35. package/lib/lambda-github.js +3 -2
  36. package/lib/lambda-helpers.js +4 -4
  37. package/lib/providers/ami-root-device.lambda.js +2 -2
  38. package/lib/providers/codebuild.d.ts +16 -0
  39. package/lib/providers/codebuild.js +15 -4
  40. package/lib/providers/common.js +3 -3
  41. package/lib/providers/composite.js +1 -1
  42. package/lib/providers/ec2.d.ts +5 -0
  43. package/lib/providers/ec2.js +31 -17
  44. package/lib/providers/ecs.d.ts +17 -0
  45. package/lib/providers/ecs.js +43 -38
  46. package/lib/providers/fargate.js +9 -31
  47. package/lib/providers/lambda.js +2 -2
  48. package/lib/runner.d.ts +25 -2
  49. package/lib/runner.js +119 -17
  50. package/lib/secrets.js +1 -1
  51. package/lib/setup.lambda.js +2 -2
  52. package/lib/utils.d.ts +10 -1
  53. package/lib/utils.js +15 -1
  54. package/lib/warm-runner-manager-function.d.ts +18 -0
  55. package/lib/warm-runner-manager-function.js +24 -0
  56. package/lib/warm-runner-manager.lambda.d.ts +41 -0
  57. package/lib/warm-runner-manager.lambda.js +487 -0
  58. package/lib/warm-runner.d.ts +147 -0
  59. package/lib/warm-runner.js +210 -0
  60. package/lib/webhook-handler.lambda.js +5 -3
  61. package/lib/webhook-redelivery.lambda.js +17 -16
  62. package/lib/webhook.d.ts +4 -0
  63. package/lib/webhook.js +2 -1
  64. package/node_modules/cron-parser/LICENSE +21 -0
  65. package/node_modules/cron-parser/README.md +408 -0
  66. package/node_modules/cron-parser/dist/CronDate.js +518 -0
  67. package/node_modules/cron-parser/dist/CronExpression.js +520 -0
  68. package/node_modules/cron-parser/dist/CronExpressionParser.js +382 -0
  69. package/node_modules/cron-parser/dist/CronFieldCollection.js +371 -0
  70. package/node_modules/cron-parser/dist/CronFileParser.js +109 -0
  71. package/node_modules/cron-parser/dist/fields/CronDayOfMonth.js +44 -0
  72. package/node_modules/cron-parser/dist/fields/CronDayOfWeek.js +51 -0
  73. package/node_modules/cron-parser/dist/fields/CronField.js +214 -0
  74. package/node_modules/cron-parser/dist/fields/CronHour.js +40 -0
  75. package/node_modules/cron-parser/dist/fields/CronMinute.js +40 -0
  76. package/node_modules/cron-parser/dist/fields/CronMonth.js +44 -0
  77. package/node_modules/cron-parser/dist/fields/CronSecond.js +40 -0
  78. package/node_modules/cron-parser/dist/fields/index.js +24 -0
  79. package/node_modules/cron-parser/dist/fields/types.js +2 -0
  80. package/node_modules/cron-parser/dist/index.js +31 -0
  81. package/node_modules/cron-parser/dist/types/CronDate.d.ts +288 -0
  82. package/node_modules/cron-parser/dist/types/CronExpression.d.ts +118 -0
  83. package/node_modules/cron-parser/dist/types/CronExpressionParser.d.ts +70 -0
  84. package/node_modules/cron-parser/dist/types/CronFieldCollection.d.ts +153 -0
  85. package/node_modules/cron-parser/dist/types/CronFileParser.d.ts +30 -0
  86. package/node_modules/cron-parser/dist/types/fields/CronDayOfMonth.d.ts +25 -0
  87. package/node_modules/cron-parser/dist/types/fields/CronDayOfWeek.d.ts +30 -0
  88. package/node_modules/cron-parser/dist/types/fields/CronField.d.ts +130 -0
  89. package/node_modules/cron-parser/dist/types/fields/CronHour.d.ts +23 -0
  90. package/node_modules/cron-parser/dist/types/fields/CronMinute.d.ts +23 -0
  91. package/node_modules/cron-parser/dist/types/fields/CronMonth.d.ts +24 -0
  92. package/node_modules/cron-parser/dist/types/fields/CronSecond.d.ts +23 -0
  93. package/node_modules/cron-parser/dist/types/fields/index.d.ts +8 -0
  94. package/node_modules/cron-parser/dist/types/fields/types.d.ts +18 -0
  95. package/node_modules/cron-parser/dist/types/index.d.ts +8 -0
  96. package/node_modules/cron-parser/dist/types/utils/random.d.ts +10 -0
  97. package/node_modules/cron-parser/dist/utils/random.js +38 -0
  98. package/node_modules/cron-parser/package.json +117 -0
  99. package/node_modules/luxon/LICENSE.md +7 -0
  100. package/node_modules/luxon/README.md +55 -0
  101. package/node_modules/luxon/build/amd/luxon.js +8741 -0
  102. package/node_modules/luxon/build/amd/luxon.js.map +1 -0
  103. package/node_modules/luxon/build/cjs-browser/luxon.js +8739 -0
  104. package/node_modules/luxon/build/cjs-browser/luxon.js.map +1 -0
  105. package/node_modules/luxon/build/es6/luxon.mjs +8133 -0
  106. package/node_modules/luxon/build/es6/luxon.mjs.map +1 -0
  107. package/node_modules/luxon/build/global/luxon.js +8744 -0
  108. package/node_modules/luxon/build/global/luxon.js.map +1 -0
  109. package/node_modules/luxon/build/global/luxon.min.js +1 -0
  110. package/node_modules/luxon/build/global/luxon.min.js.map +1 -0
  111. package/node_modules/luxon/build/node/luxon.js +7792 -0
  112. package/node_modules/luxon/build/node/luxon.js.map +1 -0
  113. package/node_modules/luxon/package.json +87 -0
  114. package/node_modules/luxon/src/datetime.js +2603 -0
  115. package/node_modules/luxon/src/duration.js +1009 -0
  116. package/node_modules/luxon/src/errors.js +61 -0
  117. package/node_modules/luxon/src/impl/conversions.js +206 -0
  118. package/node_modules/luxon/src/impl/diff.js +95 -0
  119. package/node_modules/luxon/src/impl/digits.js +94 -0
  120. package/node_modules/luxon/src/impl/english.js +233 -0
  121. package/node_modules/luxon/src/impl/formats.js +176 -0
  122. package/node_modules/luxon/src/impl/formatter.js +434 -0
  123. package/node_modules/luxon/src/impl/invalid.js +14 -0
  124. package/node_modules/luxon/src/impl/locale.js +569 -0
  125. package/node_modules/luxon/src/impl/regexParser.js +335 -0
  126. package/node_modules/luxon/src/impl/tokenParser.js +505 -0
  127. package/node_modules/luxon/src/impl/util.js +330 -0
  128. package/node_modules/luxon/src/impl/zoneUtil.js +34 -0
  129. package/node_modules/luxon/src/info.js +205 -0
  130. package/node_modules/luxon/src/interval.js +669 -0
  131. package/node_modules/luxon/src/luxon.js +26 -0
  132. package/node_modules/luxon/src/package.json +4 -0
  133. package/node_modules/luxon/src/settings.js +180 -0
  134. package/node_modules/luxon/src/zone.js +97 -0
  135. package/node_modules/luxon/src/zones/IANAZone.js +235 -0
  136. package/node_modules/luxon/src/zones/fixedOffsetZone.js +150 -0
  137. package/node_modules/luxon/src/zones/invalidZone.js +53 -0
  138. package/node_modules/luxon/src/zones/systemZone.js +61 -0
  139. package/package.json +33 -24
package/API.md CHANGED
@@ -2,6 +2,170 @@
2
2
 
3
3
  ## Constructs <a name="Constructs" id="Constructs"></a>
4
4
 
5
+ ### AlwaysOnWarmRunner <a name="AlwaysOnWarmRunner" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner"></a>
6
+
7
+ Warm runners that run 24/7. Fills at midnight UTC and each runner stays alive for 24 hours.
8
+
9
+ Runners will be provisioned using the specified provider and registered in the specified repository or organization.
10
+
11
+ Registration level must match the one selected during setup. See {@link SETUP_GITHUB.md } for more information on the selection.
12
+
13
+ ## Limitations
14
+
15
+ - Jobs will still trigger provisioning of on-demand runners, even if a warm runner ends up being used.
16
+ - You may briefly see more than `count` runners when changing config or at rotation.
17
+ - To remove: set `count` to 0, deploy, wait for warm runners to stop, then remove and deploy again.
18
+ If you don't follow this procedure, warm runners may linger until they expire.
19
+ - Provider failures or timeouts (like Lambda provider timing out after 15 minutes) will result in a
20
+ gap in coverage until the retry succeeds. Current retry mechanism has built-in back-off rate and
21
+ can be tweaked using `retryOptions`. This will be improved in the future.
22
+
23
+ *Example*
24
+
25
+ ```typescript
26
+ new AlwaysOnWarmRunner(stack, 'AlwaysOnLinux', {
27
+ runners,
28
+ provider: myProvider,
29
+ count: 3,
30
+ owner: 'my-org',
31
+ repo: 'my-repo',
32
+ });
33
+ ```
34
+
35
+
36
+ #### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.Initializer"></a>
37
+
38
+ ```typescript
39
+ import { AlwaysOnWarmRunner } from '@cloudsnorkel/cdk-github-runners'
40
+
41
+ new AlwaysOnWarmRunner(scope: Construct, id: string, props: AlwaysOnWarmRunnerProps)
42
+ ```
43
+
44
+ | **Name** | **Type** | **Description** |
45
+ | --- | --- | --- |
46
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
47
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
48
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.Initializer.parameter.props">props</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps">AlwaysOnWarmRunnerProps</a></code> | *No description.* |
49
+
50
+ ---
51
+
52
+ ##### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.Initializer.parameter.scope"></a>
53
+
54
+ - *Type:* constructs.Construct
55
+
56
+ ---
57
+
58
+ ##### `id`<sup>Required</sup> <a name="id" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.Initializer.parameter.id"></a>
59
+
60
+ - *Type:* string
61
+
62
+ ---
63
+
64
+ ##### `props`<sup>Required</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.Initializer.parameter.props"></a>
65
+
66
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps">AlwaysOnWarmRunnerProps</a>
67
+
68
+ ---
69
+
70
+ #### Methods <a name="Methods" id="Methods"></a>
71
+
72
+ | **Name** | **Description** |
73
+ | --- | --- |
74
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.toString">toString</a></code> | Returns a string representation of this construct. |
75
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.with">with</a></code> | Applies one or more mixins to this construct. |
76
+
77
+ ---
78
+
79
+ ##### `toString` <a name="toString" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.toString"></a>
80
+
81
+ ```typescript
82
+ public toString(): string
83
+ ```
84
+
85
+ Returns a string representation of this construct.
86
+
87
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.with"></a>
88
+
89
+ ```typescript
90
+ public with(mixins: ...IMixin[]): IConstruct
91
+ ```
92
+
93
+ Applies one or more mixins to this construct.
94
+
95
+ Mixins are applied in order. The list of constructs is captured at the
96
+ start of the call, so constructs added by a mixin will not be visited.
97
+ Use multiple `with()` calls if subsequent mixins should apply to added
98
+ constructs.
99
+
100
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.with.parameter.mixins"></a>
101
+
102
+ - *Type:* ...constructs.IMixin[]
103
+
104
+ The mixins to apply.
105
+
106
+ ---
107
+
108
+ #### Static Functions <a name="Static Functions" id="Static Functions"></a>
109
+
110
+ | **Name** | **Description** |
111
+ | --- | --- |
112
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
113
+
114
+ ---
115
+
116
+ ##### `isConstruct` <a name="isConstruct" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.isConstruct"></a>
117
+
118
+ ```typescript
119
+ import { AlwaysOnWarmRunner } from '@cloudsnorkel/cdk-github-runners'
120
+
121
+ AlwaysOnWarmRunner.isConstruct(x: any)
122
+ ```
123
+
124
+ Checks if `x` is a construct.
125
+
126
+ Use this method instead of `instanceof` to properly detect `Construct`
127
+ instances, even when the construct library is symlinked.
128
+
129
+ Explanation: in JavaScript, multiple copies of the `constructs` library on
130
+ disk are seen as independent, completely different libraries. As a
131
+ consequence, the class `Construct` in each copy of the `constructs` library
132
+ is seen as a different class, and an instance of one class will not test as
133
+ `instanceof` the other class. `npm install` will not create installations
134
+ like this, but users may manually symlink construct libraries together or
135
+ use a monorepo tool: in those cases, multiple copies of the `constructs`
136
+ library can be accidentally installed, and `instanceof` will behave
137
+ unpredictably. It is safest to avoid using `instanceof`, and using
138
+ this type-testing method instead.
139
+
140
+ ###### `x`<sup>Required</sup> <a name="x" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.isConstruct.parameter.x"></a>
141
+
142
+ - *Type:* any
143
+
144
+ Any object.
145
+
146
+ ---
147
+
148
+ #### Properties <a name="Properties" id="Properties"></a>
149
+
150
+ | **Name** | **Type** | **Description** |
151
+ | --- | --- | --- |
152
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
153
+
154
+ ---
155
+
156
+ ##### `node`<sup>Required</sup> <a name="node" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.property.node"></a>
157
+
158
+ ```typescript
159
+ public readonly node: Node;
160
+ ```
161
+
162
+ - *Type:* constructs.Node
163
+
164
+ The tree node.
165
+
166
+ ---
167
+
168
+
5
169
  ### AmiBuilder <a name="AmiBuilder" id="@cloudsnorkel/cdk-github-runners.AmiBuilder"></a>
6
170
 
7
171
  - *Implements:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerImageBuilder">IRunnerImageBuilder</a>
@@ -74,6 +238,7 @@ new AmiBuilder(scope: Construct, id: string, props?: AmiBuilderProps)
74
238
  | **Name** | **Description** |
75
239
  | --- | --- |
76
240
  | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.toString">toString</a></code> | Returns a string representation of this construct. |
241
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.with">with</a></code> | Applies one or more mixins to this construct. |
77
242
  | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.addComponent">addComponent</a></code> | Add a component to be installed. |
78
243
  | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.addExtraCertificates">addExtraCertificates</a></code> | Add extra trusted certificates. |
79
244
  | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.bindAmi">bindAmi</a></code> | Called by IRunnerProvider to finalize settings and create the AMI builder. |
@@ -90,6 +255,27 @@ public toString(): string
90
255
 
91
256
  Returns a string representation of this construct.
92
257
 
258
+ ##### ~~`with`~~ <a name="with" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.with"></a>
259
+
260
+ ```typescript
261
+ public with(mixins: ...IMixin[]): IConstruct
262
+ ```
263
+
264
+ Applies one or more mixins to this construct.
265
+
266
+ Mixins are applied in order. The list of constructs is captured at the
267
+ start of the call, so constructs added by a mixin will not be visited.
268
+ Use multiple `with()` calls if subsequent mixins should apply to added
269
+ constructs.
270
+
271
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.with.parameter.mixins"></a>
272
+
273
+ - *Type:* ...constructs.IMixin[]
274
+
275
+ The mixins to apply.
276
+
277
+ ---
278
+
93
279
  ##### ~~`addComponent`~~ <a name="addComponent" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.addComponent"></a>
94
280
 
95
281
  ```typescript
@@ -304,6 +490,7 @@ new CodeBuildImageBuilder(scope: Construct, id: string, props: CodeBuildImageBui
304
490
  | **Name** | **Description** |
305
491
  | --- | --- |
306
492
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.toString">toString</a></code> | Returns a string representation of this construct. |
493
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.with">with</a></code> | Applies one or more mixins to this construct. |
307
494
  | <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. |
308
495
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addFiles">addFiles</a></code> | Uploads a folder to the build server at a given folder name. |
309
496
  | <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. |
@@ -323,6 +510,27 @@ public toString(): string
323
510
 
324
511
  Returns a string representation of this construct.
325
512
 
513
+ ##### ~~`with`~~ <a name="with" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.with"></a>
514
+
515
+ ```typescript
516
+ public with(mixins: ...IMixin[]): IConstruct
517
+ ```
518
+
519
+ Applies one or more mixins to this construct.
520
+
521
+ Mixins are applied in order. The list of constructs is captured at the
522
+ start of the call, so constructs added by a mixin will not be visited.
523
+ Use multiple `with()` calls if subsequent mixins should apply to added
524
+ constructs.
525
+
526
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.with.parameter.mixins"></a>
527
+
528
+ - *Type:* ...constructs.IMixin[]
529
+
530
+ The mixins to apply.
531
+
532
+ ---
533
+
326
534
  ##### ~~`addExtraCertificates`~~ <a name="addExtraCertificates" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addExtraCertificates"></a>
327
535
 
328
536
  ```typescript
@@ -589,6 +797,7 @@ new CodeBuildRunner(scope: Construct, id: string, props?: CodeBuildRunnerProvide
589
797
  | **Name** | **Description** |
590
798
  | --- | --- |
591
799
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.toString">toString</a></code> | Returns a string representation of this construct. |
800
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.with">with</a></code> | Applies one or more mixins to this construct. |
592
801
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
593
802
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.grantStateMachine">grantStateMachine</a></code> | An optional method that modifies the role of the state machine after all the tasks have been generated. |
594
803
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.status">status</a></code> | Return status of the runner provider to be used in the main status function. |
@@ -603,6 +812,27 @@ public toString(): string
603
812
 
604
813
  Returns a string representation of this construct.
605
814
 
815
+ ##### ~~`with`~~ <a name="with" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunner.with"></a>
816
+
817
+ ```typescript
818
+ public with(mixins: ...IMixin[]): IConstruct
819
+ ```
820
+
821
+ Applies one or more mixins to this construct.
822
+
823
+ Mixins are applied in order. The list of constructs is captured at the
824
+ start of the call, so constructs added by a mixin will not be visited.
825
+ Use multiple `with()` calls if subsequent mixins should apply to added
826
+ constructs.
827
+
828
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunner.with.parameter.mixins"></a>
829
+
830
+ - *Type:* ...constructs.IMixin[]
831
+
832
+ The mixins to apply.
833
+
834
+ ---
835
+
606
836
  ##### ~~`getStepFunctionTask`~~ <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunner.getStepFunctionTask"></a>
607
837
 
608
838
  ```typescript
@@ -975,6 +1205,7 @@ new CodeBuildRunnerProvider(scope: Construct, id: string, props?: CodeBuildRunne
975
1205
  | **Name** | **Description** |
976
1206
  | --- | --- |
977
1207
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.toString">toString</a></code> | Returns a string representation of this construct. |
1208
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.with">with</a></code> | Applies one or more mixins to this construct. |
978
1209
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
979
1210
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.grantStateMachine">grantStateMachine</a></code> | An optional method that modifies the role of the state machine after all the tasks have been generated. |
980
1211
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.status">status</a></code> | Return status of the runner provider to be used in the main status function. |
@@ -989,6 +1220,27 @@ public toString(): string
989
1220
 
990
1221
  Returns a string representation of this construct.
991
1222
 
1223
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.with"></a>
1224
+
1225
+ ```typescript
1226
+ public with(mixins: ...IMixin[]): IConstruct
1227
+ ```
1228
+
1229
+ Applies one or more mixins to this construct.
1230
+
1231
+ Mixins are applied in order. The list of constructs is captured at the
1232
+ start of the call, so constructs added by a mixin will not be visited.
1233
+ Use multiple `with()` calls if subsequent mixins should apply to added
1234
+ constructs.
1235
+
1236
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.with.parameter.mixins"></a>
1237
+
1238
+ - *Type:* ...constructs.IMixin[]
1239
+
1240
+ The mixins to apply.
1241
+
1242
+ ---
1243
+
992
1244
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.getStepFunctionTask"></a>
993
1245
 
994
1246
  ```typescript
@@ -1364,6 +1616,7 @@ new ContainerImageBuilder(scope: Construct, id: string, props?: ContainerImageBu
1364
1616
  | **Name** | **Description** |
1365
1617
  | --- | --- |
1366
1618
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.toString">toString</a></code> | Returns a string representation of this construct. |
1619
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.with">with</a></code> | Applies one or more mixins to this construct. |
1367
1620
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.addComponent">addComponent</a></code> | Add a component to be installed. |
1368
1621
  | <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. |
1369
1622
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.bindAmi">bindAmi</a></code> | Build and return an AMI with GitHub Runner installed in it. |
@@ -1380,6 +1633,27 @@ public toString(): string
1380
1633
 
1381
1634
  Returns a string representation of this construct.
1382
1635
 
1636
+ ##### ~~`with`~~ <a name="with" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.with"></a>
1637
+
1638
+ ```typescript
1639
+ public with(mixins: ...IMixin[]): IConstruct
1640
+ ```
1641
+
1642
+ Applies one or more mixins to this construct.
1643
+
1644
+ Mixins are applied in order. The list of constructs is captured at the
1645
+ start of the call, so constructs added by a mixin will not be visited.
1646
+ Use multiple `with()` calls if subsequent mixins should apply to added
1647
+ constructs.
1648
+
1649
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.with.parameter.mixins"></a>
1650
+
1651
+ - *Type:* ...constructs.IMixin[]
1652
+
1653
+ The mixins to apply.
1654
+
1655
+ ---
1656
+
1383
1657
  ##### ~~`addComponent`~~ <a name="addComponent" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.addComponent"></a>
1384
1658
 
1385
1659
  ```typescript
@@ -1580,6 +1854,7 @@ new Ec2Runner(scope: Construct, id: string, props?: Ec2RunnerProviderProps)
1580
1854
  | **Name** | **Description** |
1581
1855
  | --- | --- |
1582
1856
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.toString">toString</a></code> | Returns a string representation of this construct. |
1857
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.with">with</a></code> | Applies one or more mixins to this construct. |
1583
1858
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
1584
1859
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.grantStateMachine">grantStateMachine</a></code> | An optional method that modifies the role of the state machine after all the tasks have been generated. |
1585
1860
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.status">status</a></code> | Return status of the runner provider to be used in the main status function. |
@@ -1594,6 +1869,27 @@ public toString(): string
1594
1869
 
1595
1870
  Returns a string representation of this construct.
1596
1871
 
1872
+ ##### ~~`with`~~ <a name="with" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.with"></a>
1873
+
1874
+ ```typescript
1875
+ public with(mixins: ...IMixin[]): IConstruct
1876
+ ```
1877
+
1878
+ Applies one or more mixins to this construct.
1879
+
1880
+ Mixins are applied in order. The list of constructs is captured at the
1881
+ start of the call, so constructs added by a mixin will not be visited.
1882
+ Use multiple `with()` calls if subsequent mixins should apply to added
1883
+ constructs.
1884
+
1885
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.with.parameter.mixins"></a>
1886
+
1887
+ - *Type:* ...constructs.IMixin[]
1888
+
1889
+ The mixins to apply.
1890
+
1891
+ ---
1892
+
1597
1893
  ##### ~~`getStepFunctionTask`~~ <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.getStepFunctionTask"></a>
1598
1894
 
1599
1895
  ```typescript
@@ -1877,6 +2173,7 @@ new Ec2RunnerProvider(scope: Construct, id: string, props?: Ec2RunnerProviderPro
1877
2173
  | **Name** | **Description** |
1878
2174
  | --- | --- |
1879
2175
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.toString">toString</a></code> | Returns a string representation of this construct. |
2176
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.with">with</a></code> | Applies one or more mixins to this construct. |
1880
2177
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
1881
2178
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.grantStateMachine">grantStateMachine</a></code> | An optional method that modifies the role of the state machine after all the tasks have been generated. |
1882
2179
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.status">status</a></code> | Return status of the runner provider to be used in the main status function. |
@@ -1891,6 +2188,27 @@ public toString(): string
1891
2188
 
1892
2189
  Returns a string representation of this construct.
1893
2190
 
2191
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.with"></a>
2192
+
2193
+ ```typescript
2194
+ public with(mixins: ...IMixin[]): IConstruct
2195
+ ```
2196
+
2197
+ Applies one or more mixins to this construct.
2198
+
2199
+ Mixins are applied in order. The list of constructs is captured at the
2200
+ start of the call, so constructs added by a mixin will not be visited.
2201
+ Use multiple `with()` calls if subsequent mixins should apply to added
2202
+ constructs.
2203
+
2204
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.with.parameter.mixins"></a>
2205
+
2206
+ - *Type:* ...constructs.IMixin[]
2207
+
2208
+ The mixins to apply.
2209
+
2210
+ ---
2211
+
1894
2212
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.getStepFunctionTask"></a>
1895
2213
 
1896
2214
  ```typescript
@@ -2166,6 +2484,7 @@ new EcsRunnerProvider(scope: Construct, id: string, props?: EcsRunnerProviderPro
2166
2484
  | **Name** | **Description** |
2167
2485
  | --- | --- |
2168
2486
  | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.toString">toString</a></code> | Returns a string representation of this construct. |
2487
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.with">with</a></code> | Applies one or more mixins to this construct. |
2169
2488
  | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
2170
2489
  | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.grantStateMachine">grantStateMachine</a></code> | An optional method that modifies the role of the state machine after all the tasks have been generated. |
2171
2490
  | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.status">status</a></code> | Return status of the runner provider to be used in the main status function. |
@@ -2180,6 +2499,27 @@ public toString(): string
2180
2499
 
2181
2500
  Returns a string representation of this construct.
2182
2501
 
2502
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.with"></a>
2503
+
2504
+ ```typescript
2505
+ public with(mixins: ...IMixin[]): IConstruct
2506
+ ```
2507
+
2508
+ Applies one or more mixins to this construct.
2509
+
2510
+ Mixins are applied in order. The list of constructs is captured at the
2511
+ start of the call, so constructs added by a mixin will not be visited.
2512
+ Use multiple `with()` calls if subsequent mixins should apply to added
2513
+ constructs.
2514
+
2515
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.with.parameter.mixins"></a>
2516
+
2517
+ - *Type:* ...constructs.IMixin[]
2518
+
2519
+ The mixins to apply.
2520
+
2521
+ ---
2522
+
2183
2523
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.getStepFunctionTask"></a>
2184
2524
 
2185
2525
  ```typescript
@@ -2459,6 +2799,7 @@ new FargateRunner(scope: Construct, id: string, props?: FargateRunnerProviderPro
2459
2799
  | **Name** | **Description** |
2460
2800
  | --- | --- |
2461
2801
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.toString">toString</a></code> | Returns a string representation of this construct. |
2802
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.with">with</a></code> | Applies one or more mixins to this construct. |
2462
2803
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
2463
2804
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.grantStateMachine">grantStateMachine</a></code> | An optional method that modifies the role of the state machine after all the tasks have been generated. |
2464
2805
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.status">status</a></code> | Return status of the runner provider to be used in the main status function. |
@@ -2473,6 +2814,27 @@ public toString(): string
2473
2814
 
2474
2815
  Returns a string representation of this construct.
2475
2816
 
2817
+ ##### ~~`with`~~ <a name="with" id="@cloudsnorkel/cdk-github-runners.FargateRunner.with"></a>
2818
+
2819
+ ```typescript
2820
+ public with(mixins: ...IMixin[]): IConstruct
2821
+ ```
2822
+
2823
+ Applies one or more mixins to this construct.
2824
+
2825
+ Mixins are applied in order. The list of constructs is captured at the
2826
+ start of the call, so constructs added by a mixin will not be visited.
2827
+ Use multiple `with()` calls if subsequent mixins should apply to added
2828
+ constructs.
2829
+
2830
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.FargateRunner.with.parameter.mixins"></a>
2831
+
2832
+ - *Type:* ...constructs.IMixin[]
2833
+
2834
+ The mixins to apply.
2835
+
2836
+ ---
2837
+
2476
2838
  ##### ~~`getStepFunctionTask`~~ <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.FargateRunner.getStepFunctionTask"></a>
2477
2839
 
2478
2840
  ```typescript
@@ -2926,6 +3288,7 @@ new FargateRunnerProvider(scope: Construct, id: string, props?: FargateRunnerPro
2926
3288
  | **Name** | **Description** |
2927
3289
  | --- | --- |
2928
3290
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.toString">toString</a></code> | Returns a string representation of this construct. |
3291
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.with">with</a></code> | Applies one or more mixins to this construct. |
2929
3292
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
2930
3293
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.grantStateMachine">grantStateMachine</a></code> | An optional method that modifies the role of the state machine after all the tasks have been generated. |
2931
3294
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.status">status</a></code> | Return status of the runner provider to be used in the main status function. |
@@ -2940,6 +3303,27 @@ public toString(): string
2940
3303
 
2941
3304
  Returns a string representation of this construct.
2942
3305
 
3306
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.with"></a>
3307
+
3308
+ ```typescript
3309
+ public with(mixins: ...IMixin[]): IConstruct
3310
+ ```
3311
+
3312
+ Applies one or more mixins to this construct.
3313
+
3314
+ Mixins are applied in order. The list of constructs is captured at the
3315
+ start of the call, so constructs added by a mixin will not be visited.
3316
+ Use multiple `with()` calls if subsequent mixins should apply to added
3317
+ constructs.
3318
+
3319
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.with.parameter.mixins"></a>
3320
+
3321
+ - *Type:* ...constructs.IMixin[]
3322
+
3323
+ The mixins to apply.
3324
+
3325
+ ---
3326
+
2943
3327
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.getStepFunctionTask"></a>
2944
3328
 
2945
3329
  ```typescript
@@ -3414,6 +3798,7 @@ new GitHubRunners(scope: Construct, id: string, props?: GitHubRunnersProps)
3414
3798
  | **Name** | **Description** |
3415
3799
  | --- | --- |
3416
3800
  | <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.toString">toString</a></code> | Returns a string representation of this construct. |
3801
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.with">with</a></code> | Applies one or more mixins to this construct. |
3417
3802
  | <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.createLogsInsightsQueries">createLogsInsightsQueries</a></code> | Creates CloudWatch Logs Insights saved queries that can be used to debug issues with the runners. |
3418
3803
  | <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.failedImageBuildsTopic">failedImageBuildsTopic</a></code> | Creates a topic for notifications when a runner image build fails. |
3419
3804
  | <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.metricFailed">metricFailed</a></code> | Metric for failed runner executions. |
@@ -3431,10 +3816,31 @@ public toString(): string
3431
3816
 
3432
3817
  Returns a string representation of this construct.
3433
3818
 
3819
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.with"></a>
3820
+
3821
+ ```typescript
3822
+ public with(mixins: ...IMixin[]): IConstruct
3823
+ ```
3824
+
3825
+ Applies one or more mixins to this construct.
3826
+
3827
+ Mixins are applied in order. The list of constructs is captured at the
3828
+ start of the call, so constructs added by a mixin will not be visited.
3829
+ Use multiple `with()` calls if subsequent mixins should apply to added
3830
+ constructs.
3831
+
3832
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.with.parameter.mixins"></a>
3833
+
3834
+ - *Type:* ...constructs.IMixin[]
3835
+
3836
+ The mixins to apply.
3837
+
3838
+ ---
3839
+
3434
3840
  ##### `createLogsInsightsQueries` <a name="createLogsInsightsQueries" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.createLogsInsightsQueries"></a>
3435
3841
 
3436
3842
  ```typescript
3437
- public createLogsInsightsQueries(): void
3843
+ public createLogsInsightsQueries(prefix?: string): void
3438
3844
  ```
3439
3845
 
3440
3846
  Creates CloudWatch Logs Insights saved queries that can be used to debug issues with the runners.
@@ -3443,6 +3849,17 @@ Creates CloudWatch Logs Insights saved queries that can be used to debug issues
3443
3849
  * "Ignored webhook" helps understand why runners aren't started
3444
3850
  * "Ignored jobs based on labels" helps debug label matching issues
3445
3851
  * "Webhook started runners" helps understand which runners were started
3852
+ * "Warm runner status" and "Warm runner errors" (when warm runners are configured)
3853
+
3854
+ ###### `prefix`<sup>Optional</sup> <a name="prefix" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.createLogsInsightsQueries.parameter.prefix"></a>
3855
+
3856
+ - *Type:* string
3857
+
3858
+ Prefix for the query definitions.
3859
+
3860
+ Defaults to "GitHub Runners".
3861
+
3862
+ ---
3446
3863
 
3447
3864
  ##### `failedImageBuildsTopic` <a name="failedImageBuildsTopic" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.failedImageBuildsTopic"></a>
3448
3865
 
@@ -3710,6 +4127,7 @@ new ImageBuilderComponent(scope: Construct, id: string, props: ImageBuilderCompo
3710
4127
  | **Name** | **Description** |
3711
4128
  | --- | --- |
3712
4129
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.toString">toString</a></code> | Returns a string representation of this construct. |
4130
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.with">with</a></code> | Applies one or more mixins to this construct. |
3713
4131
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.applyRemovalPolicy">applyRemovalPolicy</a></code> | Apply the given removal policy to this resource. |
3714
4132
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.grantAssetsRead">grantAssetsRead</a></code> | Grants read permissions to the principal on the assets buckets. |
3715
4133
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.prefixCommandsWithErrorHandling">prefixCommandsWithErrorHandling</a></code> | *No description.* |
@@ -3724,6 +4142,27 @@ public toString(): string
3724
4142
 
3725
4143
  Returns a string representation of this construct.
3726
4144
 
4145
+ ##### ~~`with`~~ <a name="with" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.with"></a>
4146
+
4147
+ ```typescript
4148
+ public with(mixins: ...IMixin[]): IConstruct
4149
+ ```
4150
+
4151
+ Applies one or more mixins to this construct.
4152
+
4153
+ Mixins are applied in order. The list of constructs is captured at the
4154
+ start of the call, so constructs added by a mixin will not be visited.
4155
+ Use multiple `with()` calls if subsequent mixins should apply to added
4156
+ constructs.
4157
+
4158
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.with.parameter.mixins"></a>
4159
+
4160
+ - *Type:* ...constructs.IMixin[]
4161
+
4162
+ The mixins to apply.
4163
+
4164
+ ---
4165
+
3727
4166
  ##### ~~`applyRemovalPolicy`~~ <a name="applyRemovalPolicy" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.applyRemovalPolicy"></a>
3728
4167
 
3729
4168
  ```typescript
@@ -3857,7 +4296,7 @@ Check whether the given construct is a Resource.
3857
4296
  | **Name** | **Type** | **Description** |
3858
4297
  | --- | --- | --- |
3859
4298
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
3860
- | <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. |
4299
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.property.env">env</a></code> | <code>aws-cdk-lib.interfaces.ResourceEnvironment</code> | The environment this resource belongs to. |
3861
4300
  | <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. |
3862
4301
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.property.arn">arn</a></code> | <code>string</code> | Component ARN. |
3863
4302
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.property.platform">platform</a></code> | <code>string</code> | Supported platform for the component. |
@@ -3886,16 +4325,17 @@ The tree node.
3886
4325
  public readonly env: ResourceEnvironment;
3887
4326
  ```
3888
4327
 
3889
- - *Type:* aws-cdk-lib.ResourceEnvironment
4328
+ - *Type:* aws-cdk-lib.interfaces.ResourceEnvironment
3890
4329
 
3891
4330
  The environment this resource belongs to.
3892
4331
 
3893
- For resources that are created and managed by the CDK
3894
- (generally, those created by creating new class instances like Role, Bucket, etc.),
3895
- this is always the same as the environment of the stack they belong to;
3896
- however, for imported resources
3897
- (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
3898
- that might be different than the stack they were imported into.
4332
+ For resources that are created and managed in a Stack (those created by
4333
+ creating new class instances like `new Role()`, `new Bucket()`, etc.), this
4334
+ is always the same as the environment of the stack they belong to.
4335
+
4336
+ For referenced resources (those obtained from referencing methods like
4337
+ `Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
4338
+ different than the stack they were imported into.
3899
4339
 
3900
4340
  ---
3901
4341
 
@@ -3983,6 +4423,7 @@ new LambdaRunner(scope: Construct, id: string, props?: LambdaRunnerProviderProps
3983
4423
  | **Name** | **Description** |
3984
4424
  | --- | --- |
3985
4425
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.toString">toString</a></code> | Returns a string representation of this construct. |
4426
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.with">with</a></code> | Applies one or more mixins to this construct. |
3986
4427
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
3987
4428
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.grantStateMachine">grantStateMachine</a></code> | An optional method that modifies the role of the state machine after all the tasks have been generated. |
3988
4429
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.status">status</a></code> | Return status of the runner provider to be used in the main status function. |
@@ -3997,6 +4438,27 @@ public toString(): string
3997
4438
 
3998
4439
  Returns a string representation of this construct.
3999
4440
 
4441
+ ##### ~~`with`~~ <a name="with" id="@cloudsnorkel/cdk-github-runners.LambdaRunner.with"></a>
4442
+
4443
+ ```typescript
4444
+ public with(mixins: ...IMixin[]): IConstruct
4445
+ ```
4446
+
4447
+ Applies one or more mixins to this construct.
4448
+
4449
+ Mixins are applied in order. The list of constructs is captured at the
4450
+ start of the call, so constructs added by a mixin will not be visited.
4451
+ Use multiple `with()` calls if subsequent mixins should apply to added
4452
+ constructs.
4453
+
4454
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.LambdaRunner.with.parameter.mixins"></a>
4455
+
4456
+ - *Type:* ...constructs.IMixin[]
4457
+
4458
+ The mixins to apply.
4459
+
4460
+ ---
4461
+
4000
4462
  ##### ~~`getStepFunctionTask`~~ <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.LambdaRunner.getStepFunctionTask"></a>
4001
4463
 
4002
4464
  ```typescript
@@ -4361,6 +4823,7 @@ new LambdaRunnerProvider(scope: Construct, id: string, props?: LambdaRunnerProvi
4361
4823
  | **Name** | **Description** |
4362
4824
  | --- | --- |
4363
4825
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.toString">toString</a></code> | Returns a string representation of this construct. |
4826
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.with">with</a></code> | Applies one or more mixins to this construct. |
4364
4827
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
4365
4828
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.grantStateMachine">grantStateMachine</a></code> | An optional method that modifies the role of the state machine after all the tasks have been generated. |
4366
4829
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.status">status</a></code> | Return status of the runner provider to be used in the main status function. |
@@ -4375,6 +4838,27 @@ public toString(): string
4375
4838
 
4376
4839
  Returns a string representation of this construct.
4377
4840
 
4841
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.with"></a>
4842
+
4843
+ ```typescript
4844
+ public with(mixins: ...IMixin[]): IConstruct
4845
+ ```
4846
+
4847
+ Applies one or more mixins to this construct.
4848
+
4849
+ Mixins are applied in order. The list of constructs is captured at the
4850
+ start of the call, so constructs added by a mixin will not be visited.
4851
+ Use multiple `with()` calls if subsequent mixins should apply to added
4852
+ constructs.
4853
+
4854
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.with.parameter.mixins"></a>
4855
+
4856
+ - *Type:* ...constructs.IMixin[]
4857
+
4858
+ The mixins to apply.
4859
+
4860
+ ---
4861
+
4378
4862
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.getStepFunctionTask"></a>
4379
4863
 
4380
4864
  ```typescript
@@ -4725,6 +5209,7 @@ new RunnerImageBuilder(scope: Construct, id: string, props?: RunnerImageBuilderP
4725
5209
  | **Name** | **Description** |
4726
5210
  | --- | --- |
4727
5211
  | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.toString">toString</a></code> | Returns a string representation of this construct. |
5212
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.with">with</a></code> | Applies one or more mixins to this construct. |
4728
5213
  | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.addComponent">addComponent</a></code> | Add a component to the image builder. |
4729
5214
  | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.bindAmi">bindAmi</a></code> | Build and return an AMI with GitHub Runner installed in it. |
4730
5215
  | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.bindDockerImage">bindDockerImage</a></code> | Build and return a Docker image with GitHub Runner installed in it. |
@@ -4740,6 +5225,27 @@ public toString(): string
4740
5225
 
4741
5226
  Returns a string representation of this construct.
4742
5227
 
5228
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.with"></a>
5229
+
5230
+ ```typescript
5231
+ public with(mixins: ...IMixin[]): IConstruct
5232
+ ```
5233
+
5234
+ Applies one or more mixins to this construct.
5235
+
5236
+ Mixins are applied in order. The list of constructs is captured at the
5237
+ start of the call, so constructs added by a mixin will not be visited.
5238
+ Use multiple `with()` calls if subsequent mixins should apply to added
5239
+ constructs.
5240
+
5241
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.with.parameter.mixins"></a>
5242
+
5243
+ - *Type:* ...constructs.IMixin[]
5244
+
5245
+ The mixins to apply.
5246
+
5247
+ ---
5248
+
4743
5249
  ##### `addComponent` <a name="addComponent" id="@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.addComponent"></a>
4744
5250
 
4745
5251
  ```typescript
@@ -4879,39 +5385,209 @@ The implementation will differ based on the OS, architecture, and requested buil
4879
5385
 
4880
5386
  ---
4881
5387
 
4882
- ##### `node`<sup>Required</sup> <a name="node" id="@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.property.node"></a>
5388
+ ##### `node`<sup>Required</sup> <a name="node" id="@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.property.node"></a>
5389
+
5390
+ ```typescript
5391
+ public readonly node: Node;
5392
+ ```
5393
+
5394
+ - *Type:* constructs.Node
5395
+
5396
+ The tree node.
5397
+
5398
+ ---
5399
+
5400
+ ##### `connections`<sup>Required</sup> <a name="connections" id="@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.property.connections"></a>
5401
+
5402
+ ```typescript
5403
+ public readonly connections: Connections;
5404
+ ```
5405
+
5406
+ - *Type:* aws-cdk-lib.aws_ec2.Connections
5407
+
5408
+ The network connections associated with this resource.
5409
+
5410
+ ---
5411
+
5412
+ ##### `grantPrincipal`<sup>Required</sup> <a name="grantPrincipal" id="@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.property.grantPrincipal"></a>
5413
+
5414
+ ```typescript
5415
+ public readonly grantPrincipal: IPrincipal;
5416
+ ```
5417
+
5418
+ - *Type:* aws-cdk-lib.aws_iam.IPrincipal
5419
+
5420
+ The principal to grant permissions to.
5421
+
5422
+ ---
5423
+
5424
+
5425
+ ### ScheduledWarmRunner <a name="ScheduledWarmRunner" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner"></a>
5426
+
5427
+ Warm runners active during a time window specified by start time (`schedule`) and duration (`duration`).
5428
+
5429
+ Runners will be provisioned using the specified provider and registered in the specified repository or organization.
5430
+
5431
+ Registration level must match the one selected during setup. See {@link SETUP_GITHUB.md } for more information on the selection.
5432
+
5433
+ ## Limitations
5434
+
5435
+ - **No deployment-fill**: Unlike `AlwaysOnWarmRunner`, scheduled warm runners do not get an initial
5436
+ fill on deploy. The first fill happens at the next schedule occurrence. If you deploy at 1pm for
5437
+ a 2pm schedule, runners will not appear until 2pm.
5438
+ - Jobs will still trigger provisioning of on-demand runners, even if a warm runner ends up being used.
5439
+ - You may briefly see more than `count` runners when changing config or at rotation.
5440
+ - To remove: set `count` to 0, deploy, wait for warm runners to stop, then remove and deploy again.
5441
+ If you don't follow this procedure, warm runners may linger until they expire.
5442
+ - Provider failures or timeouts (like Lambda provider timing out after 15 minutes) will result in a
5443
+ gap in coverage until the retry succeeds. Current retry mechanism has built-in back-off rate and
5444
+ can be tweaked using `retryOptions`. This will be improved in the future.
5445
+
5446
+ *Example*
5447
+
5448
+ ```typescript
5449
+ // Rate: fill every 12 hours
5450
+ new ScheduledWarmRunner(stack, 'Every 12 Hours', {
5451
+ runners,
5452
+ provider: myProvider,
5453
+ count: 2,
5454
+ owner: 'my-org',
5455
+ repo: 'my-repo',
5456
+ schedule: events.Schedule.rate(cdk.Duration.hours(5)),
5457
+ duration: cdk.Duration.hours(12),
5458
+ });
5459
+ ```
5460
+
5461
+
5462
+ #### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.Initializer"></a>
5463
+
5464
+ ```typescript
5465
+ import { ScheduledWarmRunner } from '@cloudsnorkel/cdk-github-runners'
5466
+
5467
+ new ScheduledWarmRunner(scope: Construct, id: string, props: ScheduledWarmRunnerProps)
5468
+ ```
5469
+
5470
+ | **Name** | **Type** | **Description** |
5471
+ | --- | --- | --- |
5472
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
5473
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
5474
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.Initializer.parameter.props">props</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps">ScheduledWarmRunnerProps</a></code> | *No description.* |
5475
+
5476
+ ---
5477
+
5478
+ ##### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.Initializer.parameter.scope"></a>
5479
+
5480
+ - *Type:* constructs.Construct
5481
+
5482
+ ---
5483
+
5484
+ ##### `id`<sup>Required</sup> <a name="id" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.Initializer.parameter.id"></a>
5485
+
5486
+ - *Type:* string
5487
+
5488
+ ---
5489
+
5490
+ ##### `props`<sup>Required</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.Initializer.parameter.props"></a>
5491
+
5492
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps">ScheduledWarmRunnerProps</a>
5493
+
5494
+ ---
5495
+
5496
+ #### Methods <a name="Methods" id="Methods"></a>
5497
+
5498
+ | **Name** | **Description** |
5499
+ | --- | --- |
5500
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.toString">toString</a></code> | Returns a string representation of this construct. |
5501
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.with">with</a></code> | Applies one or more mixins to this construct. |
5502
+
5503
+ ---
5504
+
5505
+ ##### `toString` <a name="toString" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.toString"></a>
5506
+
5507
+ ```typescript
5508
+ public toString(): string
5509
+ ```
5510
+
5511
+ Returns a string representation of this construct.
5512
+
5513
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.with"></a>
5514
+
5515
+ ```typescript
5516
+ public with(mixins: ...IMixin[]): IConstruct
5517
+ ```
5518
+
5519
+ Applies one or more mixins to this construct.
5520
+
5521
+ Mixins are applied in order. The list of constructs is captured at the
5522
+ start of the call, so constructs added by a mixin will not be visited.
5523
+ Use multiple `with()` calls if subsequent mixins should apply to added
5524
+ constructs.
5525
+
5526
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.with.parameter.mixins"></a>
5527
+
5528
+ - *Type:* ...constructs.IMixin[]
5529
+
5530
+ The mixins to apply.
5531
+
5532
+ ---
5533
+
5534
+ #### Static Functions <a name="Static Functions" id="Static Functions"></a>
5535
+
5536
+ | **Name** | **Description** |
5537
+ | --- | --- |
5538
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
5539
+
5540
+ ---
5541
+
5542
+ ##### `isConstruct` <a name="isConstruct" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.isConstruct"></a>
4883
5543
 
4884
5544
  ```typescript
4885
- public readonly node: Node;
5545
+ import { ScheduledWarmRunner } from '@cloudsnorkel/cdk-github-runners'
5546
+
5547
+ ScheduledWarmRunner.isConstruct(x: any)
4886
5548
  ```
4887
5549
 
4888
- - *Type:* constructs.Node
5550
+ Checks if `x` is a construct.
4889
5551
 
4890
- The tree node.
5552
+ Use this method instead of `instanceof` to properly detect `Construct`
5553
+ instances, even when the construct library is symlinked.
4891
5554
 
4892
- ---
5555
+ Explanation: in JavaScript, multiple copies of the `constructs` library on
5556
+ disk are seen as independent, completely different libraries. As a
5557
+ consequence, the class `Construct` in each copy of the `constructs` library
5558
+ is seen as a different class, and an instance of one class will not test as
5559
+ `instanceof` the other class. `npm install` will not create installations
5560
+ like this, but users may manually symlink construct libraries together or
5561
+ use a monorepo tool: in those cases, multiple copies of the `constructs`
5562
+ library can be accidentally installed, and `instanceof` will behave
5563
+ unpredictably. It is safest to avoid using `instanceof`, and using
5564
+ this type-testing method instead.
4893
5565
 
4894
- ##### `connections`<sup>Required</sup> <a name="connections" id="@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.property.connections"></a>
5566
+ ###### `x`<sup>Required</sup> <a name="x" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.isConstruct.parameter.x"></a>
4895
5567
 
4896
- ```typescript
4897
- public readonly connections: Connections;
4898
- ```
5568
+ - *Type:* any
4899
5569
 
4900
- - *Type:* aws-cdk-lib.aws_ec2.Connections
5570
+ Any object.
4901
5571
 
4902
- The network connections associated with this resource.
5572
+ ---
5573
+
5574
+ #### Properties <a name="Properties" id="Properties"></a>
5575
+
5576
+ | **Name** | **Type** | **Description** |
5577
+ | --- | --- | --- |
5578
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
4903
5579
 
4904
5580
  ---
4905
5581
 
4906
- ##### `grantPrincipal`<sup>Required</sup> <a name="grantPrincipal" id="@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.property.grantPrincipal"></a>
5582
+ ##### `node`<sup>Required</sup> <a name="node" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.property.node"></a>
4907
5583
 
4908
5584
  ```typescript
4909
- public readonly grantPrincipal: IPrincipal;
5585
+ public readonly node: Node;
4910
5586
  ```
4911
5587
 
4912
- - *Type:* aws-cdk-lib.aws_iam.IPrincipal
5588
+ - *Type:* constructs.Node
4913
5589
 
4914
- The principal to grant permissions to.
5590
+ The tree node.
4915
5591
 
4916
5592
  ---
4917
5593
 
@@ -4952,6 +5628,7 @@ new Secrets(scope: Construct, id: string)
4952
5628
  | **Name** | **Description** |
4953
5629
  | --- | --- |
4954
5630
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Secrets.toString">toString</a></code> | Returns a string representation of this construct. |
5631
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Secrets.with">with</a></code> | Applies one or more mixins to this construct. |
4955
5632
 
4956
5633
  ---
4957
5634
 
@@ -4963,6 +5640,27 @@ public toString(): string
4963
5640
 
4964
5641
  Returns a string representation of this construct.
4965
5642
 
5643
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.Secrets.with"></a>
5644
+
5645
+ ```typescript
5646
+ public with(mixins: ...IMixin[]): IConstruct
5647
+ ```
5648
+
5649
+ Applies one or more mixins to this construct.
5650
+
5651
+ Mixins are applied in order. The list of constructs is captured at the
5652
+ start of the call, so constructs added by a mixin will not be visited.
5653
+ Use multiple `with()` calls if subsequent mixins should apply to added
5654
+ constructs.
5655
+
5656
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.Secrets.with.parameter.mixins"></a>
5657
+
5658
+ - *Type:* ...constructs.IMixin[]
5659
+
5660
+ The mixins to apply.
5661
+
5662
+ ---
5663
+
4966
5664
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
4967
5665
 
4968
5666
  | **Name** | **Description** |
@@ -5087,6 +5785,113 @@ Webhook secret used to confirm events are coming from GitHub and nowhere else.
5087
5785
 
5088
5786
  ## Structs <a name="Structs" id="Structs"></a>
5089
5787
 
5788
+ ### AlwaysOnWarmRunnerProps <a name="AlwaysOnWarmRunnerProps" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps"></a>
5789
+
5790
+ Properties for always on warm runners.
5791
+
5792
+ #### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.Initializer"></a>
5793
+
5794
+ ```typescript
5795
+ import { AlwaysOnWarmRunnerProps } from '@cloudsnorkel/cdk-github-runners'
5796
+
5797
+ const alwaysOnWarmRunnerProps: AlwaysOnWarmRunnerProps = { ... }
5798
+ ```
5799
+
5800
+ #### Properties <a name="Properties" id="Properties"></a>
5801
+
5802
+ | **Name** | **Type** | **Description** |
5803
+ | --- | --- | --- |
5804
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.count">count</a></code> | <code>number</code> | Number of warm runners to maintain. |
5805
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.owner">owner</a></code> | <code>string</code> | GitHub owner where runners will be registered (org or user login). |
5806
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.provider">provider</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a> \| <a href="#@cloudsnorkel/cdk-github-runners.ICompositeProvider">ICompositeProvider</a></code> | Provider to use. |
5807
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.runners">runners</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners">GitHubRunners</a></code> | The GitHubRunners construct that owns the shared warm runner infrastructure. |
5808
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.registrationLevel">registrationLevel</a></code> | <code>string</code> | Registration level — must match how your runners are set up in GitHub. |
5809
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.repo">repo</a></code> | <code>string</code> | Repository name (without owner) where runners will be registered. |
5810
+
5811
+ ---
5812
+
5813
+ ##### `count`<sup>Required</sup> <a name="count" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.count"></a>
5814
+
5815
+ ```typescript
5816
+ public readonly count: number;
5817
+ ```
5818
+
5819
+ - *Type:* number
5820
+
5821
+ Number of warm runners to maintain.
5822
+
5823
+ ---
5824
+
5825
+ ##### `owner`<sup>Required</sup> <a name="owner" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.owner"></a>
5826
+
5827
+ ```typescript
5828
+ public readonly owner: string;
5829
+ ```
5830
+
5831
+ - *Type:* string
5832
+
5833
+ GitHub owner where runners will be registered (org or user login).
5834
+
5835
+ ---
5836
+
5837
+ ##### `provider`<sup>Required</sup> <a name="provider" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.provider"></a>
5838
+
5839
+ ```typescript
5840
+ public readonly provider: IRunnerProvider | ICompositeProvider;
5841
+ ```
5842
+
5843
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a> | <a href="#@cloudsnorkel/cdk-github-runners.ICompositeProvider">ICompositeProvider</a>
5844
+
5845
+ Provider to use.
5846
+
5847
+ Warm runners bypass the provider selector — they always use
5848
+ this provider, regardless of job characteristics. Labels cannot be modified.
5849
+
5850
+ ---
5851
+
5852
+ ##### `runners`<sup>Required</sup> <a name="runners" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.runners"></a>
5853
+
5854
+ ```typescript
5855
+ public readonly runners: GitHubRunners;
5856
+ ```
5857
+
5858
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners">GitHubRunners</a>
5859
+
5860
+ The GitHubRunners construct that owns the shared warm runner infrastructure.
5861
+
5862
+ ---
5863
+
5864
+ ##### `registrationLevel`<sup>Optional</sup> <a name="registrationLevel" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.registrationLevel"></a>
5865
+
5866
+ ```typescript
5867
+ public readonly registrationLevel: string;
5868
+ ```
5869
+
5870
+ - *Type:* string
5871
+ - *Default:* 'repo'
5872
+
5873
+ Registration level — must match how your runners are set up in GitHub.
5874
+
5875
+ Choose
5876
+ 'org' for org-wide runners, 'repo' for repo-level. See the setup wizard or
5877
+ {@link SETUP_GITHUB.md } for choosing repo vs org.
5878
+
5879
+ ---
5880
+
5881
+ ##### `repo`<sup>Optional</sup> <a name="repo" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.repo"></a>
5882
+
5883
+ ```typescript
5884
+ public readonly repo: string;
5885
+ ```
5886
+
5887
+ - *Type:* string
5888
+
5889
+ Repository name (without owner) where runners will be registered.
5890
+
5891
+ Required when `registrationLevel` is 'repo'.
5892
+
5893
+ ---
5894
+
5090
5895
  ### AmiBuilderProps <a name="AmiBuilderProps" id="@cloudsnorkel/cdk-github-runners.AmiBuilderProps"></a>
5091
5896
 
5092
5897
  Properties for {@link AmiBuilder} construct.
@@ -5752,6 +6557,7 @@ const codeBuildRunnerProviderProps: CodeBuildRunnerProviderProps = { ... }
5752
6557
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProviderProps.property.retryOptions">retryOptions</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.ProviderRetryOptions">ProviderRetryOptions</a></code> | *No description.* |
5753
6558
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProviderProps.property.computeType">computeType</a></code> | <code>aws-cdk-lib.aws_codebuild.ComputeType</code> | The type of compute to use for this build. See the {@link ComputeType} enum for the possible values. |
5754
6559
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProviderProps.property.dockerInDocker">dockerInDocker</a></code> | <code>boolean</code> | Support building and running Docker images by enabling Docker-in-Docker (dind) and the required CodeBuild privileged mode. |
6560
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProviderProps.property.gpu">gpu</a></code> | <code>boolean</code> | Use GPU compute for builds. |
5755
6561
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProviderProps.property.group">group</a></code> | <code>string</code> | GitHub Actions runner group name. |
5756
6562
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProviderProps.property.imageBuilder">imageBuilder</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerImageBuilder">IRunnerImageBuilder</a></code> | Runner image builder used to build Docker images containing GitHub Runner and all requirements. |
5757
6563
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProviderProps.property.label">label</a></code> | <code>string</code> | GitHub Actions label used for this provider. |
@@ -5847,6 +6653,31 @@ speed up provisioning of CodeBuild runners. If you don't intend on running or bu
5847
6653
 
5848
6654
  ---
5849
6655
 
6656
+ ##### `gpu`<sup>Optional</sup> <a name="gpu" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProviderProps.property.gpu"></a>
6657
+
6658
+ ```typescript
6659
+ public readonly gpu: boolean;
6660
+ ```
6661
+
6662
+ - *Type:* boolean
6663
+ - *Default:* false
6664
+
6665
+ Use GPU compute for builds.
6666
+
6667
+ When enabled, the default compute type is BUILD_GENERAL1_SMALL (4 vCPU, 16 GB RAM, 1 NVIDIA A10G GPU).
6668
+
6669
+ You can override the compute type using the `computeType` property (for example, to use BUILD_GENERAL1_LARGE for more resources),
6670
+ subject to the supported GPU compute types.
6671
+
6672
+ When using GPU compute, ensure your runner image includes any required GPU libraries (for example, CUDA)
6673
+ either by using a base image that has them preinstalled (such as an appropriate nvidia/cuda image) or by
6674
+ adding image components that install them. The default image builder does not automatically switch to a
6675
+ CUDA-enabled base image when GPU is enabled.
6676
+
6677
+ GPU compute is only available for Linux x64 images. Not supported on Windows or ARM.
6678
+
6679
+ ---
6680
+
5850
6681
  ##### `group`<sup>Optional</sup> <a name="group" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProviderProps.property.group"></a>
5851
6682
 
5852
6683
  ```typescript
@@ -6327,6 +7158,11 @@ public readonly instanceType: InstanceType;
6327
7158
 
6328
7159
  Instance type for launched runner instances.
6329
7160
 
7161
+ For GPU instance types (g4dn, g5, p3, etc.), we automatically use a GPU base image (AWS Deep Learning AMI)
7162
+ with NVIDIA drivers pre-installed. If you provide your own image builder, use
7163
+ `baseAmi: BaseImage.fromGpuBase(os, architecture)` or another image preloaded with NVIDIA drivers, or use
7164
+ an image component to install NVIDIA drivers.
7165
+
6330
7166
  ---
6331
7167
 
6332
7168
  ##### `labels`<sup>Optional</sup> <a name="labels" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProviderProps.property.labels"></a>
@@ -6496,6 +7332,7 @@ const ecsRunnerProviderProps: EcsRunnerProviderProps = { ... }
6496
7332
  | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.cluster">cluster</a></code> | <code>aws-cdk-lib.aws_ecs.Cluster</code> | Existing ECS cluster to use. |
6497
7333
  | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.cpu">cpu</a></code> | <code>number</code> | The number of cpu units used by the task. |
6498
7334
  | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.dockerInDocker">dockerInDocker</a></code> | <code>boolean</code> | Support building and running Docker images by enabling Docker-in-Docker (dind) and the required CodeBuild privileged mode. |
7335
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.gpu">gpu</a></code> | <code>number</code> | Number of GPUs to request for the runner task. When set, the task will be scheduled on GPU-capable instances. |
6499
7336
  | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.group">group</a></code> | <code>string</code> | GitHub Actions runner group name. |
6500
7337
  | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.imageBuilder">imageBuilder</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerImageBuilder">IRunnerImageBuilder</a></code> | Runner image builder used to build Docker images containing GitHub Runner and all requirements. |
6501
7338
  | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.instanceType">instanceType</a></code> | <code>aws-cdk-lib.aws_ec2.InstanceType</code> | Instance type of ECS cluster instances. |
@@ -6634,6 +7471,26 @@ speed up provisioning of CodeBuild runners. If you don't intend on running or bu
6634
7471
 
6635
7472
  ---
6636
7473
 
7474
+ ##### `gpu`<sup>Optional</sup> <a name="gpu" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.gpu"></a>
7475
+
7476
+ ```typescript
7477
+ public readonly gpu: number;
7478
+ ```
7479
+
7480
+ - *Type:* number
7481
+ - *Default:* undefined (no GPU)
7482
+
7483
+ Number of GPUs to request for the runner task. When set, the task will be scheduled on GPU-capable instances.
7484
+
7485
+ Requires a GPU-capable instance type (e.g., g4dn.xlarge for 1 GPU, g4dn.12xlarge for 4 GPUs) and GPU AMI.
7486
+ When creating a new cluster, instanceType defaults to g4dn.xlarge and the ECS Optimized GPU AMI is used.
7487
+
7488
+ You must ensure that the task's container image includes the CUDA runtime. Provide a CUDA-enabled base image
7489
+ via `baseDockerImage`, use an image builder that starts from a GPU-capable image (such as nvidia/cuda), or add
7490
+ an image component that installs the CUDA runtime into the image.
7491
+
7492
+ ---
7493
+
6637
7494
  ##### `group`<sup>Optional</sup> <a name="group" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.group"></a>
6638
7495
 
6639
7496
  ```typescript
@@ -9043,6 +9900,142 @@ Path to runner token used to register token.
9043
9900
 
9044
9901
  ---
9045
9902
 
9903
+ ### ScheduledWarmRunnerProps <a name="ScheduledWarmRunnerProps" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps"></a>
9904
+
9905
+ Properties for scheduled warm runners.
9906
+
9907
+ #### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.Initializer"></a>
9908
+
9909
+ ```typescript
9910
+ import { ScheduledWarmRunnerProps } from '@cloudsnorkel/cdk-github-runners'
9911
+
9912
+ const scheduledWarmRunnerProps: ScheduledWarmRunnerProps = { ... }
9913
+ ```
9914
+
9915
+ #### Properties <a name="Properties" id="Properties"></a>
9916
+
9917
+ | **Name** | **Type** | **Description** |
9918
+ | --- | --- | --- |
9919
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.count">count</a></code> | <code>number</code> | Number of warm runners to maintain. |
9920
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.duration">duration</a></code> | <code>aws-cdk-lib.Duration</code> | How long the warm runners should be maintained from the fill time (schedule). |
9921
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.owner">owner</a></code> | <code>string</code> | GitHub owner where runners will be registered (org or user login). |
9922
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.provider">provider</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a> \| <a href="#@cloudsnorkel/cdk-github-runners.ICompositeProvider">ICompositeProvider</a></code> | Provider to use. |
9923
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.runners">runners</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners">GitHubRunners</a></code> | The GitHubRunners construct that owns the shared warm runner infrastructure. |
9924
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.schedule">schedule</a></code> | <code>aws-cdk-lib.aws_events.Schedule</code> | When to start filling the pool (e.g. start of business hours). |
9925
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.registrationLevel">registrationLevel</a></code> | <code>string</code> | Registration level — must match how your runners are set up in GitHub. |
9926
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.repo">repo</a></code> | <code>string</code> | Repository name (without owner) where runners will be registered. |
9927
+
9928
+ ---
9929
+
9930
+ ##### `count`<sup>Required</sup> <a name="count" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.count"></a>
9931
+
9932
+ ```typescript
9933
+ public readonly count: number;
9934
+ ```
9935
+
9936
+ - *Type:* number
9937
+
9938
+ Number of warm runners to maintain.
9939
+
9940
+ ---
9941
+
9942
+ ##### `duration`<sup>Required</sup> <a name="duration" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.duration"></a>
9943
+
9944
+ ```typescript
9945
+ public readonly duration: Duration;
9946
+ ```
9947
+
9948
+ - *Type:* aws-cdk-lib.Duration
9949
+
9950
+ How long the warm runners should be maintained from the fill time (schedule).
9951
+
9952
+ Defines the end of the
9953
+ window (schedule time + duration).
9954
+
9955
+ ---
9956
+
9957
+ ##### `owner`<sup>Required</sup> <a name="owner" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.owner"></a>
9958
+
9959
+ ```typescript
9960
+ public readonly owner: string;
9961
+ ```
9962
+
9963
+ - *Type:* string
9964
+
9965
+ GitHub owner where runners will be registered (org or user login).
9966
+
9967
+ ---
9968
+
9969
+ ##### `provider`<sup>Required</sup> <a name="provider" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.provider"></a>
9970
+
9971
+ ```typescript
9972
+ public readonly provider: IRunnerProvider | ICompositeProvider;
9973
+ ```
9974
+
9975
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a> | <a href="#@cloudsnorkel/cdk-github-runners.ICompositeProvider">ICompositeProvider</a>
9976
+
9977
+ Provider to use.
9978
+
9979
+ Warm runners bypass the provider selector — they always use
9980
+ this provider, regardless of job characteristics. Labels cannot be modified.
9981
+
9982
+ ---
9983
+
9984
+ ##### `runners`<sup>Required</sup> <a name="runners" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.runners"></a>
9985
+
9986
+ ```typescript
9987
+ public readonly runners: GitHubRunners;
9988
+ ```
9989
+
9990
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners">GitHubRunners</a>
9991
+
9992
+ The GitHubRunners construct that owns the shared warm runner infrastructure.
9993
+
9994
+ ---
9995
+
9996
+ ##### `schedule`<sup>Required</sup> <a name="schedule" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.schedule"></a>
9997
+
9998
+ ```typescript
9999
+ public readonly schedule: Schedule;
10000
+ ```
10001
+
10002
+ - *Type:* aws-cdk-lib.aws_events.Schedule
10003
+
10004
+ When to start filling the pool (e.g. start of business hours).
10005
+
10006
+ ---
10007
+
10008
+ ##### `registrationLevel`<sup>Optional</sup> <a name="registrationLevel" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.registrationLevel"></a>
10009
+
10010
+ ```typescript
10011
+ public readonly registrationLevel: string;
10012
+ ```
10013
+
10014
+ - *Type:* string
10015
+ - *Default:* 'repo'
10016
+
10017
+ Registration level — must match how your runners are set up in GitHub.
10018
+
10019
+ Choose
10020
+ 'org' for org-wide runners, 'repo' for repo-level. See the setup wizard or
10021
+ {@link SETUP_GITHUB.md } for choosing repo vs org.
10022
+
10023
+ ---
10024
+
10025
+ ##### `repo`<sup>Optional</sup> <a name="repo" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.repo"></a>
10026
+
10027
+ ```typescript
10028
+ public readonly repo: string;
10029
+ ```
10030
+
10031
+ - *Type:* string
10032
+
10033
+ Repository name (without owner) where runners will be registered.
10034
+
10035
+ Required when `registrationLevel` is 'repo'.
10036
+
10037
+ ---
10038
+
9046
10039
  ### StorageOptions <a name="StorageOptions" id="@cloudsnorkel/cdk-github-runners.StorageOptions"></a>
9047
10040
 
9048
10041
  Storage options for the runner instance.
@@ -9499,6 +10492,7 @@ new BaseImage(image: string)
9499
10492
  | **Name** | **Description** |
9500
10493
  | --- | --- |
9501
10494
  | <code><a href="#@cloudsnorkel/cdk-github-runners.BaseImage.fromAmiId">fromAmiId</a></code> | The AMI ID to use as a base image in an image recipe. |
10495
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.BaseImage.fromGpuBase">fromGpuBase</a></code> | A base AMI with NVIDIA drivers pre-installed for GPU workloads. |
9502
10496
  | <code><a href="#@cloudsnorkel/cdk-github-runners.BaseImage.fromImageBuilder">fromImageBuilder</a></code> | An AWS-provided EC2 Image Builder image to use as a base image in an image recipe. |
9503
10497
  | <code><a href="#@cloudsnorkel/cdk-github-runners.BaseImage.fromMarketplaceProductId">fromMarketplaceProductId</a></code> | The marketplace product ID for an AMI product to use as the base image in an image recipe. |
9504
10498
  | <code><a href="#@cloudsnorkel/cdk-github-runners.BaseImage.fromSsmParameter">fromSsmParameter</a></code> | The SSM parameter to use as the base image in an image recipe. |
@@ -9525,6 +10519,36 @@ The AMI ID to use as the base image.
9525
10519
 
9526
10520
  ---
9527
10521
 
10522
+ ##### `fromGpuBase` <a name="fromGpuBase" id="@cloudsnorkel/cdk-github-runners.BaseImage.fromGpuBase"></a>
10523
+
10524
+ ```typescript
10525
+ import { BaseImage } from '@cloudsnorkel/cdk-github-runners'
10526
+
10527
+ BaseImage.fromGpuBase(os: Os, architecture: Architecture)
10528
+ ```
10529
+
10530
+ A base AMI with NVIDIA drivers pre-installed for GPU workloads.
10531
+
10532
+ Uses AWS Deep Learning AMIs for Linux (Ubuntu, Amazon Linux 2, Amazon Linux 2023).
10533
+ For Windows, subscribe to NVIDIA RTX Virtual Workstation in AWS Marketplace, then use
10534
+ {@link fromMarketplaceProductId} with the product ID.
10535
+
10536
+ ###### `os`<sup>Required</sup> <a name="os" id="@cloudsnorkel/cdk-github-runners.BaseImage.fromGpuBase.parameter.os"></a>
10537
+
10538
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a>
10539
+
10540
+ Target operating system.
10541
+
10542
+ ---
10543
+
10544
+ ###### `architecture`<sup>Required</sup> <a name="architecture" id="@cloudsnorkel/cdk-github-runners.BaseImage.fromGpuBase.parameter.architecture"></a>
10545
+
10546
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a>
10547
+
10548
+ Target architecture.
10549
+
10550
+ ---
10551
+
9528
10552
  ##### `fromImageBuilder` <a name="fromImageBuilder" id="@cloudsnorkel/cdk-github-runners.BaseImage.fromImageBuilder"></a>
9529
10553
 
9530
10554
  ```typescript