@cloudsnorkel/cdk-github-runners 0.14.24 → 0.15.1

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 (142) hide show
  1. package/.jsii +5953 -602
  2. package/API.md +1349 -115
  3. package/README.md +53 -1
  4. package/assets/delete-failed-runner.lambda/index.js +122 -9
  5. package/assets/idle-runner-repear.lambda/index.js +153 -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 +118 -8
  11. package/assets/status.lambda/index.js +121 -8
  12. package/assets/token-retriever.lambda/index.js +121 -8
  13. package/assets/warm-runner-manager.lambda/index.js +5909 -0
  14. package/assets/webhook-handler.lambda/index.js +126 -11
  15. package/assets/webhook-redelivery.lambda/index.js +139 -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 +18 -2
  39. package/lib/providers/codebuild.js +15 -4
  40. package/lib/providers/common.d.ts +47 -3
  41. package/lib/providers/common.js +29 -5
  42. package/lib/providers/composite.js +14 -19
  43. package/lib/providers/ec2.d.ts +9 -2
  44. package/lib/providers/ec2.js +84 -42
  45. package/lib/providers/ecs.d.ts +19 -2
  46. package/lib/providers/ecs.js +49 -44
  47. package/lib/providers/fargate.d.ts +2 -2
  48. package/lib/providers/fargate.js +19 -36
  49. package/lib/providers/lambda.d.ts +2 -2
  50. package/lib/providers/lambda.js +3 -3
  51. package/lib/runner.d.ts +31 -3
  52. package/lib/runner.js +171 -46
  53. package/lib/secrets.js +1 -1
  54. package/lib/setup.lambda.js +2 -2
  55. package/lib/utils.d.ts +10 -1
  56. package/lib/utils.js +15 -1
  57. package/lib/warm-runner-manager-function.d.ts +18 -0
  58. package/lib/warm-runner-manager-function.js +24 -0
  59. package/lib/warm-runner-manager.lambda.d.ts +41 -0
  60. package/lib/warm-runner-manager.lambda.js +487 -0
  61. package/lib/warm-runner.d.ts +155 -0
  62. package/lib/warm-runner.js +217 -0
  63. package/lib/webhook-handler.lambda.js +5 -3
  64. package/lib/webhook-redelivery.lambda.js +17 -16
  65. package/lib/webhook.d.ts +4 -0
  66. package/lib/webhook.js +2 -1
  67. package/node_modules/cron-parser/LICENSE +21 -0
  68. package/node_modules/cron-parser/README.md +408 -0
  69. package/node_modules/cron-parser/dist/CronDate.js +518 -0
  70. package/node_modules/cron-parser/dist/CronExpression.js +520 -0
  71. package/node_modules/cron-parser/dist/CronExpressionParser.js +382 -0
  72. package/node_modules/cron-parser/dist/CronFieldCollection.js +371 -0
  73. package/node_modules/cron-parser/dist/CronFileParser.js +109 -0
  74. package/node_modules/cron-parser/dist/fields/CronDayOfMonth.js +44 -0
  75. package/node_modules/cron-parser/dist/fields/CronDayOfWeek.js +51 -0
  76. package/node_modules/cron-parser/dist/fields/CronField.js +214 -0
  77. package/node_modules/cron-parser/dist/fields/CronHour.js +40 -0
  78. package/node_modules/cron-parser/dist/fields/CronMinute.js +40 -0
  79. package/node_modules/cron-parser/dist/fields/CronMonth.js +44 -0
  80. package/node_modules/cron-parser/dist/fields/CronSecond.js +40 -0
  81. package/node_modules/cron-parser/dist/fields/index.js +24 -0
  82. package/node_modules/cron-parser/dist/fields/types.js +2 -0
  83. package/node_modules/cron-parser/dist/index.js +31 -0
  84. package/node_modules/cron-parser/dist/types/CronDate.d.ts +288 -0
  85. package/node_modules/cron-parser/dist/types/CronExpression.d.ts +118 -0
  86. package/node_modules/cron-parser/dist/types/CronExpressionParser.d.ts +70 -0
  87. package/node_modules/cron-parser/dist/types/CronFieldCollection.d.ts +153 -0
  88. package/node_modules/cron-parser/dist/types/CronFileParser.d.ts +30 -0
  89. package/node_modules/cron-parser/dist/types/fields/CronDayOfMonth.d.ts +25 -0
  90. package/node_modules/cron-parser/dist/types/fields/CronDayOfWeek.d.ts +30 -0
  91. package/node_modules/cron-parser/dist/types/fields/CronField.d.ts +130 -0
  92. package/node_modules/cron-parser/dist/types/fields/CronHour.d.ts +23 -0
  93. package/node_modules/cron-parser/dist/types/fields/CronMinute.d.ts +23 -0
  94. package/node_modules/cron-parser/dist/types/fields/CronMonth.d.ts +24 -0
  95. package/node_modules/cron-parser/dist/types/fields/CronSecond.d.ts +23 -0
  96. package/node_modules/cron-parser/dist/types/fields/index.d.ts +8 -0
  97. package/node_modules/cron-parser/dist/types/fields/types.d.ts +18 -0
  98. package/node_modules/cron-parser/dist/types/index.d.ts +8 -0
  99. package/node_modules/cron-parser/dist/types/utils/random.d.ts +10 -0
  100. package/node_modules/cron-parser/dist/utils/random.js +38 -0
  101. package/node_modules/cron-parser/package.json +117 -0
  102. package/node_modules/luxon/LICENSE.md +7 -0
  103. package/node_modules/luxon/README.md +55 -0
  104. package/node_modules/luxon/build/amd/luxon.js +8741 -0
  105. package/node_modules/luxon/build/amd/luxon.js.map +1 -0
  106. package/node_modules/luxon/build/cjs-browser/luxon.js +8739 -0
  107. package/node_modules/luxon/build/cjs-browser/luxon.js.map +1 -0
  108. package/node_modules/luxon/build/es6/luxon.mjs +8133 -0
  109. package/node_modules/luxon/build/es6/luxon.mjs.map +1 -0
  110. package/node_modules/luxon/build/global/luxon.js +8744 -0
  111. package/node_modules/luxon/build/global/luxon.js.map +1 -0
  112. package/node_modules/luxon/build/global/luxon.min.js +1 -0
  113. package/node_modules/luxon/build/global/luxon.min.js.map +1 -0
  114. package/node_modules/luxon/build/node/luxon.js +7792 -0
  115. package/node_modules/luxon/build/node/luxon.js.map +1 -0
  116. package/node_modules/luxon/package.json +87 -0
  117. package/node_modules/luxon/src/datetime.js +2603 -0
  118. package/node_modules/luxon/src/duration.js +1009 -0
  119. package/node_modules/luxon/src/errors.js +61 -0
  120. package/node_modules/luxon/src/impl/conversions.js +206 -0
  121. package/node_modules/luxon/src/impl/diff.js +95 -0
  122. package/node_modules/luxon/src/impl/digits.js +94 -0
  123. package/node_modules/luxon/src/impl/english.js +233 -0
  124. package/node_modules/luxon/src/impl/formats.js +176 -0
  125. package/node_modules/luxon/src/impl/formatter.js +434 -0
  126. package/node_modules/luxon/src/impl/invalid.js +14 -0
  127. package/node_modules/luxon/src/impl/locale.js +569 -0
  128. package/node_modules/luxon/src/impl/regexParser.js +335 -0
  129. package/node_modules/luxon/src/impl/tokenParser.js +505 -0
  130. package/node_modules/luxon/src/impl/util.js +330 -0
  131. package/node_modules/luxon/src/impl/zoneUtil.js +34 -0
  132. package/node_modules/luxon/src/info.js +205 -0
  133. package/node_modules/luxon/src/interval.js +669 -0
  134. package/node_modules/luxon/src/luxon.js +26 -0
  135. package/node_modules/luxon/src/package.json +4 -0
  136. package/node_modules/luxon/src/settings.js +180 -0
  137. package/node_modules/luxon/src/zone.js +97 -0
  138. package/node_modules/luxon/src/zones/IANAZone.js +235 -0
  139. package/node_modules/luxon/src/zones/fixedOffsetZone.js +150 -0
  140. package/node_modules/luxon/src/zones/invalidZone.js +53 -0
  141. package/node_modules/luxon/src/zones/systemZone.js +61 -0
  142. package/package.json +33 -24
package/API.md CHANGED
@@ -2,6 +2,189 @@
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.
12
+
13
+ > [https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md
14
+
15
+ ## Limitations
16
+
17
+ - Jobs will still trigger provisioning of on-demand runners, even if a warm runner ends up being used.
18
+ - You may briefly see more than `count` runners when changing config or at rotation.
19
+ - To remove: set `count` to 0, deploy, wait for warm runners to stop, then remove and deploy again.
20
+ If you don't follow this procedure, warm runners may linger until they expire.
21
+ - Provider failures or timeouts (like Lambda provider timing out after 15 minutes) will result in a
22
+ gap in coverage until the retry succeeds. Current retry mechanism has built-in back-off rate and
23
+ can be tweaked using `retryOptions`. This will be improved in the future.
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
+ ```](https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md
34
+
35
+ ## Limitations
36
+
37
+ - Jobs will still trigger provisioning of on-demand runners, even if a warm runner ends up being used.
38
+ - You may briefly see more than `count` runners when changing config or at rotation.
39
+ - To remove: set `count` to 0, deploy, wait for warm runners to stop, then remove and deploy again.
40
+ If you don't follow this procedure, warm runners may linger until they expire.
41
+ - Provider failures or timeouts (like Lambda provider timing out after 15 minutes) will result in a
42
+ gap in coverage until the retry succeeds. Current retry mechanism has built-in back-off rate and
43
+ can be tweaked using `retryOptions`. This will be improved in the future.
44
+
45
+ ```typescript
46
+ new AlwaysOnWarmRunner(stack, 'AlwaysOnLinux', {
47
+ runners,
48
+ provider: myProvider,
49
+ count: 3,
50
+ owner: 'my-org',
51
+ repo: 'my-repo',
52
+ });
53
+ ```)
54
+
55
+ #### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.Initializer"></a>
56
+
57
+ ```typescript
58
+ import { AlwaysOnWarmRunner } from '@cloudsnorkel/cdk-github-runners'
59
+
60
+ new AlwaysOnWarmRunner(scope: Construct, id: string, props: AlwaysOnWarmRunnerProps)
61
+ ```
62
+
63
+ | **Name** | **Type** | **Description** |
64
+ | --- | --- | --- |
65
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
66
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
67
+ | <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.* |
68
+
69
+ ---
70
+
71
+ ##### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.Initializer.parameter.scope"></a>
72
+
73
+ - *Type:* constructs.Construct
74
+
75
+ ---
76
+
77
+ ##### `id`<sup>Required</sup> <a name="id" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.Initializer.parameter.id"></a>
78
+
79
+ - *Type:* string
80
+
81
+ ---
82
+
83
+ ##### `props`<sup>Required</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.Initializer.parameter.props"></a>
84
+
85
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps">AlwaysOnWarmRunnerProps</a>
86
+
87
+ ---
88
+
89
+ #### Methods <a name="Methods" id="Methods"></a>
90
+
91
+ | **Name** | **Description** |
92
+ | --- | --- |
93
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.toString">toString</a></code> | Returns a string representation of this construct. |
94
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.with">with</a></code> | Applies one or more mixins to this construct. |
95
+
96
+ ---
97
+
98
+ ##### `toString` <a name="toString" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.toString"></a>
99
+
100
+ ```typescript
101
+ public toString(): string
102
+ ```
103
+
104
+ Returns a string representation of this construct.
105
+
106
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.with"></a>
107
+
108
+ ```typescript
109
+ public with(mixins: ...IMixin[]): IConstruct
110
+ ```
111
+
112
+ Applies one or more mixins to this construct.
113
+
114
+ Mixins are applied in order. The list of constructs is captured at the
115
+ start of the call, so constructs added by a mixin will not be visited.
116
+ Use multiple `with()` calls if subsequent mixins should apply to added
117
+ constructs.
118
+
119
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.with.parameter.mixins"></a>
120
+
121
+ - *Type:* ...constructs.IMixin[]
122
+
123
+ The mixins to apply.
124
+
125
+ ---
126
+
127
+ #### Static Functions <a name="Static Functions" id="Static Functions"></a>
128
+
129
+ | **Name** | **Description** |
130
+ | --- | --- |
131
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
132
+
133
+ ---
134
+
135
+ ##### `isConstruct` <a name="isConstruct" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.isConstruct"></a>
136
+
137
+ ```typescript
138
+ import { AlwaysOnWarmRunner } from '@cloudsnorkel/cdk-github-runners'
139
+
140
+ AlwaysOnWarmRunner.isConstruct(x: any)
141
+ ```
142
+
143
+ Checks if `x` is a construct.
144
+
145
+ Use this method instead of `instanceof` to properly detect `Construct`
146
+ instances, even when the construct library is symlinked.
147
+
148
+ Explanation: in JavaScript, multiple copies of the `constructs` library on
149
+ disk are seen as independent, completely different libraries. As a
150
+ consequence, the class `Construct` in each copy of the `constructs` library
151
+ is seen as a different class, and an instance of one class will not test as
152
+ `instanceof` the other class. `npm install` will not create installations
153
+ like this, but users may manually symlink construct libraries together or
154
+ use a monorepo tool: in those cases, multiple copies of the `constructs`
155
+ library can be accidentally installed, and `instanceof` will behave
156
+ unpredictably. It is safest to avoid using `instanceof`, and using
157
+ this type-testing method instead.
158
+
159
+ ###### `x`<sup>Required</sup> <a name="x" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.isConstruct.parameter.x"></a>
160
+
161
+ - *Type:* any
162
+
163
+ Any object.
164
+
165
+ ---
166
+
167
+ #### Properties <a name="Properties" id="Properties"></a>
168
+
169
+ | **Name** | **Type** | **Description** |
170
+ | --- | --- | --- |
171
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
172
+
173
+ ---
174
+
175
+ ##### `node`<sup>Required</sup> <a name="node" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.property.node"></a>
176
+
177
+ ```typescript
178
+ public readonly node: Node;
179
+ ```
180
+
181
+ - *Type:* constructs.Node
182
+
183
+ The tree node.
184
+
185
+ ---
186
+
187
+
5
188
  ### AmiBuilder <a name="AmiBuilder" id="@cloudsnorkel/cdk-github-runners.AmiBuilder"></a>
6
189
 
7
190
  - *Implements:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerImageBuilder">IRunnerImageBuilder</a>
@@ -74,6 +257,7 @@ new AmiBuilder(scope: Construct, id: string, props?: AmiBuilderProps)
74
257
  | **Name** | **Description** |
75
258
  | --- | --- |
76
259
  | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.toString">toString</a></code> | Returns a string representation of this construct. |
260
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.with">with</a></code> | Applies one or more mixins to this construct. |
77
261
  | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.addComponent">addComponent</a></code> | Add a component to be installed. |
78
262
  | <code><a href="#@cloudsnorkel/cdk-github-runners.AmiBuilder.addExtraCertificates">addExtraCertificates</a></code> | Add extra trusted certificates. |
79
263
  | <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 +274,27 @@ public toString(): string
90
274
 
91
275
  Returns a string representation of this construct.
92
276
 
277
+ ##### ~~`with`~~ <a name="with" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.with"></a>
278
+
279
+ ```typescript
280
+ public with(mixins: ...IMixin[]): IConstruct
281
+ ```
282
+
283
+ Applies one or more mixins to this construct.
284
+
285
+ Mixins are applied in order. The list of constructs is captured at the
286
+ start of the call, so constructs added by a mixin will not be visited.
287
+ Use multiple `with()` calls if subsequent mixins should apply to added
288
+ constructs.
289
+
290
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.with.parameter.mixins"></a>
291
+
292
+ - *Type:* ...constructs.IMixin[]
293
+
294
+ The mixins to apply.
295
+
296
+ ---
297
+
93
298
  ##### ~~`addComponent`~~ <a name="addComponent" id="@cloudsnorkel/cdk-github-runners.AmiBuilder.addComponent"></a>
94
299
 
95
300
  ```typescript
@@ -304,6 +509,7 @@ new CodeBuildImageBuilder(scope: Construct, id: string, props: CodeBuildImageBui
304
509
  | **Name** | **Description** |
305
510
  | --- | --- |
306
511
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.toString">toString</a></code> | Returns a string representation of this construct. |
512
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.with">with</a></code> | Applies one or more mixins to this construct. |
307
513
  | <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
514
  | <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
515
  | <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 +529,27 @@ public toString(): string
323
529
 
324
530
  Returns a string representation of this construct.
325
531
 
532
+ ##### ~~`with`~~ <a name="with" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.with"></a>
533
+
534
+ ```typescript
535
+ public with(mixins: ...IMixin[]): IConstruct
536
+ ```
537
+
538
+ Applies one or more mixins to this construct.
539
+
540
+ Mixins are applied in order. The list of constructs is captured at the
541
+ start of the call, so constructs added by a mixin will not be visited.
542
+ Use multiple `with()` calls if subsequent mixins should apply to added
543
+ constructs.
544
+
545
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.with.parameter.mixins"></a>
546
+
547
+ - *Type:* ...constructs.IMixin[]
548
+
549
+ The mixins to apply.
550
+
551
+ ---
552
+
326
553
  ##### ~~`addExtraCertificates`~~ <a name="addExtraCertificates" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder.addExtraCertificates"></a>
327
554
 
328
555
  ```typescript
@@ -589,9 +816,11 @@ new CodeBuildRunner(scope: Construct, id: string, props?: CodeBuildRunnerProvide
589
816
  | **Name** | **Description** |
590
817
  | --- | --- |
591
818
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.toString">toString</a></code> | Returns a string representation of this construct. |
819
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.with">with</a></code> | Applies one or more mixins to this construct. |
592
820
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
593
821
  | <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
822
  | <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. |
823
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.stepFunctionConstants">stepFunctionConstants</a></code> | Override to inject static strings into `$.consts` on the orchestrator state machine. |
595
824
 
596
825
  ---
597
826
 
@@ -603,10 +832,31 @@ public toString(): string
603
832
 
604
833
  Returns a string representation of this construct.
605
834
 
835
+ ##### ~~`with`~~ <a name="with" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunner.with"></a>
836
+
837
+ ```typescript
838
+ public with(mixins: ...IMixin[]): IConstruct
839
+ ```
840
+
841
+ Applies one or more mixins to this construct.
842
+
843
+ Mixins are applied in order. The list of constructs is captured at the
844
+ start of the call, so constructs added by a mixin will not be visited.
845
+ Use multiple `with()` calls if subsequent mixins should apply to added
846
+ constructs.
847
+
848
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunner.with.parameter.mixins"></a>
849
+
850
+ - *Type:* ...constructs.IMixin[]
851
+
852
+ The mixins to apply.
853
+
854
+ ---
855
+
606
856
  ##### ~~`getStepFunctionTask`~~ <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunner.getStepFunctionTask"></a>
607
857
 
608
858
  ```typescript
609
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
859
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
610
860
  ```
611
861
 
612
862
  Generate step function task(s) to start a new runner.
@@ -615,7 +865,7 @@ Called by GithubRunners and shouldn't be called manually.
615
865
 
616
866
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunner.getStepFunctionTask.parameter.parameters"></a>
617
867
 
618
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
868
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
619
869
 
620
870
  workflow job details.
621
871
 
@@ -654,6 +904,14 @@ Also gives the status function any needed permissions to query the Docker image
654
904
 
655
905
  ---
656
906
 
907
+ ##### ~~`stepFunctionConstants`~~ <a name="stepFunctionConstants" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunner.stepFunctionConstants"></a>
908
+
909
+ ```typescript
910
+ public stepFunctionConstants(): {[ key: string ]: string}
911
+ ```
912
+
913
+ Override to inject static strings into `$.consts` on the orchestrator state machine.
914
+
657
915
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
658
916
 
659
917
  | **Name** | **Description** |
@@ -975,9 +1233,11 @@ new CodeBuildRunnerProvider(scope: Construct, id: string, props?: CodeBuildRunne
975
1233
  | **Name** | **Description** |
976
1234
  | --- | --- |
977
1235
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.toString">toString</a></code> | Returns a string representation of this construct. |
1236
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.with">with</a></code> | Applies one or more mixins to this construct. |
978
1237
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
979
1238
  | <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
1239
  | <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. |
1240
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.stepFunctionConstants">stepFunctionConstants</a></code> | Override to inject static strings into `$.consts` on the orchestrator state machine. |
981
1241
 
982
1242
  ---
983
1243
 
@@ -989,10 +1249,31 @@ public toString(): string
989
1249
 
990
1250
  Returns a string representation of this construct.
991
1251
 
1252
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.with"></a>
1253
+
1254
+ ```typescript
1255
+ public with(mixins: ...IMixin[]): IConstruct
1256
+ ```
1257
+
1258
+ Applies one or more mixins to this construct.
1259
+
1260
+ Mixins are applied in order. The list of constructs is captured at the
1261
+ start of the call, so constructs added by a mixin will not be visited.
1262
+ Use multiple `with()` calls if subsequent mixins should apply to added
1263
+ constructs.
1264
+
1265
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.with.parameter.mixins"></a>
1266
+
1267
+ - *Type:* ...constructs.IMixin[]
1268
+
1269
+ The mixins to apply.
1270
+
1271
+ ---
1272
+
992
1273
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.getStepFunctionTask"></a>
993
1274
 
994
1275
  ```typescript
995
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
1276
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
996
1277
  ```
997
1278
 
998
1279
  Generate step function task(s) to start a new runner.
@@ -1001,7 +1282,7 @@ Called by GithubRunners and shouldn't be called manually.
1001
1282
 
1002
1283
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.getStepFunctionTask.parameter.parameters"></a>
1003
1284
 
1004
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
1285
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
1005
1286
 
1006
1287
  workflow job details.
1007
1288
 
@@ -1040,6 +1321,14 @@ Also gives the status function any needed permissions to query the Docker image
1040
1321
 
1041
1322
  ---
1042
1323
 
1324
+ ##### `stepFunctionConstants` <a name="stepFunctionConstants" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.stepFunctionConstants"></a>
1325
+
1326
+ ```typescript
1327
+ public stepFunctionConstants(): {[ key: string ]: string}
1328
+ ```
1329
+
1330
+ Override to inject static strings into `$.consts` on the orchestrator state machine.
1331
+
1043
1332
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
1044
1333
 
1045
1334
  | **Name** | **Description** |
@@ -1364,6 +1653,7 @@ new ContainerImageBuilder(scope: Construct, id: string, props?: ContainerImageBu
1364
1653
  | **Name** | **Description** |
1365
1654
  | --- | --- |
1366
1655
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.toString">toString</a></code> | Returns a string representation of this construct. |
1656
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.with">with</a></code> | Applies one or more mixins to this construct. |
1367
1657
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.addComponent">addComponent</a></code> | Add a component to be installed. |
1368
1658
  | <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
1659
  | <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 +1670,27 @@ public toString(): string
1380
1670
 
1381
1671
  Returns a string representation of this construct.
1382
1672
 
1673
+ ##### ~~`with`~~ <a name="with" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.with"></a>
1674
+
1675
+ ```typescript
1676
+ public with(mixins: ...IMixin[]): IConstruct
1677
+ ```
1678
+
1679
+ Applies one or more mixins to this construct.
1680
+
1681
+ Mixins are applied in order. The list of constructs is captured at the
1682
+ start of the call, so constructs added by a mixin will not be visited.
1683
+ Use multiple `with()` calls if subsequent mixins should apply to added
1684
+ constructs.
1685
+
1686
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.with.parameter.mixins"></a>
1687
+
1688
+ - *Type:* ...constructs.IMixin[]
1689
+
1690
+ The mixins to apply.
1691
+
1692
+ ---
1693
+
1383
1694
  ##### ~~`addComponent`~~ <a name="addComponent" id="@cloudsnorkel/cdk-github-runners.ContainerImageBuilder.addComponent"></a>
1384
1695
 
1385
1696
  ```typescript
@@ -1580,9 +1891,11 @@ new Ec2Runner(scope: Construct, id: string, props?: Ec2RunnerProviderProps)
1580
1891
  | **Name** | **Description** |
1581
1892
  | --- | --- |
1582
1893
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.toString">toString</a></code> | Returns a string representation of this construct. |
1894
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.with">with</a></code> | Applies one or more mixins to this construct. |
1583
1895
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
1584
1896
  | <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
1897
  | <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. |
1898
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.stepFunctionConstants">stepFunctionConstants</a></code> | Override to inject static strings into `$.consts` on the orchestrator state machine. |
1586
1899
 
1587
1900
  ---
1588
1901
 
@@ -1594,10 +1907,31 @@ public toString(): string
1594
1907
 
1595
1908
  Returns a string representation of this construct.
1596
1909
 
1910
+ ##### ~~`with`~~ <a name="with" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.with"></a>
1911
+
1912
+ ```typescript
1913
+ public with(mixins: ...IMixin[]): IConstruct
1914
+ ```
1915
+
1916
+ Applies one or more mixins to this construct.
1917
+
1918
+ Mixins are applied in order. The list of constructs is captured at the
1919
+ start of the call, so constructs added by a mixin will not be visited.
1920
+ Use multiple `with()` calls if subsequent mixins should apply to added
1921
+ constructs.
1922
+
1923
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.with.parameter.mixins"></a>
1924
+
1925
+ - *Type:* ...constructs.IMixin[]
1926
+
1927
+ The mixins to apply.
1928
+
1929
+ ---
1930
+
1597
1931
  ##### ~~`getStepFunctionTask`~~ <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.getStepFunctionTask"></a>
1598
1932
 
1599
1933
  ```typescript
1600
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
1934
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
1601
1935
  ```
1602
1936
 
1603
1937
  Generate step function task(s) to start a new runner.
@@ -1606,7 +1940,7 @@ Called by GithubRunners and shouldn't be called manually.
1606
1940
 
1607
1941
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.getStepFunctionTask.parameter.parameters"></a>
1608
1942
 
1609
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
1943
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
1610
1944
 
1611
1945
  workflow job details.
1612
1946
 
@@ -1645,6 +1979,14 @@ Also gives the status function any needed permissions to query the Docker image
1645
1979
 
1646
1980
  ---
1647
1981
 
1982
+ ##### ~~`stepFunctionConstants`~~ <a name="stepFunctionConstants" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.stepFunctionConstants"></a>
1983
+
1984
+ ```typescript
1985
+ public stepFunctionConstants(): {[ key: string ]: string}
1986
+ ```
1987
+
1988
+ Override to inject static strings into `$.consts` on the orchestrator state machine.
1989
+
1648
1990
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
1649
1991
 
1650
1992
  | **Name** | **Description** |
@@ -1877,9 +2219,11 @@ new Ec2RunnerProvider(scope: Construct, id: string, props?: Ec2RunnerProviderPro
1877
2219
  | **Name** | **Description** |
1878
2220
  | --- | --- |
1879
2221
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.toString">toString</a></code> | Returns a string representation of this construct. |
2222
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.with">with</a></code> | Applies one or more mixins to this construct. |
1880
2223
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
1881
2224
  | <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
2225
  | <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. |
2226
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.stepFunctionConstants">stepFunctionConstants</a></code> | Override to inject static strings into `$.consts` on the orchestrator state machine. |
1883
2227
 
1884
2228
  ---
1885
2229
 
@@ -1891,10 +2235,31 @@ public toString(): string
1891
2235
 
1892
2236
  Returns a string representation of this construct.
1893
2237
 
2238
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.with"></a>
2239
+
2240
+ ```typescript
2241
+ public with(mixins: ...IMixin[]): IConstruct
2242
+ ```
2243
+
2244
+ Applies one or more mixins to this construct.
2245
+
2246
+ Mixins are applied in order. The list of constructs is captured at the
2247
+ start of the call, so constructs added by a mixin will not be visited.
2248
+ Use multiple `with()` calls if subsequent mixins should apply to added
2249
+ constructs.
2250
+
2251
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.with.parameter.mixins"></a>
2252
+
2253
+ - *Type:* ...constructs.IMixin[]
2254
+
2255
+ The mixins to apply.
2256
+
2257
+ ---
2258
+
1894
2259
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.getStepFunctionTask"></a>
1895
2260
 
1896
2261
  ```typescript
1897
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
2262
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
1898
2263
  ```
1899
2264
 
1900
2265
  Generate step function task(s) to start a new runner.
@@ -1903,7 +2268,7 @@ Called by GithubRunners and shouldn't be called manually.
1903
2268
 
1904
2269
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.getStepFunctionTask.parameter.parameters"></a>
1905
2270
 
1906
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
2271
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
1907
2272
 
1908
2273
  workflow job details.
1909
2274
 
@@ -1942,6 +2307,14 @@ Also gives the status function any needed permissions to query the Docker image
1942
2307
 
1943
2308
  ---
1944
2309
 
2310
+ ##### `stepFunctionConstants` <a name="stepFunctionConstants" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.stepFunctionConstants"></a>
2311
+
2312
+ ```typescript
2313
+ public stepFunctionConstants(): {[ key: string ]: string}
2314
+ ```
2315
+
2316
+ Override to inject static strings into `$.consts` on the orchestrator state machine.
2317
+
1945
2318
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
1946
2319
 
1947
2320
  | **Name** | **Description** |
@@ -2166,9 +2539,11 @@ new EcsRunnerProvider(scope: Construct, id: string, props?: EcsRunnerProviderPro
2166
2539
  | **Name** | **Description** |
2167
2540
  | --- | --- |
2168
2541
  | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.toString">toString</a></code> | Returns a string representation of this construct. |
2542
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.with">with</a></code> | Applies one or more mixins to this construct. |
2169
2543
  | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
2170
2544
  | <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
2545
  | <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. |
2546
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.stepFunctionConstants">stepFunctionConstants</a></code> | Override to inject static strings into `$.consts` on the orchestrator state machine. |
2172
2547
 
2173
2548
  ---
2174
2549
 
@@ -2180,10 +2555,31 @@ public toString(): string
2180
2555
 
2181
2556
  Returns a string representation of this construct.
2182
2557
 
2558
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.with"></a>
2559
+
2560
+ ```typescript
2561
+ public with(mixins: ...IMixin[]): IConstruct
2562
+ ```
2563
+
2564
+ Applies one or more mixins to this construct.
2565
+
2566
+ Mixins are applied in order. The list of constructs is captured at the
2567
+ start of the call, so constructs added by a mixin will not be visited.
2568
+ Use multiple `with()` calls if subsequent mixins should apply to added
2569
+ constructs.
2570
+
2571
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.with.parameter.mixins"></a>
2572
+
2573
+ - *Type:* ...constructs.IMixin[]
2574
+
2575
+ The mixins to apply.
2576
+
2577
+ ---
2578
+
2183
2579
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.getStepFunctionTask"></a>
2184
2580
 
2185
2581
  ```typescript
2186
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
2582
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
2187
2583
  ```
2188
2584
 
2189
2585
  Generate step function task(s) to start a new runner.
@@ -2192,7 +2588,7 @@ Called by GithubRunners and shouldn't be called manually.
2192
2588
 
2193
2589
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.getStepFunctionTask.parameter.parameters"></a>
2194
2590
 
2195
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
2591
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
2196
2592
 
2197
2593
  workflow job details.
2198
2594
 
@@ -2231,6 +2627,14 @@ Also gives the status function any needed permissions to query the Docker image
2231
2627
 
2232
2628
  ---
2233
2629
 
2630
+ ##### `stepFunctionConstants` <a name="stepFunctionConstants" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.stepFunctionConstants"></a>
2631
+
2632
+ ```typescript
2633
+ public stepFunctionConstants(): {[ key: string ]: string}
2634
+ ```
2635
+
2636
+ Override to inject static strings into `$.consts` on the orchestrator state machine.
2637
+
2234
2638
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
2235
2639
 
2236
2640
  | **Name** | **Description** |
@@ -2459,9 +2863,11 @@ new FargateRunner(scope: Construct, id: string, props?: FargateRunnerProviderPro
2459
2863
  | **Name** | **Description** |
2460
2864
  | --- | --- |
2461
2865
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.toString">toString</a></code> | Returns a string representation of this construct. |
2866
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.with">with</a></code> | Applies one or more mixins to this construct. |
2462
2867
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
2463
2868
  | <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
2869
  | <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. |
2870
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.stepFunctionConstants">stepFunctionConstants</a></code> | Override to inject static strings into `$.consts` on the orchestrator state machine. |
2465
2871
 
2466
2872
  ---
2467
2873
 
@@ -2473,10 +2879,31 @@ public toString(): string
2473
2879
 
2474
2880
  Returns a string representation of this construct.
2475
2881
 
2882
+ ##### ~~`with`~~ <a name="with" id="@cloudsnorkel/cdk-github-runners.FargateRunner.with"></a>
2883
+
2884
+ ```typescript
2885
+ public with(mixins: ...IMixin[]): IConstruct
2886
+ ```
2887
+
2888
+ Applies one or more mixins to this construct.
2889
+
2890
+ Mixins are applied in order. The list of constructs is captured at the
2891
+ start of the call, so constructs added by a mixin will not be visited.
2892
+ Use multiple `with()` calls if subsequent mixins should apply to added
2893
+ constructs.
2894
+
2895
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.FargateRunner.with.parameter.mixins"></a>
2896
+
2897
+ - *Type:* ...constructs.IMixin[]
2898
+
2899
+ The mixins to apply.
2900
+
2901
+ ---
2902
+
2476
2903
  ##### ~~`getStepFunctionTask`~~ <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.FargateRunner.getStepFunctionTask"></a>
2477
2904
 
2478
2905
  ```typescript
2479
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
2906
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
2480
2907
  ```
2481
2908
 
2482
2909
  Generate step function task(s) to start a new runner.
@@ -2485,7 +2912,7 @@ Called by GithubRunners and shouldn't be called manually.
2485
2912
 
2486
2913
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.FargateRunner.getStepFunctionTask.parameter.parameters"></a>
2487
2914
 
2488
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
2915
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
2489
2916
 
2490
2917
  workflow job details.
2491
2918
 
@@ -2524,6 +2951,14 @@ Also gives the status function any needed permissions to query the Docker image
2524
2951
 
2525
2952
  ---
2526
2953
 
2954
+ ##### ~~`stepFunctionConstants`~~ <a name="stepFunctionConstants" id="@cloudsnorkel/cdk-github-runners.FargateRunner.stepFunctionConstants"></a>
2955
+
2956
+ ```typescript
2957
+ public stepFunctionConstants(): {[ key: string ]: string}
2958
+ ```
2959
+
2960
+ Override to inject static strings into `$.consts` on the orchestrator state machine.
2961
+
2527
2962
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
2528
2963
 
2529
2964
  | **Name** | **Description** |
@@ -2926,9 +3361,11 @@ new FargateRunnerProvider(scope: Construct, id: string, props?: FargateRunnerPro
2926
3361
  | **Name** | **Description** |
2927
3362
  | --- | --- |
2928
3363
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.toString">toString</a></code> | Returns a string representation of this construct. |
3364
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.with">with</a></code> | Applies one or more mixins to this construct. |
2929
3365
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
2930
3366
  | <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
3367
  | <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. |
3368
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.stepFunctionConstants">stepFunctionConstants</a></code> | Override to inject static strings into `$.consts` on the orchestrator state machine. |
2932
3369
 
2933
3370
  ---
2934
3371
 
@@ -2940,31 +3377,52 @@ public toString(): string
2940
3377
 
2941
3378
  Returns a string representation of this construct.
2942
3379
 
2943
- ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.getStepFunctionTask"></a>
3380
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.with"></a>
2944
3381
 
2945
3382
  ```typescript
2946
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
3383
+ public with(mixins: ...IMixin[]): IConstruct
2947
3384
  ```
2948
3385
 
2949
- Generate step function task(s) to start a new runner.
3386
+ Applies one or more mixins to this construct.
2950
3387
 
2951
- Called by GithubRunners and shouldn't be called manually.
3388
+ Mixins are applied in order. The list of constructs is captured at the
3389
+ start of the call, so constructs added by a mixin will not be visited.
3390
+ Use multiple `with()` calls if subsequent mixins should apply to added
3391
+ constructs.
2952
3392
 
2953
- ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.getStepFunctionTask.parameter.parameters"></a>
3393
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.with.parameter.mixins"></a>
2954
3394
 
2955
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
3395
+ - *Type:* ...constructs.IMixin[]
2956
3396
 
2957
- workflow job details.
3397
+ The mixins to apply.
2958
3398
 
2959
3399
  ---
2960
3400
 
2961
- ##### `grantStateMachine` <a name="grantStateMachine" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.grantStateMachine"></a>
3401
+ ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.getStepFunctionTask"></a>
2962
3402
 
2963
3403
  ```typescript
2964
- public grantStateMachine(_: IGrantable): void
3404
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
2965
3405
  ```
2966
3406
 
2967
- An optional method that modifies the role of the state machine after all the tasks have been generated.
3407
+ Generate step function task(s) to start a new runner.
3408
+
3409
+ Called by GithubRunners and shouldn't be called manually.
3410
+
3411
+ ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.getStepFunctionTask.parameter.parameters"></a>
3412
+
3413
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
3414
+
3415
+ workflow job details.
3416
+
3417
+ ---
3418
+
3419
+ ##### `grantStateMachine` <a name="grantStateMachine" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.grantStateMachine"></a>
3420
+
3421
+ ```typescript
3422
+ public grantStateMachine(_: IGrantable): void
3423
+ ```
3424
+
3425
+ An optional method that modifies the role of the state machine after all the tasks have been generated.
2968
3426
 
2969
3427
  This can be used to add additional policy
2970
3428
  statements to the state machine role that are not automatically added by the task returned from {@link getStepFunctionTask}.
@@ -2991,6 +3449,14 @@ Also gives the status function any needed permissions to query the Docker image
2991
3449
 
2992
3450
  ---
2993
3451
 
3452
+ ##### `stepFunctionConstants` <a name="stepFunctionConstants" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.stepFunctionConstants"></a>
3453
+
3454
+ ```typescript
3455
+ public stepFunctionConstants(): {[ key: string ]: string}
3456
+ ```
3457
+
3458
+ Override to inject static strings into `$.consts` on the orchestrator state machine.
3459
+
2994
3460
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
2995
3461
 
2996
3462
  | **Name** | **Description** |
@@ -3414,6 +3880,7 @@ new GitHubRunners(scope: Construct, id: string, props?: GitHubRunnersProps)
3414
3880
  | **Name** | **Description** |
3415
3881
  | --- | --- |
3416
3882
  | <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.toString">toString</a></code> | Returns a string representation of this construct. |
3883
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.with">with</a></code> | Applies one or more mixins to this construct. |
3417
3884
  | <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
3885
  | <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.failedImageBuildsTopic">failedImageBuildsTopic</a></code> | Creates a topic for notifications when a runner image build fails. |
3419
3886
  | <code><a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners.metricFailed">metricFailed</a></code> | Metric for failed runner executions. |
@@ -3431,10 +3898,31 @@ public toString(): string
3431
3898
 
3432
3899
  Returns a string representation of this construct.
3433
3900
 
3901
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.with"></a>
3902
+
3903
+ ```typescript
3904
+ public with(mixins: ...IMixin[]): IConstruct
3905
+ ```
3906
+
3907
+ Applies one or more mixins to this construct.
3908
+
3909
+ Mixins are applied in order. The list of constructs is captured at the
3910
+ start of the call, so constructs added by a mixin will not be visited.
3911
+ Use multiple `with()` calls if subsequent mixins should apply to added
3912
+ constructs.
3913
+
3914
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.with.parameter.mixins"></a>
3915
+
3916
+ - *Type:* ...constructs.IMixin[]
3917
+
3918
+ The mixins to apply.
3919
+
3920
+ ---
3921
+
3434
3922
  ##### `createLogsInsightsQueries` <a name="createLogsInsightsQueries" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.createLogsInsightsQueries"></a>
3435
3923
 
3436
3924
  ```typescript
3437
- public createLogsInsightsQueries(): void
3925
+ public createLogsInsightsQueries(prefix?: string): void
3438
3926
  ```
3439
3927
 
3440
3928
  Creates CloudWatch Logs Insights saved queries that can be used to debug issues with the runners.
@@ -3443,6 +3931,17 @@ Creates CloudWatch Logs Insights saved queries that can be used to debug issues
3443
3931
  * "Ignored webhook" helps understand why runners aren't started
3444
3932
  * "Ignored jobs based on labels" helps debug label matching issues
3445
3933
  * "Webhook started runners" helps understand which runners were started
3934
+ * "Warm runner status" and "Warm runner errors" (when warm runners are configured)
3935
+
3936
+ ###### `prefix`<sup>Optional</sup> <a name="prefix" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.createLogsInsightsQueries.parameter.prefix"></a>
3937
+
3938
+ - *Type:* string
3939
+
3940
+ Prefix for the query definitions.
3941
+
3942
+ Defaults to "GitHub Runners".
3943
+
3944
+ ---
3446
3945
 
3447
3946
  ##### `failedImageBuildsTopic` <a name="failedImageBuildsTopic" id="@cloudsnorkel/cdk-github-runners.GitHubRunners.failedImageBuildsTopic"></a>
3448
3947
 
@@ -3710,6 +4209,7 @@ new ImageBuilderComponent(scope: Construct, id: string, props: ImageBuilderCompo
3710
4209
  | **Name** | **Description** |
3711
4210
  | --- | --- |
3712
4211
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.toString">toString</a></code> | Returns a string representation of this construct. |
4212
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.with">with</a></code> | Applies one or more mixins to this construct. |
3713
4213
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.applyRemovalPolicy">applyRemovalPolicy</a></code> | Apply the given removal policy to this resource. |
3714
4214
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.grantAssetsRead">grantAssetsRead</a></code> | Grants read permissions to the principal on the assets buckets. |
3715
4215
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.prefixCommandsWithErrorHandling">prefixCommandsWithErrorHandling</a></code> | *No description.* |
@@ -3724,6 +4224,27 @@ public toString(): string
3724
4224
 
3725
4225
  Returns a string representation of this construct.
3726
4226
 
4227
+ ##### ~~`with`~~ <a name="with" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.with"></a>
4228
+
4229
+ ```typescript
4230
+ public with(mixins: ...IMixin[]): IConstruct
4231
+ ```
4232
+
4233
+ Applies one or more mixins to this construct.
4234
+
4235
+ Mixins are applied in order. The list of constructs is captured at the
4236
+ start of the call, so constructs added by a mixin will not be visited.
4237
+ Use multiple `with()` calls if subsequent mixins should apply to added
4238
+ constructs.
4239
+
4240
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.with.parameter.mixins"></a>
4241
+
4242
+ - *Type:* ...constructs.IMixin[]
4243
+
4244
+ The mixins to apply.
4245
+
4246
+ ---
4247
+
3727
4248
  ##### ~~`applyRemovalPolicy`~~ <a name="applyRemovalPolicy" id="@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.applyRemovalPolicy"></a>
3728
4249
 
3729
4250
  ```typescript
@@ -3857,7 +4378,7 @@ Check whether the given construct is a Resource.
3857
4378
  | **Name** | **Type** | **Description** |
3858
4379
  | --- | --- | --- |
3859
4380
  | <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. |
4381
+ | <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
4382
  | <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
4383
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.property.arn">arn</a></code> | <code>string</code> | Component ARN. |
3863
4384
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ImageBuilderComponent.property.platform">platform</a></code> | <code>string</code> | Supported platform for the component. |
@@ -3886,16 +4407,17 @@ The tree node.
3886
4407
  public readonly env: ResourceEnvironment;
3887
4408
  ```
3888
4409
 
3889
- - *Type:* aws-cdk-lib.ResourceEnvironment
4410
+ - *Type:* aws-cdk-lib.interfaces.ResourceEnvironment
3890
4411
 
3891
4412
  The environment this resource belongs to.
3892
4413
 
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.
4414
+ For resources that are created and managed in a Stack (those created by
4415
+ creating new class instances like `new Role()`, `new Bucket()`, etc.), this
4416
+ is always the same as the environment of the stack they belong to.
4417
+
4418
+ For referenced resources (those obtained from referencing methods like
4419
+ `Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
4420
+ different than the stack they were imported into.
3899
4421
 
3900
4422
  ---
3901
4423
 
@@ -3983,9 +4505,11 @@ new LambdaRunner(scope: Construct, id: string, props?: LambdaRunnerProviderProps
3983
4505
  | **Name** | **Description** |
3984
4506
  | --- | --- |
3985
4507
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.toString">toString</a></code> | Returns a string representation of this construct. |
4508
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.with">with</a></code> | Applies one or more mixins to this construct. |
3986
4509
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
3987
4510
  | <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
4511
  | <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. |
4512
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.stepFunctionConstants">stepFunctionConstants</a></code> | Override to inject static strings into `$.consts` on the orchestrator state machine. |
3989
4513
 
3990
4514
  ---
3991
4515
 
@@ -3997,10 +4521,31 @@ public toString(): string
3997
4521
 
3998
4522
  Returns a string representation of this construct.
3999
4523
 
4524
+ ##### ~~`with`~~ <a name="with" id="@cloudsnorkel/cdk-github-runners.LambdaRunner.with"></a>
4525
+
4526
+ ```typescript
4527
+ public with(mixins: ...IMixin[]): IConstruct
4528
+ ```
4529
+
4530
+ Applies one or more mixins to this construct.
4531
+
4532
+ Mixins are applied in order. The list of constructs is captured at the
4533
+ start of the call, so constructs added by a mixin will not be visited.
4534
+ Use multiple `with()` calls if subsequent mixins should apply to added
4535
+ constructs.
4536
+
4537
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.LambdaRunner.with.parameter.mixins"></a>
4538
+
4539
+ - *Type:* ...constructs.IMixin[]
4540
+
4541
+ The mixins to apply.
4542
+
4543
+ ---
4544
+
4000
4545
  ##### ~~`getStepFunctionTask`~~ <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.LambdaRunner.getStepFunctionTask"></a>
4001
4546
 
4002
4547
  ```typescript
4003
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
4548
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
4004
4549
  ```
4005
4550
 
4006
4551
  Generate step function task(s) to start a new runner.
@@ -4009,7 +4554,7 @@ Called by GithubRunners and shouldn't be called manually.
4009
4554
 
4010
4555
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.LambdaRunner.getStepFunctionTask.parameter.parameters"></a>
4011
4556
 
4012
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
4557
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
4013
4558
 
4014
4559
  workflow job details.
4015
4560
 
@@ -4048,6 +4593,14 @@ Also gives the status function any needed permissions to query the Docker image
4048
4593
 
4049
4594
  ---
4050
4595
 
4596
+ ##### ~~`stepFunctionConstants`~~ <a name="stepFunctionConstants" id="@cloudsnorkel/cdk-github-runners.LambdaRunner.stepFunctionConstants"></a>
4597
+
4598
+ ```typescript
4599
+ public stepFunctionConstants(): {[ key: string ]: string}
4600
+ ```
4601
+
4602
+ Override to inject static strings into `$.consts` on the orchestrator state machine.
4603
+
4051
4604
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
4052
4605
 
4053
4606
  | **Name** | **Description** |
@@ -4361,9 +4914,11 @@ new LambdaRunnerProvider(scope: Construct, id: string, props?: LambdaRunnerProvi
4361
4914
  | **Name** | **Description** |
4362
4915
  | --- | --- |
4363
4916
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.toString">toString</a></code> | Returns a string representation of this construct. |
4917
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.with">with</a></code> | Applies one or more mixins to this construct. |
4364
4918
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
4365
4919
  | <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
4920
  | <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. |
4921
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.stepFunctionConstants">stepFunctionConstants</a></code> | Override to inject static strings into `$.consts` on the orchestrator state machine. |
4367
4922
 
4368
4923
  ---
4369
4924
 
@@ -4375,10 +4930,31 @@ public toString(): string
4375
4930
 
4376
4931
  Returns a string representation of this construct.
4377
4932
 
4933
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.with"></a>
4934
+
4935
+ ```typescript
4936
+ public with(mixins: ...IMixin[]): IConstruct
4937
+ ```
4938
+
4939
+ Applies one or more mixins to this construct.
4940
+
4941
+ Mixins are applied in order. The list of constructs is captured at the
4942
+ start of the call, so constructs added by a mixin will not be visited.
4943
+ Use multiple `with()` calls if subsequent mixins should apply to added
4944
+ constructs.
4945
+
4946
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.with.parameter.mixins"></a>
4947
+
4948
+ - *Type:* ...constructs.IMixin[]
4949
+
4950
+ The mixins to apply.
4951
+
4952
+ ---
4953
+
4378
4954
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.getStepFunctionTask"></a>
4379
4955
 
4380
4956
  ```typescript
4381
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
4957
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
4382
4958
  ```
4383
4959
 
4384
4960
  Generate step function task(s) to start a new runner.
@@ -4387,7 +4963,7 @@ Called by GithubRunners and shouldn't be called manually.
4387
4963
 
4388
4964
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.getStepFunctionTask.parameter.parameters"></a>
4389
4965
 
4390
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
4966
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
4391
4967
 
4392
4968
  workflow job details.
4393
4969
 
@@ -4426,6 +5002,14 @@ Also gives the status function any needed permissions to query the Docker image
4426
5002
 
4427
5003
  ---
4428
5004
 
5005
+ ##### `stepFunctionConstants` <a name="stepFunctionConstants" id="@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.stepFunctionConstants"></a>
5006
+
5007
+ ```typescript
5008
+ public stepFunctionConstants(): {[ key: string ]: string}
5009
+ ```
5010
+
5011
+ Override to inject static strings into `$.consts` on the orchestrator state machine.
5012
+
4429
5013
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
4430
5014
 
4431
5015
  | **Name** | **Description** |
@@ -4725,6 +5309,7 @@ new RunnerImageBuilder(scope: Construct, id: string, props?: RunnerImageBuilderP
4725
5309
  | **Name** | **Description** |
4726
5310
  | --- | --- |
4727
5311
  | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.toString">toString</a></code> | Returns a string representation of this construct. |
5312
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.with">with</a></code> | Applies one or more mixins to this construct. |
4728
5313
  | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.addComponent">addComponent</a></code> | Add a component to the image builder. |
4729
5314
  | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.bindAmi">bindAmi</a></code> | Build and return an AMI with GitHub Runner installed in it. |
4730
5315
  | <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 +5325,27 @@ public toString(): string
4740
5325
 
4741
5326
  Returns a string representation of this construct.
4742
5327
 
5328
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.with"></a>
5329
+
5330
+ ```typescript
5331
+ public with(mixins: ...IMixin[]): IConstruct
5332
+ ```
5333
+
5334
+ Applies one or more mixins to this construct.
5335
+
5336
+ Mixins are applied in order. The list of constructs is captured at the
5337
+ start of the call, so constructs added by a mixin will not be visited.
5338
+ Use multiple `with()` calls if subsequent mixins should apply to added
5339
+ constructs.
5340
+
5341
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.with.parameter.mixins"></a>
5342
+
5343
+ - *Type:* ...constructs.IMixin[]
5344
+
5345
+ The mixins to apply.
5346
+
5347
+ ---
5348
+
4743
5349
  ##### `addComponent` <a name="addComponent" id="@cloudsnorkel/cdk-github-runners.RunnerImageBuilder.addComponent"></a>
4744
5350
 
4745
5351
  ```typescript
@@ -4916,6 +5522,227 @@ The principal to grant permissions to.
4916
5522
  ---
4917
5523
 
4918
5524
 
5525
+ ### ScheduledWarmRunner <a name="ScheduledWarmRunner" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner"></a>
5526
+
5527
+ Warm runners active during a time window specified by start time (`schedule`) and duration (`duration`).
5528
+
5529
+ Runners will be provisioned using the specified provider and registered in the specified repository or organization.
5530
+
5531
+ Registration level must match the one selected during setup.
5532
+
5533
+ > [https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md
5534
+
5535
+ ## Limitations
5536
+
5537
+ - **No deployment-fill**: Unlike `AlwaysOnWarmRunner`, scheduled warm runners do not get an initial
5538
+ fill on deploy. The first fill happens at the next schedule occurrence. If you deploy at 1pm for
5539
+ a 2pm schedule, runners will not appear until 2pm.
5540
+ - Jobs will still trigger provisioning of on-demand runners, even if a warm runner ends up being used.
5541
+ - You may briefly see more than `count` runners when changing config or at rotation.
5542
+ - To remove: set `count` to 0, deploy, wait for warm runners to stop, then remove and deploy again.
5543
+ If you don't follow this procedure, warm runners may linger until they expire.
5544
+ - Provider failures or timeouts (like Lambda provider timing out after 15 minutes) will result in a
5545
+ gap in coverage until the retry succeeds. Current retry mechanism has built-in back-off rate and
5546
+ can be tweaked using `retryOptions`. This will be improved in the future.
5547
+
5548
+ ```typescript
5549
+ // Cron: fill at 1pm on weekdays
5550
+ new ScheduledWarmRunner(stack, 'Business Hours', {
5551
+ runners,
5552
+ provider: myProvider,
5553
+ count: 3,
5554
+ owner: 'my-org',
5555
+ repo: 'my-repo',
5556
+ schedule: events.Schedule.cron({ hour: '13', minute: '0', weekDay: 'MON-FRI' }),
5557
+ duration: cdk.Duration.hours(2),
5558
+ });
5559
+ ```
5560
+
5561
+ ```typescript
5562
+ // Rate: fill every 12 hours
5563
+ new ScheduledWarmRunner(stack, 'Every 12 Hours', {
5564
+ runners,
5565
+ provider: myProvider,
5566
+ count: 2,
5567
+ owner: 'my-org',
5568
+ repo: 'my-repo',
5569
+ schedule: events.Schedule.rate(cdk.Duration.hours(5)),
5570
+ duration: cdk.Duration.hours(12),
5571
+ });
5572
+ ```](https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md
5573
+
5574
+ ## Limitations
5575
+
5576
+ - **No deployment-fill**: Unlike `AlwaysOnWarmRunner`, scheduled warm runners do not get an initial
5577
+ fill on deploy. The first fill happens at the next schedule occurrence. If you deploy at 1pm for
5578
+ a 2pm schedule, runners will not appear until 2pm.
5579
+ - Jobs will still trigger provisioning of on-demand runners, even if a warm runner ends up being used.
5580
+ - You may briefly see more than `count` runners when changing config or at rotation.
5581
+ - To remove: set `count` to 0, deploy, wait for warm runners to stop, then remove and deploy again.
5582
+ If you don't follow this procedure, warm runners may linger until they expire.
5583
+ - Provider failures or timeouts (like Lambda provider timing out after 15 minutes) will result in a
5584
+ gap in coverage until the retry succeeds. Current retry mechanism has built-in back-off rate and
5585
+ can be tweaked using `retryOptions`. This will be improved in the future.
5586
+
5587
+ ```typescript
5588
+ // Cron: fill at 1pm on weekdays
5589
+ new ScheduledWarmRunner(stack, 'Business Hours', {
5590
+ runners,
5591
+ provider: myProvider,
5592
+ count: 3,
5593
+ owner: 'my-org',
5594
+ repo: 'my-repo',
5595
+ schedule: events.Schedule.cron({ hour: '13', minute: '0', weekDay: 'MON-FRI' }),
5596
+ duration: cdk.Duration.hours(2),
5597
+ });
5598
+ ```
5599
+
5600
+ ```typescript
5601
+ // Rate: fill every 12 hours
5602
+ new ScheduledWarmRunner(stack, 'Every 12 Hours', {
5603
+ runners,
5604
+ provider: myProvider,
5605
+ count: 2,
5606
+ owner: 'my-org',
5607
+ repo: 'my-repo',
5608
+ schedule: events.Schedule.rate(cdk.Duration.hours(5)),
5609
+ duration: cdk.Duration.hours(12),
5610
+ });
5611
+ ```)
5612
+
5613
+ #### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.Initializer"></a>
5614
+
5615
+ ```typescript
5616
+ import { ScheduledWarmRunner } from '@cloudsnorkel/cdk-github-runners'
5617
+
5618
+ new ScheduledWarmRunner(scope: Construct, id: string, props: ScheduledWarmRunnerProps)
5619
+ ```
5620
+
5621
+ | **Name** | **Type** | **Description** |
5622
+ | --- | --- | --- |
5623
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
5624
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
5625
+ | <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.* |
5626
+
5627
+ ---
5628
+
5629
+ ##### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.Initializer.parameter.scope"></a>
5630
+
5631
+ - *Type:* constructs.Construct
5632
+
5633
+ ---
5634
+
5635
+ ##### `id`<sup>Required</sup> <a name="id" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.Initializer.parameter.id"></a>
5636
+
5637
+ - *Type:* string
5638
+
5639
+ ---
5640
+
5641
+ ##### `props`<sup>Required</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.Initializer.parameter.props"></a>
5642
+
5643
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps">ScheduledWarmRunnerProps</a>
5644
+
5645
+ ---
5646
+
5647
+ #### Methods <a name="Methods" id="Methods"></a>
5648
+
5649
+ | **Name** | **Description** |
5650
+ | --- | --- |
5651
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.toString">toString</a></code> | Returns a string representation of this construct. |
5652
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.with">with</a></code> | Applies one or more mixins to this construct. |
5653
+
5654
+ ---
5655
+
5656
+ ##### `toString` <a name="toString" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.toString"></a>
5657
+
5658
+ ```typescript
5659
+ public toString(): string
5660
+ ```
5661
+
5662
+ Returns a string representation of this construct.
5663
+
5664
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.with"></a>
5665
+
5666
+ ```typescript
5667
+ public with(mixins: ...IMixin[]): IConstruct
5668
+ ```
5669
+
5670
+ Applies one or more mixins to this construct.
5671
+
5672
+ Mixins are applied in order. The list of constructs is captured at the
5673
+ start of the call, so constructs added by a mixin will not be visited.
5674
+ Use multiple `with()` calls if subsequent mixins should apply to added
5675
+ constructs.
5676
+
5677
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.with.parameter.mixins"></a>
5678
+
5679
+ - *Type:* ...constructs.IMixin[]
5680
+
5681
+ The mixins to apply.
5682
+
5683
+ ---
5684
+
5685
+ #### Static Functions <a name="Static Functions" id="Static Functions"></a>
5686
+
5687
+ | **Name** | **Description** |
5688
+ | --- | --- |
5689
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
5690
+
5691
+ ---
5692
+
5693
+ ##### `isConstruct` <a name="isConstruct" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.isConstruct"></a>
5694
+
5695
+ ```typescript
5696
+ import { ScheduledWarmRunner } from '@cloudsnorkel/cdk-github-runners'
5697
+
5698
+ ScheduledWarmRunner.isConstruct(x: any)
5699
+ ```
5700
+
5701
+ Checks if `x` is a construct.
5702
+
5703
+ Use this method instead of `instanceof` to properly detect `Construct`
5704
+ instances, even when the construct library is symlinked.
5705
+
5706
+ Explanation: in JavaScript, multiple copies of the `constructs` library on
5707
+ disk are seen as independent, completely different libraries. As a
5708
+ consequence, the class `Construct` in each copy of the `constructs` library
5709
+ is seen as a different class, and an instance of one class will not test as
5710
+ `instanceof` the other class. `npm install` will not create installations
5711
+ like this, but users may manually symlink construct libraries together or
5712
+ use a monorepo tool: in those cases, multiple copies of the `constructs`
5713
+ library can be accidentally installed, and `instanceof` will behave
5714
+ unpredictably. It is safest to avoid using `instanceof`, and using
5715
+ this type-testing method instead.
5716
+
5717
+ ###### `x`<sup>Required</sup> <a name="x" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.isConstruct.parameter.x"></a>
5718
+
5719
+ - *Type:* any
5720
+
5721
+ Any object.
5722
+
5723
+ ---
5724
+
5725
+ #### Properties <a name="Properties" id="Properties"></a>
5726
+
5727
+ | **Name** | **Type** | **Description** |
5728
+ | --- | --- | --- |
5729
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
5730
+
5731
+ ---
5732
+
5733
+ ##### `node`<sup>Required</sup> <a name="node" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.property.node"></a>
5734
+
5735
+ ```typescript
5736
+ public readonly node: Node;
5737
+ ```
5738
+
5739
+ - *Type:* constructs.Node
5740
+
5741
+ The tree node.
5742
+
5743
+ ---
5744
+
5745
+
4919
5746
  ### Secrets <a name="Secrets" id="@cloudsnorkel/cdk-github-runners.Secrets"></a>
4920
5747
 
4921
5748
  Secrets required for GitHub runners operation.
@@ -4952,6 +5779,7 @@ new Secrets(scope: Construct, id: string)
4952
5779
  | **Name** | **Description** |
4953
5780
  | --- | --- |
4954
5781
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Secrets.toString">toString</a></code> | Returns a string representation of this construct. |
5782
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Secrets.with">with</a></code> | Applies one or more mixins to this construct. |
4955
5783
 
4956
5784
  ---
4957
5785
 
@@ -4963,6 +5791,27 @@ public toString(): string
4963
5791
 
4964
5792
  Returns a string representation of this construct.
4965
5793
 
5794
+ ##### `with` <a name="with" id="@cloudsnorkel/cdk-github-runners.Secrets.with"></a>
5795
+
5796
+ ```typescript
5797
+ public with(mixins: ...IMixin[]): IConstruct
5798
+ ```
5799
+
5800
+ Applies one or more mixins to this construct.
5801
+
5802
+ Mixins are applied in order. The list of constructs is captured at the
5803
+ start of the call, so constructs added by a mixin will not be visited.
5804
+ Use multiple `with()` calls if subsequent mixins should apply to added
5805
+ constructs.
5806
+
5807
+ ###### `mixins`<sup>Required</sup> <a name="mixins" id="@cloudsnorkel/cdk-github-runners.Secrets.with.parameter.mixins"></a>
5808
+
5809
+ - *Type:* ...constructs.IMixin[]
5810
+
5811
+ The mixins to apply.
5812
+
5813
+ ---
5814
+
4966
5815
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
4967
5816
 
4968
5817
  | **Name** | **Description** |
@@ -5015,77 +5864,185 @@ Any object.
5015
5864
 
5016
5865
  ---
5017
5866
 
5018
- ##### `node`<sup>Required</sup> <a name="node" id="@cloudsnorkel/cdk-github-runners.Secrets.property.node"></a>
5867
+ ##### `node`<sup>Required</sup> <a name="node" id="@cloudsnorkel/cdk-github-runners.Secrets.property.node"></a>
5868
+
5869
+ ```typescript
5870
+ public readonly node: Node;
5871
+ ```
5872
+
5873
+ - *Type:* constructs.Node
5874
+
5875
+ The tree node.
5876
+
5877
+ ---
5878
+
5879
+ ##### `github`<sup>Required</sup> <a name="github" id="@cloudsnorkel/cdk-github-runners.Secrets.property.github"></a>
5880
+
5881
+ ```typescript
5882
+ public readonly github: Secret;
5883
+ ```
5884
+
5885
+ - *Type:* aws-cdk-lib.aws_secretsmanager.Secret
5886
+
5887
+ Authentication secret for GitHub containing either app details or personal access token.
5888
+
5889
+ This secret is used to register runners and
5890
+ cancel jobs when the runner fails to start.
5891
+
5892
+ This secret is meant to be edited by the user after being created.
5893
+
5894
+ ---
5895
+
5896
+ ##### `githubPrivateKey`<sup>Required</sup> <a name="githubPrivateKey" id="@cloudsnorkel/cdk-github-runners.Secrets.property.githubPrivateKey"></a>
5897
+
5898
+ ```typescript
5899
+ public readonly githubPrivateKey: Secret;
5900
+ ```
5901
+
5902
+ - *Type:* aws-cdk-lib.aws_secretsmanager.Secret
5903
+
5904
+ GitHub app private key. Not needed when using personal access tokens.
5905
+
5906
+ This secret is meant to be edited by the user after being created. It is separate than the main GitHub secret because inserting private keys into JSON is hard.
5907
+
5908
+ ---
5909
+
5910
+ ##### `setup`<sup>Required</sup> <a name="setup" id="@cloudsnorkel/cdk-github-runners.Secrets.property.setup"></a>
5911
+
5912
+ ```typescript
5913
+ public readonly setup: Secret;
5914
+ ```
5915
+
5916
+ - *Type:* aws-cdk-lib.aws_secretsmanager.Secret
5917
+
5918
+ Setup secret used to authenticate user for our setup wizard.
5919
+
5920
+ Should be empty after setup has been completed.
5921
+
5922
+ ---
5923
+
5924
+ ##### `webhook`<sup>Required</sup> <a name="webhook" id="@cloudsnorkel/cdk-github-runners.Secrets.property.webhook"></a>
5925
+
5926
+ ```typescript
5927
+ public readonly webhook: Secret;
5928
+ ```
5929
+
5930
+ - *Type:* aws-cdk-lib.aws_secretsmanager.Secret
5931
+
5932
+ Webhook secret used to confirm events are coming from GitHub and nowhere else.
5933
+
5934
+ ---
5935
+
5936
+
5937
+ ## Structs <a name="Structs" id="Structs"></a>
5938
+
5939
+ ### AlwaysOnWarmRunnerProps <a name="AlwaysOnWarmRunnerProps" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps"></a>
5940
+
5941
+ Properties for always on warm runners.
5942
+
5943
+ #### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.Initializer"></a>
5944
+
5945
+ ```typescript
5946
+ import { AlwaysOnWarmRunnerProps } from '@cloudsnorkel/cdk-github-runners'
5947
+
5948
+ const alwaysOnWarmRunnerProps: AlwaysOnWarmRunnerProps = { ... }
5949
+ ```
5950
+
5951
+ #### Properties <a name="Properties" id="Properties"></a>
5952
+
5953
+ | **Name** | **Type** | **Description** |
5954
+ | --- | --- | --- |
5955
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.count">count</a></code> | <code>number</code> | Number of warm runners to maintain. |
5956
+ | <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). |
5957
+ | <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. |
5958
+ | <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. |
5959
+ | <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. |
5960
+ | <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. |
5961
+
5962
+ ---
5963
+
5964
+ ##### `count`<sup>Required</sup> <a name="count" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.count"></a>
5965
+
5966
+ ```typescript
5967
+ public readonly count: number;
5968
+ ```
5969
+
5970
+ - *Type:* number
5971
+
5972
+ Number of warm runners to maintain.
5973
+
5974
+ ---
5975
+
5976
+ ##### `owner`<sup>Required</sup> <a name="owner" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.owner"></a>
5019
5977
 
5020
5978
  ```typescript
5021
- public readonly node: Node;
5979
+ public readonly owner: string;
5022
5980
  ```
5023
5981
 
5024
- - *Type:* constructs.Node
5982
+ - *Type:* string
5025
5983
 
5026
- The tree node.
5984
+ GitHub owner where runners will be registered (org or user login).
5027
5985
 
5028
5986
  ---
5029
5987
 
5030
- ##### `github`<sup>Required</sup> <a name="github" id="@cloudsnorkel/cdk-github-runners.Secrets.property.github"></a>
5988
+ ##### `provider`<sup>Required</sup> <a name="provider" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.provider"></a>
5031
5989
 
5032
5990
  ```typescript
5033
- public readonly github: Secret;
5991
+ public readonly provider: IRunnerProvider | ICompositeProvider;
5034
5992
  ```
5035
5993
 
5036
- - *Type:* aws-cdk-lib.aws_secretsmanager.Secret
5037
-
5038
- Authentication secret for GitHub containing either app details or personal access token.
5994
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a> | <a href="#@cloudsnorkel/cdk-github-runners.ICompositeProvider">ICompositeProvider</a>
5039
5995
 
5040
- This secret is used to register runners and
5041
- cancel jobs when the runner fails to start.
5996
+ Provider to use.
5042
5997
 
5043
- This secret is meant to be edited by the user after being created.
5998
+ Warm runners bypass the provider selector they always use
5999
+ this provider, regardless of job characteristics. Labels cannot be modified.
5044
6000
 
5045
6001
  ---
5046
6002
 
5047
- ##### `githubPrivateKey`<sup>Required</sup> <a name="githubPrivateKey" id="@cloudsnorkel/cdk-github-runners.Secrets.property.githubPrivateKey"></a>
6003
+ ##### `runners`<sup>Required</sup> <a name="runners" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.runners"></a>
5048
6004
 
5049
6005
  ```typescript
5050
- public readonly githubPrivateKey: Secret;
6006
+ public readonly runners: GitHubRunners;
5051
6007
  ```
5052
6008
 
5053
- - *Type:* aws-cdk-lib.aws_secretsmanager.Secret
5054
-
5055
- GitHub app private key. Not needed when using personal access tokens.
6009
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners">GitHubRunners</a>
5056
6010
 
5057
- This secret is meant to be edited by the user after being created. It is separate than the main GitHub secret because inserting private keys into JSON is hard.
6011
+ The GitHubRunners construct that owns the shared warm runner infrastructure.
5058
6012
 
5059
6013
  ---
5060
6014
 
5061
- ##### `setup`<sup>Required</sup> <a name="setup" id="@cloudsnorkel/cdk-github-runners.Secrets.property.setup"></a>
6015
+ ##### `registrationLevel`<sup>Optional</sup> <a name="registrationLevel" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.registrationLevel"></a>
5062
6016
 
5063
6017
  ```typescript
5064
- public readonly setup: Secret;
6018
+ public readonly registrationLevel: string;
5065
6019
  ```
5066
6020
 
5067
- - *Type:* aws-cdk-lib.aws_secretsmanager.Secret
6021
+ - *Type:* string
6022
+ - *Default:* 'repo'
5068
6023
 
5069
- Setup secret used to authenticate user for our setup wizard.
6024
+ Registration level must match how your runners are set up in GitHub.
5070
6025
 
5071
- Should be empty after setup has been completed.
6026
+ Choose
6027
+ 'org' for org-wide runners, 'repo' for repo-level. See the setup wizard for choosing repo vs org.
6028
+
6029
+ > [https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md](https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md)
5072
6030
 
5073
6031
  ---
5074
6032
 
5075
- ##### `webhook`<sup>Required</sup> <a name="webhook" id="@cloudsnorkel/cdk-github-runners.Secrets.property.webhook"></a>
6033
+ ##### `repo`<sup>Optional</sup> <a name="repo" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunnerProps.property.repo"></a>
5076
6034
 
5077
6035
  ```typescript
5078
- public readonly webhook: Secret;
6036
+ public readonly repo: string;
5079
6037
  ```
5080
6038
 
5081
- - *Type:* aws-cdk-lib.aws_secretsmanager.Secret
5082
-
5083
- Webhook secret used to confirm events are coming from GitHub and nowhere else.
6039
+ - *Type:* string
5084
6040
 
5085
- ---
6041
+ Repository name (without owner) where runners will be registered.
5086
6042
 
6043
+ Required when `registrationLevel` is 'repo'.
5087
6044
 
5088
- ## Structs <a name="Structs" id="Structs"></a>
6045
+ ---
5089
6046
 
5090
6047
  ### AmiBuilderProps <a name="AmiBuilderProps" id="@cloudsnorkel/cdk-github-runners.AmiBuilderProps"></a>
5091
6048
 
@@ -5752,6 +6709,7 @@ const codeBuildRunnerProviderProps: CodeBuildRunnerProviderProps = { ... }
5752
6709
  | <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
6710
  | <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
6711
  | <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. |
6712
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProviderProps.property.gpu">gpu</a></code> | <code>boolean</code> | Use GPU compute for builds. |
5755
6713
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProviderProps.property.group">group</a></code> | <code>string</code> | GitHub Actions runner group name. |
5756
6714
  | <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
6715
  | <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 +6805,31 @@ speed up provisioning of CodeBuild runners. If you don't intend on running or bu
5847
6805
 
5848
6806
  ---
5849
6807
 
6808
+ ##### `gpu`<sup>Optional</sup> <a name="gpu" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProviderProps.property.gpu"></a>
6809
+
6810
+ ```typescript
6811
+ public readonly gpu: boolean;
6812
+ ```
6813
+
6814
+ - *Type:* boolean
6815
+ - *Default:* false
6816
+
6817
+ Use GPU compute for builds.
6818
+
6819
+ When enabled, the default compute type is BUILD_GENERAL1_SMALL (4 vCPU, 16 GB RAM, 1 NVIDIA A10G GPU).
6820
+
6821
+ You can override the compute type using the `computeType` property (for example, to use BUILD_GENERAL1_LARGE for more resources),
6822
+ subject to the supported GPU compute types.
6823
+
6824
+ When using GPU compute, ensure your runner image includes any required GPU libraries (for example, CUDA)
6825
+ either by using a base image that has them preinstalled (such as an appropriate nvidia/cuda image) or by
6826
+ adding image components that install them. The default image builder does not automatically switch to a
6827
+ CUDA-enabled base image when GPU is enabled.
6828
+
6829
+ GPU compute is only available for Linux x64 images. Not supported on Windows or ARM.
6830
+
6831
+ ---
6832
+
5850
6833
  ##### `group`<sup>Optional</sup> <a name="group" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProviderProps.property.group"></a>
5851
6834
 
5852
6835
  ```typescript
@@ -6327,6 +7310,11 @@ public readonly instanceType: InstanceType;
6327
7310
 
6328
7311
  Instance type for launched runner instances.
6329
7312
 
7313
+ For GPU instance types (g4dn, g5, p3, etc.), we automatically use a GPU base image (AWS Deep Learning AMI)
7314
+ with NVIDIA drivers pre-installed. If you provide your own image builder, use
7315
+ `baseAmi: BaseImage.fromGpuBase(os, architecture)` or another image preloaded with NVIDIA drivers, or use
7316
+ an image component to install NVIDIA drivers.
7317
+
6330
7318
  ---
6331
7319
 
6332
7320
  ##### `labels`<sup>Optional</sup> <a name="labels" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProviderProps.property.labels"></a>
@@ -6496,6 +7484,7 @@ const ecsRunnerProviderProps: EcsRunnerProviderProps = { ... }
6496
7484
  | <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
7485
  | <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
7486
  | <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. |
7487
+ | <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
7488
  | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.group">group</a></code> | <code>string</code> | GitHub Actions runner group name. |
6500
7489
  | <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
7490
  | <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 +7623,26 @@ speed up provisioning of CodeBuild runners. If you don't intend on running or bu
6634
7623
 
6635
7624
  ---
6636
7625
 
7626
+ ##### `gpu`<sup>Optional</sup> <a name="gpu" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.gpu"></a>
7627
+
7628
+ ```typescript
7629
+ public readonly gpu: number;
7630
+ ```
7631
+
7632
+ - *Type:* number
7633
+ - *Default:* undefined (no GPU)
7634
+
7635
+ Number of GPUs to request for the runner task. When set, the task will be scheduled on GPU-capable instances.
7636
+
7637
+ Requires a GPU-capable instance type (e.g., g4dn.xlarge for 1 GPU, g4dn.12xlarge for 4 GPUs) and GPU AMI.
7638
+ When creating a new cluster, instanceType defaults to g4dn.xlarge and the ECS Optimized GPU AMI is used.
7639
+
7640
+ You must ensure that the task's container image includes the CUDA runtime. Provide a CUDA-enabled base image
7641
+ via `baseDockerImage`, use an image builder that starts from a GPU-capable image (such as nvidia/cuda), or add
7642
+ an image component that installs the CUDA runtime into the image.
7643
+
7644
+ ---
7645
+
6637
7646
  ##### `group`<sup>Optional</sup> <a name="group" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProviderProps.property.group"></a>
6638
7647
 
6639
7648
  ```typescript
@@ -7410,7 +8419,9 @@ Optional Lambda function to customize provider selection logic and label assignm
7410
8419
 
7411
8420
  **WARNING: Provider selection is not a guarantee that a specific provider will be assigned for the job. GitHub Actions may assign the job to any runner with matching labels. The provider selector only determines which provider's runner will be *created*, but GitHub Actions may route the job to any available runner with the required labels.**
7412
8421
 
7413
- **For reliable provider assignment based on job characteristics, consider using repo-level runner registration where you can control which runners are available for specific repositories. See {@link SETUP_GITHUB.md } for more details on the different registration levels. This information is also available while using the setup wizard.
8422
+ **For reliable provider assignment based on job characteristics, consider using repo-level runner registration where you can control which runners are available for specific repositories. This information is also available while using the setup wizard.
8423
+
8424
+ > [https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md](https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md)
7414
8425
 
7415
8426
  ---
7416
8427
 
@@ -8923,123 +9934,140 @@ public readonly retryOptions: ProviderRetryOptions;
8923
9934
 
8924
9935
  ---
8925
9936
 
8926
- ### RunnerRuntimeParameters <a name="RunnerRuntimeParameters" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters"></a>
8927
-
8928
- Workflow job parameters as parsed from the webhook event. Pass these into your runner executor and run something like:.
8929
-
8930
- ```sh
8931
- ./config.sh --unattended --url "{REGISTRATION_URL}" --token "${RUNNER_TOKEN}" --ephemeral --work _work --labels "${RUNNER_LABEL}" --name "${RUNNER_NAME}" --disableupdate
8932
- ```
9937
+ ### ScheduledWarmRunnerProps <a name="ScheduledWarmRunnerProps" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps"></a>
8933
9938
 
8934
- All parameters are specified as step function paths and therefore must be used only in step function task parameters.
9939
+ Properties for scheduled warm runners.
8935
9940
 
8936
- #### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.Initializer"></a>
9941
+ #### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.Initializer"></a>
8937
9942
 
8938
9943
  ```typescript
8939
- import { RunnerRuntimeParameters } from '@cloudsnorkel/cdk-github-runners'
9944
+ import { ScheduledWarmRunnerProps } from '@cloudsnorkel/cdk-github-runners'
8940
9945
 
8941
- const runnerRuntimeParameters: RunnerRuntimeParameters = { ... }
9946
+ const scheduledWarmRunnerProps: ScheduledWarmRunnerProps = { ... }
8942
9947
  ```
8943
9948
 
8944
9949
  #### Properties <a name="Properties" id="Properties"></a>
8945
9950
 
8946
9951
  | **Name** | **Type** | **Description** |
8947
9952
  | --- | --- | --- |
8948
- | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.githubDomainPath">githubDomainPath</a></code> | <code>string</code> | Path to GitHub domain. |
8949
- | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.labelsPath">labelsPath</a></code> | <code>string</code> | Path to comma-separated labels string to use for runner. |
8950
- | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.ownerPath">ownerPath</a></code> | <code>string</code> | Path to repository owner name. |
8951
- | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.registrationUrl">registrationUrl</a></code> | <code>string</code> | Repository or organization URL to register runner at. |
8952
- | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.repoPath">repoPath</a></code> | <code>string</code> | Path to repository name. |
8953
- | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.runnerNamePath">runnerNamePath</a></code> | <code>string</code> | Path to desired runner name. |
8954
- | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.runnerTokenPath">runnerTokenPath</a></code> | <code>string</code> | Path to runner token used to register token. |
9953
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.count">count</a></code> | <code>number</code> | Number of warm runners to maintain. |
9954
+ | <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). |
9955
+ | <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). |
9956
+ | <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. |
9957
+ | <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. |
9958
+ | <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). |
9959
+ | <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. |
9960
+ | <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. |
8955
9961
 
8956
9962
  ---
8957
9963
 
8958
- ##### `githubDomainPath`<sup>Required</sup> <a name="githubDomainPath" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.githubDomainPath"></a>
9964
+ ##### `count`<sup>Required</sup> <a name="count" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.count"></a>
8959
9965
 
8960
9966
  ```typescript
8961
- public readonly githubDomainPath: string;
9967
+ public readonly count: number;
8962
9968
  ```
8963
9969
 
8964
- - *Type:* string
9970
+ - *Type:* number
8965
9971
 
8966
- Path to GitHub domain.
9972
+ Number of warm runners to maintain.
8967
9973
 
8968
- Most of the time this will be github.com but for self-hosted GitHub instances, this will be different.
9974
+ ---
9975
+
9976
+ ##### `duration`<sup>Required</sup> <a name="duration" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.duration"></a>
9977
+
9978
+ ```typescript
9979
+ public readonly duration: Duration;
9980
+ ```
9981
+
9982
+ - *Type:* aws-cdk-lib.Duration
9983
+
9984
+ How long the warm runners should be maintained from the fill time (schedule).
9985
+
9986
+ Defines the end of the
9987
+ window (schedule time + duration).
8969
9988
 
8970
9989
  ---
8971
9990
 
8972
- ##### `labelsPath`<sup>Required</sup> <a name="labelsPath" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.labelsPath"></a>
9991
+ ##### `owner`<sup>Required</sup> <a name="owner" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.owner"></a>
8973
9992
 
8974
9993
  ```typescript
8975
- public readonly labelsPath: string;
9994
+ public readonly owner: string;
8976
9995
  ```
8977
9996
 
8978
9997
  - *Type:* string
8979
9998
 
8980
- Path to comma-separated labels string to use for runner.
9999
+ GitHub owner where runners will be registered (org or user login).
8981
10000
 
8982
10001
  ---
8983
10002
 
8984
- ##### `ownerPath`<sup>Required</sup> <a name="ownerPath" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.ownerPath"></a>
10003
+ ##### `provider`<sup>Required</sup> <a name="provider" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.provider"></a>
8985
10004
 
8986
10005
  ```typescript
8987
- public readonly ownerPath: string;
10006
+ public readonly provider: IRunnerProvider | ICompositeProvider;
8988
10007
  ```
8989
10008
 
8990
- - *Type:* string
10009
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a> | <a href="#@cloudsnorkel/cdk-github-runners.ICompositeProvider">ICompositeProvider</a>
8991
10010
 
8992
- Path to repository owner name.
10011
+ Provider to use.
10012
+
10013
+ Warm runners bypass the provider selector — they always use
10014
+ this provider, regardless of job characteristics. Labels cannot be modified.
8993
10015
 
8994
10016
  ---
8995
10017
 
8996
- ##### `registrationUrl`<sup>Required</sup> <a name="registrationUrl" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.registrationUrl"></a>
10018
+ ##### `runners`<sup>Required</sup> <a name="runners" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.runners"></a>
8997
10019
 
8998
10020
  ```typescript
8999
- public readonly registrationUrl: string;
10021
+ public readonly runners: GitHubRunners;
9000
10022
  ```
9001
10023
 
9002
- - *Type:* string
10024
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.GitHubRunners">GitHubRunners</a>
9003
10025
 
9004
- Repository or organization URL to register runner at.
10026
+ The GitHubRunners construct that owns the shared warm runner infrastructure.
9005
10027
 
9006
10028
  ---
9007
10029
 
9008
- ##### `repoPath`<sup>Required</sup> <a name="repoPath" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.repoPath"></a>
10030
+ ##### `schedule`<sup>Required</sup> <a name="schedule" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.schedule"></a>
9009
10031
 
9010
10032
  ```typescript
9011
- public readonly repoPath: string;
10033
+ public readonly schedule: Schedule;
9012
10034
  ```
9013
10035
 
9014
- - *Type:* string
10036
+ - *Type:* aws-cdk-lib.aws_events.Schedule
9015
10037
 
9016
- Path to repository name.
10038
+ When to start filling the pool (e.g. start of business hours).
9017
10039
 
9018
10040
  ---
9019
10041
 
9020
- ##### `runnerNamePath`<sup>Required</sup> <a name="runnerNamePath" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.runnerNamePath"></a>
10042
+ ##### `registrationLevel`<sup>Optional</sup> <a name="registrationLevel" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.registrationLevel"></a>
9021
10043
 
9022
10044
  ```typescript
9023
- public readonly runnerNamePath: string;
10045
+ public readonly registrationLevel: string;
9024
10046
  ```
9025
10047
 
9026
10048
  - *Type:* string
10049
+ - *Default:* 'repo'
9027
10050
 
9028
- Path to desired runner name.
10051
+ Registration level must match how your runners are set up in GitHub.
9029
10052
 
9030
- We specifically set the name to make troubleshooting easier.
10053
+ Choose
10054
+ 'org' for org-wide runners, 'repo' for repo-level. See the setup wizard for choosing repo vs org.
10055
+
10056
+ > [https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md](https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md)
9031
10057
 
9032
10058
  ---
9033
10059
 
9034
- ##### `runnerTokenPath`<sup>Required</sup> <a name="runnerTokenPath" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.runnerTokenPath"></a>
10060
+ ##### `repo`<sup>Optional</sup> <a name="repo" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps.property.repo"></a>
9035
10061
 
9036
10062
  ```typescript
9037
- public readonly runnerTokenPath: string;
10063
+ public readonly repo: string;
9038
10064
  ```
9039
10065
 
9040
10066
  - *Type:* string
9041
10067
 
9042
- Path to runner token used to register token.
10068
+ Repository name (without owner) where runners will be registered.
10069
+
10070
+ Required when `registrationLevel` is 'repo'.
9043
10071
 
9044
10072
  ---
9045
10073
 
@@ -9499,6 +10527,7 @@ new BaseImage(image: string)
9499
10527
  | **Name** | **Description** |
9500
10528
  | --- | --- |
9501
10529
  | <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. |
10530
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.BaseImage.fromGpuBase">fromGpuBase</a></code> | A base AMI with NVIDIA drivers pre-installed for GPU workloads. |
9502
10531
  | <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
10532
  | <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
10533
  | <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 +10554,36 @@ The AMI ID to use as the base image.
9525
10554
 
9526
10555
  ---
9527
10556
 
10557
+ ##### `fromGpuBase` <a name="fromGpuBase" id="@cloudsnorkel/cdk-github-runners.BaseImage.fromGpuBase"></a>
10558
+
10559
+ ```typescript
10560
+ import { BaseImage } from '@cloudsnorkel/cdk-github-runners'
10561
+
10562
+ BaseImage.fromGpuBase(os: Os, architecture: Architecture)
10563
+ ```
10564
+
10565
+ A base AMI with NVIDIA drivers pre-installed for GPU workloads.
10566
+
10567
+ Uses AWS Deep Learning AMIs for Linux (Ubuntu, Amazon Linux 2, Amazon Linux 2023).
10568
+ For Windows, subscribe to NVIDIA RTX Virtual Workstation in AWS Marketplace, then use
10569
+ {@link fromMarketplaceProductId} with the product ID.
10570
+
10571
+ ###### `os`<sup>Required</sup> <a name="os" id="@cloudsnorkel/cdk-github-runners.BaseImage.fromGpuBase.parameter.os"></a>
10572
+
10573
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a>
10574
+
10575
+ Target operating system.
10576
+
10577
+ ---
10578
+
10579
+ ###### `architecture`<sup>Required</sup> <a name="architecture" id="@cloudsnorkel/cdk-github-runners.BaseImage.fromGpuBase.parameter.architecture"></a>
10580
+
10581
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a>
10582
+
10583
+ Target architecture.
10584
+
10585
+ ---
10586
+
9528
10587
  ##### `fromImageBuilder` <a name="fromImageBuilder" id="@cloudsnorkel/cdk-github-runners.BaseImage.fromImageBuilder"></a>
9529
10588
 
9530
10589
  ```typescript
@@ -11144,22 +12203,26 @@ log groups, or retryable errors as they delegate to their sub-providers.
11144
12203
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ICompositeProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function tasks that execute the runner. |
11145
12204
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ICompositeProvider.grantStateMachine">grantStateMachine</a></code> | An optional method that modifies the role of the state machine after all the tasks have been generated. |
11146
12205
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ICompositeProvider.status">status</a></code> | Return statuses of all sub-providers to be used in the main status function. |
12206
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.ICompositeProvider.stepFunctionConstants">stepFunctionConstants</a></code> | Merged constants from all sub-providers for the single orchestrator `$.consts` pass. Duplicate keys across sub-providers must be avoided. |
11147
12207
 
11148
12208
  ---
11149
12209
 
11150
12210
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.ICompositeProvider.getStepFunctionTask"></a>
11151
12211
 
11152
12212
  ```typescript
11153
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
12213
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
11154
12214
  ```
11155
12215
 
11156
12216
  Generate step function tasks that execute the runner.
11157
12217
 
12218
+ If the provider has multiple attempts, each attempt should be followed by a `Catch` that deletes the failed runner. Use
12219
+ {@link IRunnerRuntimeParameters.addCatchAndCleanUp} to add the catch.
12220
+
11158
12221
  Called by GithubRunners and shouldn't be called manually.
11159
12222
 
11160
12223
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.ICompositeProvider.getStepFunctionTask.parameter.parameters"></a>
11161
12224
 
11162
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
12225
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
11163
12226
 
11164
12227
  specific build parameters.
11165
12228
 
@@ -11202,6 +12265,14 @@ grantable for the status function.
11202
12265
 
11203
12266
  ---
11204
12267
 
12268
+ ##### `stepFunctionConstants` <a name="stepFunctionConstants" id="@cloudsnorkel/cdk-github-runners.ICompositeProvider.stepFunctionConstants"></a>
12269
+
12270
+ ```typescript
12271
+ public stepFunctionConstants(): {[ key: string ]: string}
12272
+ ```
12273
+
12274
+ Merged constants from all sub-providers for the single orchestrator `$.consts` pass. Duplicate keys across sub-providers must be avoided.
12275
+
11205
12276
  #### Properties <a name="Properties" id="Properties"></a>
11206
12277
 
11207
12278
  | **Name** | **Type** | **Description** |
@@ -11491,6 +12562,8 @@ Interface for all runner providers.
11491
12562
 
11492
12563
  Implementations create all required resources and return a step function task that starts those resources from {@link getStepFunctionTask}.
11493
12564
 
12565
+ This interface is not guaranteed to be stable. If you end up implementing your own provider, please let us know so we can consider changing that contract.
12566
+
11494
12567
  #### Methods <a name="Methods" id="Methods"></a>
11495
12568
 
11496
12569
  | **Name** | **Description** |
@@ -11498,13 +12571,14 @@ Implementations create all required resources and return a step function task th
11498
12571
  | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function tasks that execute the runner. |
11499
12572
  | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider.grantStateMachine">grantStateMachine</a></code> | An optional method that modifies the role of the state machine after all the tasks have been generated. |
11500
12573
  | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider.status">status</a></code> | Return status of the runner provider to be used in the main status function. |
12574
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider.stepFunctionConstants">stepFunctionConstants</a></code> | Static string constants injected once into the orchestrator execution input at `$.consts`. Use unique keys for dynamic values (e.g. include `this.node.path` in the key). Values must be plain strings known at synthesis time. |
11501
12575
 
11502
12576
  ---
11503
12577
 
11504
12578
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.IRunnerProvider.getStepFunctionTask"></a>
11505
12579
 
11506
12580
  ```typescript
11507
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
12581
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
11508
12582
  ```
11509
12583
 
11510
12584
  Generate step function tasks that execute the runner.
@@ -11513,7 +12587,7 @@ Called by GithubRunners and shouldn't be called manually.
11513
12587
 
11514
12588
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.IRunnerProvider.getStepFunctionTask.parameter.parameters"></a>
11515
12589
 
11516
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
12590
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
11517
12591
 
11518
12592
  specific build parameters.
11519
12593
 
@@ -11556,6 +12630,16 @@ grantable for the status function.
11556
12630
 
11557
12631
  ---
11558
12632
 
12633
+ ##### `stepFunctionConstants` <a name="stepFunctionConstants" id="@cloudsnorkel/cdk-github-runners.IRunnerProvider.stepFunctionConstants"></a>
12634
+
12635
+ ```typescript
12636
+ public stepFunctionConstants(): {[ key: string ]: string}
12637
+ ```
12638
+
12639
+ Static string constants injected once into the orchestrator execution input at `$.consts`. Use unique keys for dynamic values (e.g. include `this.node.path` in the key). Values must be plain strings known at synthesis time.
12640
+
12641
+ To use the constants in your provider, use `'$.consts.key'` as a path.
12642
+
11559
12643
  #### Properties <a name="Properties" id="Properties"></a>
11560
12644
 
11561
12645
  | **Name** | **Type** | **Description** |
@@ -11780,6 +12864,156 @@ VPC where runners will be launched.
11780
12864
 
11781
12865
  ---
11782
12866
 
12867
+ ### IRunnerRuntimeParameters <a name="IRunnerRuntimeParameters" id="@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters"></a>
12868
+
12869
+ - *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
12870
+
12871
+ Workflow job parameters as parsed from the webhook event. Pass these into your runner executor and run something like:.
12872
+
12873
+ ```sh
12874
+ ./config.sh --unattended --url "{REGISTRATION_URL}" --token "${RUNNER_TOKEN}" --ephemeral --work _work --labels "${RUNNER_LABEL}" --name "${RUNNER_NAME}" --disableupdate
12875
+ ```
12876
+
12877
+ All parameters are specified as step function paths and therefore must be used only in step function task parameters.
12878
+
12879
+ #### Methods <a name="Methods" id="Methods"></a>
12880
+
12881
+ | **Name** | **Description** |
12882
+ | --- | --- |
12883
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.addCatchAndCleanUp">addCatchAndCleanUp</a></code> | Catches all errors and cleans up the failed runner from GitHub Actions. |
12884
+
12885
+ ---
12886
+
12887
+ ##### `addCatchAndCleanUp` <a name="addCatchAndCleanUp" id="@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.addCatchAndCleanUp"></a>
12888
+
12889
+ ```typescript
12890
+ public addCatchAndCleanUp(state: TaskStateBase | Parallel | Map, next?: IChainable): void
12891
+ ```
12892
+
12893
+ Catches all errors and cleans up the failed runner from GitHub Actions.
12894
+
12895
+ It is important to fully clean up after any failed runner provisioning. GitHub
12896
+ will fail booting a new runner if the previous one with the same name is not
12897
+ fully cleaned up.
12898
+
12899
+ ###### `state`<sup>Required</sup> <a name="state" id="@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.addCatchAndCleanUp.parameter.state"></a>
12900
+
12901
+ - *Type:* aws-cdk-lib.aws_stepfunctions.TaskStateBase | aws-cdk-lib.aws_stepfunctions.Parallel | aws-cdk-lib.aws_stepfunctions.Map
12902
+
12903
+ state whose failures should trigger cleanup.
12904
+
12905
+ ---
12906
+
12907
+ ###### `next`<sup>Optional</sup> <a name="next" id="@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.addCatchAndCleanUp.parameter.next"></a>
12908
+
12909
+ - *Type:* aws-cdk-lib.aws_stepfunctions.IChainable
12910
+
12911
+ optional subgraph to run after cleanup.
12912
+
12913
+ ---
12914
+
12915
+ #### Properties <a name="Properties" id="Properties"></a>
12916
+
12917
+ | **Name** | **Type** | **Description** |
12918
+ | --- | --- | --- |
12919
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.property.githubDomainPath">githubDomainPath</a></code> | <code>string</code> | Path to GitHub domain. |
12920
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.property.labelsPath">labelsPath</a></code> | <code>string</code> | Path to comma-separated labels string to use for runner. |
12921
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.property.ownerPath">ownerPath</a></code> | <code>string</code> | Path to repository owner name. |
12922
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.property.registrationUrl">registrationUrl</a></code> | <code>string</code> | Repository or organization URL to register runner at. |
12923
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.property.repoPath">repoPath</a></code> | <code>string</code> | Path to repository name. |
12924
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.property.runnerNamePath">runnerNamePath</a></code> | <code>string</code> | Path to desired runner name. |
12925
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.property.runnerTokenPath">runnerTokenPath</a></code> | <code>string</code> | Path to runner token used to register token. |
12926
+
12927
+ ---
12928
+
12929
+ ##### `githubDomainPath`<sup>Required</sup> <a name="githubDomainPath" id="@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.property.githubDomainPath"></a>
12930
+
12931
+ ```typescript
12932
+ public readonly githubDomainPath: string;
12933
+ ```
12934
+
12935
+ - *Type:* string
12936
+
12937
+ Path to GitHub domain.
12938
+
12939
+ Most of the time this will be github.com but for self-hosted GitHub instances, this will be different.
12940
+
12941
+ ---
12942
+
12943
+ ##### `labelsPath`<sup>Required</sup> <a name="labelsPath" id="@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.property.labelsPath"></a>
12944
+
12945
+ ```typescript
12946
+ public readonly labelsPath: string;
12947
+ ```
12948
+
12949
+ - *Type:* string
12950
+
12951
+ Path to comma-separated labels string to use for runner.
12952
+
12953
+ ---
12954
+
12955
+ ##### `ownerPath`<sup>Required</sup> <a name="ownerPath" id="@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.property.ownerPath"></a>
12956
+
12957
+ ```typescript
12958
+ public readonly ownerPath: string;
12959
+ ```
12960
+
12961
+ - *Type:* string
12962
+
12963
+ Path to repository owner name.
12964
+
12965
+ ---
12966
+
12967
+ ##### `registrationUrl`<sup>Required</sup> <a name="registrationUrl" id="@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.property.registrationUrl"></a>
12968
+
12969
+ ```typescript
12970
+ public readonly registrationUrl: string;
12971
+ ```
12972
+
12973
+ - *Type:* string
12974
+
12975
+ Repository or organization URL to register runner at.
12976
+
12977
+ ---
12978
+
12979
+ ##### `repoPath`<sup>Required</sup> <a name="repoPath" id="@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.property.repoPath"></a>
12980
+
12981
+ ```typescript
12982
+ public readonly repoPath: string;
12983
+ ```
12984
+
12985
+ - *Type:* string
12986
+
12987
+ Path to repository name.
12988
+
12989
+ ---
12990
+
12991
+ ##### `runnerNamePath`<sup>Required</sup> <a name="runnerNamePath" id="@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.property.runnerNamePath"></a>
12992
+
12993
+ ```typescript
12994
+ public readonly runnerNamePath: string;
12995
+ ```
12996
+
12997
+ - *Type:* string
12998
+
12999
+ Path to desired runner name.
13000
+
13001
+ We specifically set the name to make troubleshooting easier.
13002
+
13003
+ ---
13004
+
13005
+ ##### `runnerTokenPath`<sup>Required</sup> <a name="runnerTokenPath" id="@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters.property.runnerTokenPath"></a>
13006
+
13007
+ ```typescript
13008
+ public readonly runnerTokenPath: string;
13009
+ ```
13010
+
13011
+ - *Type:* string
13012
+
13013
+ Path to runner token used to register token.
13014
+
13015
+ ---
13016
+
11783
13017
  ## Enums <a name="Enums" id="Enums"></a>
11784
13018
 
11785
13019
  ### RunnerImageBuilderType <a name="RunnerImageBuilderType" id="@cloudsnorkel/cdk-github-runners.RunnerImageBuilderType"></a>