@cloudsnorkel/cdk-github-runners 0.15.0 → 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 (42) hide show
  1. package/.jsii +533 -327
  2. package/API.md +384 -174
  3. package/README.md +1 -1
  4. package/assets/delete-failed-runner.lambda/index.js +23 -6
  5. package/assets/idle-runner-repear.lambda/index.js +23 -6
  6. package/assets/setup.lambda/index.html +7 -7
  7. package/assets/setup.lambda/index.js +23 -6
  8. package/assets/status.lambda/index.js +23 -6
  9. package/assets/token-retriever.lambda/index.js +23 -6
  10. package/assets/warm-runner-manager.lambda/index.js +23 -6
  11. package/assets/webhook-handler.lambda/index.js +23 -6
  12. package/assets/webhook-redelivery.lambda/index.js +23 -6
  13. package/lib/access.js +1 -1
  14. package/lib/image-builders/api.js +1 -1
  15. package/lib/image-builders/aws-image-builder/base-image.js +2 -2
  16. package/lib/image-builders/aws-image-builder/builder.js +1 -1
  17. package/lib/image-builders/aws-image-builder/deprecated/ami.js +1 -1
  18. package/lib/image-builders/aws-image-builder/deprecated/container.js +1 -1
  19. package/lib/image-builders/aws-image-builder/deprecated/linux-components.js +1 -1
  20. package/lib/image-builders/aws-image-builder/deprecated/windows-components.js +1 -1
  21. package/lib/image-builders/codebuild-deprecated.js +1 -1
  22. package/lib/image-builders/components.js +1 -1
  23. package/lib/image-builders/static.js +1 -1
  24. package/lib/providers/codebuild.d.ts +2 -2
  25. package/lib/providers/codebuild.js +3 -3
  26. package/lib/providers/common.d.ts +47 -3
  27. package/lib/providers/common.js +29 -5
  28. package/lib/providers/composite.js +14 -19
  29. package/lib/providers/ec2.d.ts +4 -2
  30. package/lib/providers/ec2.js +58 -30
  31. package/lib/providers/ecs.d.ts +2 -2
  32. package/lib/providers/ecs.js +8 -8
  33. package/lib/providers/fargate.d.ts +2 -2
  34. package/lib/providers/fargate.js +13 -8
  35. package/lib/providers/lambda.d.ts +2 -2
  36. package/lib/providers/lambda.js +3 -3
  37. package/lib/runner.d.ts +6 -1
  38. package/lib/runner.js +54 -31
  39. package/lib/secrets.js +1 -1
  40. package/lib/warm-runner.d.ts +15 -7
  41. package/lib/warm-runner.js +19 -12
  42. package/package.json +15 -15
package/API.md CHANGED
@@ -8,30 +8,49 @@ Warm runners that run 24/7. Fills at midnight UTC and each runner stays alive fo
8
8
 
9
9
  Runners will be provisioned using the specified provider and registered in the specified repository or organization.
10
10
 
11
- Registration level must match the one selected during setup. See {@link SETUP_GITHUB.md } for more information on the selection.
11
+ Registration level must match the one selected during setup.
12
+
13
+ > [https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md
12
14
 
13
15
  ## Limitations
14
16
 
15
17
  - Jobs will still trigger provisioning of on-demand runners, even if a warm runner ends up being used.
16
18
  - You may briefly see more than `count` runners when changing config or at rotation.
17
19
  - To remove: set `count` to 0, deploy, wait for warm runners to stop, then remove and deploy again.
18
- If you don't follow this procedure, warm runners may linger until they expire.
20
+ If you don't follow this procedure, warm runners may linger until they expire.
19
21
  - Provider failures or timeouts (like Lambda provider timing out after 15 minutes) will result in a
20
- gap in coverage until the retry succeeds. Current retry mechanism has built-in back-off rate and
21
- can be tweaked using `retryOptions`. This will be improved in the future.
22
-
23
- *Example*
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
24
 
25
25
  ```typescript
26
26
  new AlwaysOnWarmRunner(stack, 'AlwaysOnLinux', {
27
- runners,
28
- provider: myProvider,
29
- count: 3,
30
- owner: 'my-org',
31
- repo: 'my-repo',
27
+ runners,
28
+ provider: myProvider,
29
+ count: 3,
30
+ owner: 'my-org',
31
+ repo: 'my-repo',
32
32
  });
33
- ```
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.
34
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
+ ```)
35
54
 
36
55
  #### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.AlwaysOnWarmRunner.Initializer"></a>
37
56
 
@@ -801,6 +820,7 @@ new CodeBuildRunner(scope: Construct, id: string, props?: CodeBuildRunnerProvide
801
820
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
802
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. |
803
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. |
804
824
 
805
825
  ---
806
826
 
@@ -836,7 +856,7 @@ The mixins to apply.
836
856
  ##### ~~`getStepFunctionTask`~~ <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunner.getStepFunctionTask"></a>
837
857
 
838
858
  ```typescript
839
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
859
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
840
860
  ```
841
861
 
842
862
  Generate step function task(s) to start a new runner.
@@ -845,7 +865,7 @@ Called by GithubRunners and shouldn't be called manually.
845
865
 
846
866
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunner.getStepFunctionTask.parameter.parameters"></a>
847
867
 
848
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
868
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
849
869
 
850
870
  workflow job details.
851
871
 
@@ -884,6 +904,14 @@ Also gives the status function any needed permissions to query the Docker image
884
904
 
885
905
  ---
886
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
+
887
915
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
888
916
 
889
917
  | **Name** | **Description** |
@@ -1209,6 +1237,7 @@ new CodeBuildRunnerProvider(scope: Construct, id: string, props?: CodeBuildRunne
1209
1237
  | <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
1210
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. |
1211
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. |
1212
1241
 
1213
1242
  ---
1214
1243
 
@@ -1244,7 +1273,7 @@ The mixins to apply.
1244
1273
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.getStepFunctionTask"></a>
1245
1274
 
1246
1275
  ```typescript
1247
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
1276
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
1248
1277
  ```
1249
1278
 
1250
1279
  Generate step function task(s) to start a new runner.
@@ -1253,7 +1282,7 @@ Called by GithubRunners and shouldn't be called manually.
1253
1282
 
1254
1283
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.CodeBuildRunnerProvider.getStepFunctionTask.parameter.parameters"></a>
1255
1284
 
1256
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
1285
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
1257
1286
 
1258
1287
  workflow job details.
1259
1288
 
@@ -1292,6 +1321,14 @@ Also gives the status function any needed permissions to query the Docker image
1292
1321
 
1293
1322
  ---
1294
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
+
1295
1332
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
1296
1333
 
1297
1334
  | **Name** | **Description** |
@@ -1858,6 +1895,7 @@ new Ec2Runner(scope: Construct, id: string, props?: Ec2RunnerProviderProps)
1858
1895
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
1859
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. |
1860
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. |
1861
1899
 
1862
1900
  ---
1863
1901
 
@@ -1893,7 +1931,7 @@ The mixins to apply.
1893
1931
  ##### ~~`getStepFunctionTask`~~ <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.getStepFunctionTask"></a>
1894
1932
 
1895
1933
  ```typescript
1896
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
1934
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
1897
1935
  ```
1898
1936
 
1899
1937
  Generate step function task(s) to start a new runner.
@@ -1902,7 +1940,7 @@ Called by GithubRunners and shouldn't be called manually.
1902
1940
 
1903
1941
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.getStepFunctionTask.parameter.parameters"></a>
1904
1942
 
1905
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
1943
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
1906
1944
 
1907
1945
  workflow job details.
1908
1946
 
@@ -1941,6 +1979,14 @@ Also gives the status function any needed permissions to query the Docker image
1941
1979
 
1942
1980
  ---
1943
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
+
1944
1990
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
1945
1991
 
1946
1992
  | **Name** | **Description** |
@@ -2177,6 +2223,7 @@ new Ec2RunnerProvider(scope: Construct, id: string, props?: Ec2RunnerProviderPro
2177
2223
  | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
2178
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. |
2179
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. |
2180
2227
 
2181
2228
  ---
2182
2229
 
@@ -2212,7 +2259,7 @@ The mixins to apply.
2212
2259
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.getStepFunctionTask"></a>
2213
2260
 
2214
2261
  ```typescript
2215
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
2262
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
2216
2263
  ```
2217
2264
 
2218
2265
  Generate step function task(s) to start a new runner.
@@ -2221,7 +2268,7 @@ Called by GithubRunners and shouldn't be called manually.
2221
2268
 
2222
2269
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProvider.getStepFunctionTask.parameter.parameters"></a>
2223
2270
 
2224
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
2271
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
2225
2272
 
2226
2273
  workflow job details.
2227
2274
 
@@ -2260,6 +2307,14 @@ Also gives the status function any needed permissions to query the Docker image
2260
2307
 
2261
2308
  ---
2262
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
+
2263
2318
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
2264
2319
 
2265
2320
  | **Name** | **Description** |
@@ -2488,6 +2543,7 @@ new EcsRunnerProvider(scope: Construct, id: string, props?: EcsRunnerProviderPro
2488
2543
  | <code><a href="#@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
2489
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. |
2490
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. |
2491
2547
 
2492
2548
  ---
2493
2549
 
@@ -2523,7 +2579,7 @@ The mixins to apply.
2523
2579
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.getStepFunctionTask"></a>
2524
2580
 
2525
2581
  ```typescript
2526
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
2582
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
2527
2583
  ```
2528
2584
 
2529
2585
  Generate step function task(s) to start a new runner.
@@ -2532,7 +2588,7 @@ Called by GithubRunners and shouldn't be called manually.
2532
2588
 
2533
2589
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.EcsRunnerProvider.getStepFunctionTask.parameter.parameters"></a>
2534
2590
 
2535
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
2591
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
2536
2592
 
2537
2593
  workflow job details.
2538
2594
 
@@ -2571,6 +2627,14 @@ Also gives the status function any needed permissions to query the Docker image
2571
2627
 
2572
2628
  ---
2573
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
+
2574
2638
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
2575
2639
 
2576
2640
  | **Name** | **Description** |
@@ -2803,6 +2867,7 @@ new FargateRunner(scope: Construct, id: string, props?: FargateRunnerProviderPro
2803
2867
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
2804
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. |
2805
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. |
2806
2871
 
2807
2872
  ---
2808
2873
 
@@ -2838,7 +2903,7 @@ The mixins to apply.
2838
2903
  ##### ~~`getStepFunctionTask`~~ <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.FargateRunner.getStepFunctionTask"></a>
2839
2904
 
2840
2905
  ```typescript
2841
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
2906
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
2842
2907
  ```
2843
2908
 
2844
2909
  Generate step function task(s) to start a new runner.
@@ -2847,7 +2912,7 @@ Called by GithubRunners and shouldn't be called manually.
2847
2912
 
2848
2913
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.FargateRunner.getStepFunctionTask.parameter.parameters"></a>
2849
2914
 
2850
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
2915
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
2851
2916
 
2852
2917
  workflow job details.
2853
2918
 
@@ -2886,6 +2951,14 @@ Also gives the status function any needed permissions to query the Docker image
2886
2951
 
2887
2952
  ---
2888
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
+
2889
2962
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
2890
2963
 
2891
2964
  | **Name** | **Description** |
@@ -3292,6 +3365,7 @@ new FargateRunnerProvider(scope: Construct, id: string, props?: FargateRunnerPro
3292
3365
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
3293
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. |
3294
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. |
3295
3369
 
3296
3370
  ---
3297
3371
 
@@ -3327,7 +3401,7 @@ The mixins to apply.
3327
3401
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.getStepFunctionTask"></a>
3328
3402
 
3329
3403
  ```typescript
3330
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
3404
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
3331
3405
  ```
3332
3406
 
3333
3407
  Generate step function task(s) to start a new runner.
@@ -3336,7 +3410,7 @@ Called by GithubRunners and shouldn't be called manually.
3336
3410
 
3337
3411
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProvider.getStepFunctionTask.parameter.parameters"></a>
3338
3412
 
3339
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
3413
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
3340
3414
 
3341
3415
  workflow job details.
3342
3416
 
@@ -3375,6 +3449,14 @@ Also gives the status function any needed permissions to query the Docker image
3375
3449
 
3376
3450
  ---
3377
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
+
3378
3460
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
3379
3461
 
3380
3462
  | **Name** | **Description** |
@@ -4427,6 +4509,7 @@ new LambdaRunner(scope: Construct, id: string, props?: LambdaRunnerProviderProps
4427
4509
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
4428
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. |
4429
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. |
4430
4513
 
4431
4514
  ---
4432
4515
 
@@ -4462,7 +4545,7 @@ The mixins to apply.
4462
4545
  ##### ~~`getStepFunctionTask`~~ <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.LambdaRunner.getStepFunctionTask"></a>
4463
4546
 
4464
4547
  ```typescript
4465
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
4548
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
4466
4549
  ```
4467
4550
 
4468
4551
  Generate step function task(s) to start a new runner.
@@ -4471,7 +4554,7 @@ Called by GithubRunners and shouldn't be called manually.
4471
4554
 
4472
4555
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.LambdaRunner.getStepFunctionTask.parameter.parameters"></a>
4473
4556
 
4474
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
4557
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
4475
4558
 
4476
4559
  workflow job details.
4477
4560
 
@@ -4510,6 +4593,14 @@ Also gives the status function any needed permissions to query the Docker image
4510
4593
 
4511
4594
  ---
4512
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
+
4513
4604
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
4514
4605
 
4515
4606
  | **Name** | **Description** |
@@ -4827,6 +4918,7 @@ new LambdaRunnerProvider(scope: Construct, id: string, props?: LambdaRunnerProvi
4827
4918
  | <code><a href="#@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
4828
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. |
4829
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. |
4830
4922
 
4831
4923
  ---
4832
4924
 
@@ -4862,7 +4954,7 @@ The mixins to apply.
4862
4954
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.getStepFunctionTask"></a>
4863
4955
 
4864
4956
  ```typescript
4865
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
4957
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
4866
4958
  ```
4867
4959
 
4868
4960
  Generate step function task(s) to start a new runner.
@@ -4871,7 +4963,7 @@ Called by GithubRunners and shouldn't be called manually.
4871
4963
 
4872
4964
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.LambdaRunnerProvider.getStepFunctionTask.parameter.parameters"></a>
4873
4965
 
4874
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
4966
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
4875
4967
 
4876
4968
  workflow job details.
4877
4969
 
@@ -4910,6 +5002,14 @@ Also gives the status function any needed permissions to query the Docker image
4910
5002
 
4911
5003
  ---
4912
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
+
4913
5013
  #### Static Functions <a name="Static Functions" id="Static Functions"></a>
4914
5014
 
4915
5015
  | **Name** | **Description** |
@@ -5428,36 +5528,87 @@ Warm runners active during a time window specified by start time (`schedule`) an
5428
5528
 
5429
5529
  Runners will be provisioned using the specified provider and registered in the specified repository or organization.
5430
5530
 
5431
- Registration level must match the one selected during setup. See {@link SETUP_GITHUB.md } for more information on the selection.
5531
+ Registration level must match the one selected during setup.
5532
+
5533
+ > [https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md
5432
5534
 
5433
5535
  ## Limitations
5434
5536
 
5435
5537
  - **No deployment-fill**: Unlike `AlwaysOnWarmRunner`, scheduled warm runners do not get an initial
5436
- fill on deploy. The first fill happens at the next schedule occurrence. If you deploy at 1pm for
5437
- a 2pm schedule, runners will not appear until 2pm.
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.
5438
5540
  - Jobs will still trigger provisioning of on-demand runners, even if a warm runner ends up being used.
5439
5541
  - You may briefly see more than `count` runners when changing config or at rotation.
5440
5542
  - To remove: set `count` to 0, deploy, wait for warm runners to stop, then remove and deploy again.
5441
- If you don't follow this procedure, warm runners may linger until they expire.
5543
+ If you don't follow this procedure, warm runners may linger until they expire.
5442
5544
  - Provider failures or timeouts (like Lambda provider timing out after 15 minutes) will result in a
5443
- gap in coverage until the retry succeeds. Current retry mechanism has built-in back-off rate and
5444
- can be tweaked using `retryOptions`. This will be improved in the future.
5445
-
5446
- *Example*
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
+ ```
5447
5560
 
5448
5561
  ```typescript
5449
5562
  // Rate: fill every 12 hours
5450
5563
  new ScheduledWarmRunner(stack, 'Every 12 Hours', {
5451
- runners,
5452
- provider: myProvider,
5453
- count: 2,
5454
- owner: 'my-org',
5455
- repo: 'my-repo',
5456
- schedule: events.Schedule.rate(cdk.Duration.hours(5)),
5457
- duration: cdk.Duration.hours(12),
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),
5458
5597
  });
5459
5598
  ```
5460
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
+ ```)
5461
5612
 
5462
5613
  #### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunner.Initializer"></a>
5463
5614
 
@@ -5873,8 +6024,9 @@ public readonly registrationLevel: string;
5873
6024
  Registration level — must match how your runners are set up in GitHub.
5874
6025
 
5875
6026
  Choose
5876
- 'org' for org-wide runners, 'repo' for repo-level. See the setup wizard or
5877
- {@link SETUP_GITHUB.md } for choosing repo vs org.
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)
5878
6030
 
5879
6031
  ---
5880
6032
 
@@ -8267,7 +8419,9 @@ Optional Lambda function to customize provider selection logic and label assignm
8267
8419
 
8268
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.**
8269
8421
 
8270
- **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)
8271
8425
 
8272
8426
  ---
8273
8427
 
@@ -9780,126 +9934,6 @@ public readonly retryOptions: ProviderRetryOptions;
9780
9934
 
9781
9935
  ---
9782
9936
 
9783
- ### RunnerRuntimeParameters <a name="RunnerRuntimeParameters" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters"></a>
9784
-
9785
- Workflow job parameters as parsed from the webhook event. Pass these into your runner executor and run something like:.
9786
-
9787
- ```sh
9788
- ./config.sh --unattended --url "{REGISTRATION_URL}" --token "${RUNNER_TOKEN}" --ephemeral --work _work --labels "${RUNNER_LABEL}" --name "${RUNNER_NAME}" --disableupdate
9789
- ```
9790
-
9791
- All parameters are specified as step function paths and therefore must be used only in step function task parameters.
9792
-
9793
- #### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.Initializer"></a>
9794
-
9795
- ```typescript
9796
- import { RunnerRuntimeParameters } from '@cloudsnorkel/cdk-github-runners'
9797
-
9798
- const runnerRuntimeParameters: RunnerRuntimeParameters = { ... }
9799
- ```
9800
-
9801
- #### Properties <a name="Properties" id="Properties"></a>
9802
-
9803
- | **Name** | **Type** | **Description** |
9804
- | --- | --- | --- |
9805
- | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.githubDomainPath">githubDomainPath</a></code> | <code>string</code> | Path to GitHub domain. |
9806
- | <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. |
9807
- | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.ownerPath">ownerPath</a></code> | <code>string</code> | Path to repository owner name. |
9808
- | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.registrationUrl">registrationUrl</a></code> | <code>string</code> | Repository or organization URL to register runner at. |
9809
- | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.repoPath">repoPath</a></code> | <code>string</code> | Path to repository name. |
9810
- | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.runnerNamePath">runnerNamePath</a></code> | <code>string</code> | Path to desired runner name. |
9811
- | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.runnerTokenPath">runnerTokenPath</a></code> | <code>string</code> | Path to runner token used to register token. |
9812
-
9813
- ---
9814
-
9815
- ##### `githubDomainPath`<sup>Required</sup> <a name="githubDomainPath" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.githubDomainPath"></a>
9816
-
9817
- ```typescript
9818
- public readonly githubDomainPath: string;
9819
- ```
9820
-
9821
- - *Type:* string
9822
-
9823
- Path to GitHub domain.
9824
-
9825
- Most of the time this will be github.com but for self-hosted GitHub instances, this will be different.
9826
-
9827
- ---
9828
-
9829
- ##### `labelsPath`<sup>Required</sup> <a name="labelsPath" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.labelsPath"></a>
9830
-
9831
- ```typescript
9832
- public readonly labelsPath: string;
9833
- ```
9834
-
9835
- - *Type:* string
9836
-
9837
- Path to comma-separated labels string to use for runner.
9838
-
9839
- ---
9840
-
9841
- ##### `ownerPath`<sup>Required</sup> <a name="ownerPath" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.ownerPath"></a>
9842
-
9843
- ```typescript
9844
- public readonly ownerPath: string;
9845
- ```
9846
-
9847
- - *Type:* string
9848
-
9849
- Path to repository owner name.
9850
-
9851
- ---
9852
-
9853
- ##### `registrationUrl`<sup>Required</sup> <a name="registrationUrl" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.registrationUrl"></a>
9854
-
9855
- ```typescript
9856
- public readonly registrationUrl: string;
9857
- ```
9858
-
9859
- - *Type:* string
9860
-
9861
- Repository or organization URL to register runner at.
9862
-
9863
- ---
9864
-
9865
- ##### `repoPath`<sup>Required</sup> <a name="repoPath" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.repoPath"></a>
9866
-
9867
- ```typescript
9868
- public readonly repoPath: string;
9869
- ```
9870
-
9871
- - *Type:* string
9872
-
9873
- Path to repository name.
9874
-
9875
- ---
9876
-
9877
- ##### `runnerNamePath`<sup>Required</sup> <a name="runnerNamePath" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.runnerNamePath"></a>
9878
-
9879
- ```typescript
9880
- public readonly runnerNamePath: string;
9881
- ```
9882
-
9883
- - *Type:* string
9884
-
9885
- Path to desired runner name.
9886
-
9887
- We specifically set the name to make troubleshooting easier.
9888
-
9889
- ---
9890
-
9891
- ##### `runnerTokenPath`<sup>Required</sup> <a name="runnerTokenPath" id="@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters.property.runnerTokenPath"></a>
9892
-
9893
- ```typescript
9894
- public readonly runnerTokenPath: string;
9895
- ```
9896
-
9897
- - *Type:* string
9898
-
9899
- Path to runner token used to register token.
9900
-
9901
- ---
9902
-
9903
9937
  ### ScheduledWarmRunnerProps <a name="ScheduledWarmRunnerProps" id="@cloudsnorkel/cdk-github-runners.ScheduledWarmRunnerProps"></a>
9904
9938
 
9905
9939
  Properties for scheduled warm runners.
@@ -10017,8 +10051,9 @@ public readonly registrationLevel: string;
10017
10051
  Registration level — must match how your runners are set up in GitHub.
10018
10052
 
10019
10053
  Choose
10020
- 'org' for org-wide runners, 'repo' for repo-level. See the setup wizard or
10021
- {@link SETUP_GITHUB.md } for choosing repo vs org.
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)
10022
10057
 
10023
10058
  ---
10024
10059
 
@@ -12168,22 +12203,26 @@ log groups, or retryable errors as they delegate to their sub-providers.
12168
12203
  | <code><a href="#@cloudsnorkel/cdk-github-runners.ICompositeProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function tasks that execute the runner. |
12169
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. |
12170
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. |
12171
12207
 
12172
12208
  ---
12173
12209
 
12174
12210
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.ICompositeProvider.getStepFunctionTask"></a>
12175
12211
 
12176
12212
  ```typescript
12177
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
12213
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
12178
12214
  ```
12179
12215
 
12180
12216
  Generate step function tasks that execute the runner.
12181
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
+
12182
12221
  Called by GithubRunners and shouldn't be called manually.
12183
12222
 
12184
12223
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.ICompositeProvider.getStepFunctionTask.parameter.parameters"></a>
12185
12224
 
12186
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
12225
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
12187
12226
 
12188
12227
  specific build parameters.
12189
12228
 
@@ -12226,6 +12265,14 @@ grantable for the status function.
12226
12265
 
12227
12266
  ---
12228
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
+
12229
12276
  #### Properties <a name="Properties" id="Properties"></a>
12230
12277
 
12231
12278
  | **Name** | **Type** | **Description** |
@@ -12515,6 +12562,8 @@ Interface for all runner providers.
12515
12562
 
12516
12563
  Implementations create all required resources and return a step function task that starts those resources from {@link getStepFunctionTask}.
12517
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
+
12518
12567
  #### Methods <a name="Methods" id="Methods"></a>
12519
12568
 
12520
12569
  | **Name** | **Description** |
@@ -12522,13 +12571,14 @@ Implementations create all required resources and return a step function task th
12522
12571
  | <code><a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function tasks that execute the runner. |
12523
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. |
12524
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. |
12525
12575
 
12526
12576
  ---
12527
12577
 
12528
12578
  ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.IRunnerProvider.getStepFunctionTask"></a>
12529
12579
 
12530
12580
  ```typescript
12531
- public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
12581
+ public getStepFunctionTask(parameters: IRunnerRuntimeParameters): IChainable
12532
12582
  ```
12533
12583
 
12534
12584
  Generate step function tasks that execute the runner.
@@ -12537,7 +12587,7 @@ Called by GithubRunners and shouldn't be called manually.
12537
12587
 
12538
12588
  ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.IRunnerProvider.getStepFunctionTask.parameter.parameters"></a>
12539
12589
 
12540
- - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
12590
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerRuntimeParameters">IRunnerRuntimeParameters</a>
12541
12591
 
12542
12592
  specific build parameters.
12543
12593
 
@@ -12580,6 +12630,16 @@ grantable for the status function.
12580
12630
 
12581
12631
  ---
12582
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
+
12583
12643
  #### Properties <a name="Properties" id="Properties"></a>
12584
12644
 
12585
12645
  | **Name** | **Type** | **Description** |
@@ -12804,6 +12864,156 @@ VPC where runners will be launched.
12804
12864
 
12805
12865
  ---
12806
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
+
12807
13017
  ## Enums <a name="Enums" id="Enums"></a>
12808
13018
 
12809
13019
  ### RunnerImageBuilderType <a name="RunnerImageBuilderType" id="@cloudsnorkel/cdk-github-runners.RunnerImageBuilderType"></a>