@cloudsnorkel/cdk-github-runners 0.6.0 → 0.6.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.
package/API.md CHANGED
@@ -769,6 +769,230 @@ public readonly repository: IRepository;
769
769
  ---
770
770
 
771
771
 
772
+ ### Ec2Runner <a name="Ec2Runner" id="@cloudsnorkel/cdk-github-runners.Ec2Runner"></a>
773
+
774
+ - *Implements:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>
775
+
776
+ GitHub Actions runner provider using EC2 to execute jobs.
777
+
778
+ This construct is not meant to be used by itself. It should be passed in the providers property for GitHubRunners.
779
+
780
+ #### Initializers <a name="Initializers" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.Initializer"></a>
781
+
782
+ ```typescript
783
+ import { Ec2Runner } from '@cloudsnorkel/cdk-github-runners'
784
+
785
+ new Ec2Runner(scope: Construct, id: string, props: Ec2RunnerProps)
786
+ ```
787
+
788
+ | **Name** | **Type** | **Description** |
789
+ | --- | --- | --- |
790
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
791
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
792
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.Initializer.parameter.props">props</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProps">Ec2RunnerProps</a></code> | *No description.* |
793
+
794
+ ---
795
+
796
+ ##### `scope`<sup>Required</sup> <a name="scope" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.Initializer.parameter.scope"></a>
797
+
798
+ - *Type:* constructs.Construct
799
+
800
+ ---
801
+
802
+ ##### `id`<sup>Required</sup> <a name="id" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.Initializer.parameter.id"></a>
803
+
804
+ - *Type:* string
805
+
806
+ ---
807
+
808
+ ##### `props`<sup>Required</sup> <a name="props" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.Initializer.parameter.props"></a>
809
+
810
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProps">Ec2RunnerProps</a>
811
+
812
+ ---
813
+
814
+ #### Methods <a name="Methods" id="Methods"></a>
815
+
816
+ | **Name** | **Description** |
817
+ | --- | --- |
818
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.toString">toString</a></code> | Returns a string representation of this construct. |
819
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.getStepFunctionTask">getStepFunctionTask</a></code> | Generate step function task(s) to start a new runner. |
820
+ | <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. |
821
+ | <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. |
822
+
823
+ ---
824
+
825
+ ##### `toString` <a name="toString" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.toString"></a>
826
+
827
+ ```typescript
828
+ public toString(): string
829
+ ```
830
+
831
+ Returns a string representation of this construct.
832
+
833
+ ##### `getStepFunctionTask` <a name="getStepFunctionTask" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.getStepFunctionTask"></a>
834
+
835
+ ```typescript
836
+ public getStepFunctionTask(parameters: RunnerRuntimeParameters): IChainable
837
+ ```
838
+
839
+ Generate step function task(s) to start a new runner.
840
+
841
+ Called by GithubRunners and shouldn't be called manually.
842
+
843
+ ###### `parameters`<sup>Required</sup> <a name="parameters" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.getStepFunctionTask.parameter.parameters"></a>
844
+
845
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerRuntimeParameters">RunnerRuntimeParameters</a>
846
+
847
+ workflow job details.
848
+
849
+ ---
850
+
851
+ ##### `grantStateMachine` <a name="grantStateMachine" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.grantStateMachine"></a>
852
+
853
+ ```typescript
854
+ public grantStateMachine(stateMachineRole: IGrantable): void
855
+ ```
856
+
857
+ An optional method that modifies the role of the state machine after all the tasks have been generated.
858
+
859
+ This can be used to add additional policy
860
+ statements to the state machine role that are not automatically added by the task returned from {@link getStepFunctionTask}.
861
+
862
+ ###### `stateMachineRole`<sup>Required</sup> <a name="stateMachineRole" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.grantStateMachine.parameter.stateMachineRole"></a>
863
+
864
+ - *Type:* aws-cdk-lib.aws_iam.IGrantable
865
+
866
+ ---
867
+
868
+ ##### `status` <a name="status" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.status"></a>
869
+
870
+ ```typescript
871
+ public status(statusFunctionRole: IGrantable): IRunnerProviderStatus
872
+ ```
873
+
874
+ Return status of the runner provider to be used in the main status function.
875
+
876
+ Also gives the status function any needed permissions to query the Docker image or AMI.
877
+
878
+ ###### `statusFunctionRole`<sup>Required</sup> <a name="statusFunctionRole" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.status.parameter.statusFunctionRole"></a>
879
+
880
+ - *Type:* aws-cdk-lib.aws_iam.IGrantable
881
+
882
+ ---
883
+
884
+ #### Static Functions <a name="Static Functions" id="Static Functions"></a>
885
+
886
+ | **Name** | **Description** |
887
+ | --- | --- |
888
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
889
+
890
+ ---
891
+
892
+ ##### ~~`isConstruct`~~ <a name="isConstruct" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.isConstruct"></a>
893
+
894
+ ```typescript
895
+ import { Ec2Runner } from '@cloudsnorkel/cdk-github-runners'
896
+
897
+ Ec2Runner.isConstruct(x: any)
898
+ ```
899
+
900
+ Checks if `x` is a construct.
901
+
902
+ ###### `x`<sup>Required</sup> <a name="x" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.isConstruct.parameter.x"></a>
903
+
904
+ - *Type:* any
905
+
906
+ Any object.
907
+
908
+ ---
909
+
910
+ #### Properties <a name="Properties" id="Properties"></a>
911
+
912
+ | **Name** | **Type** | **Description** |
913
+ | --- | --- | --- |
914
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
915
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.property.connections">connections</a></code> | <code>aws-cdk-lib.aws_ec2.Connections</code> | The network connections associated with this resource. |
916
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.property.grantPrincipal">grantPrincipal</a></code> | <code>aws-cdk-lib.aws_iam.IPrincipal</code> | Grant principal used to add permissions to the runner role. |
917
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.property.labels">labels</a></code> | <code>string[]</code> | Labels associated with this provider. |
918
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup</code> | Security group attached to launched instances. |
919
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner.property.subnet">subnet</a></code> | <code>aws-cdk-lib.aws_ec2.ISubnet</code> | VPC subnet used for hosting launched instances. |
920
+
921
+ ---
922
+
923
+ ##### `node`<sup>Required</sup> <a name="node" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.property.node"></a>
924
+
925
+ ```typescript
926
+ public readonly node: Node;
927
+ ```
928
+
929
+ - *Type:* constructs.Node
930
+
931
+ The tree node.
932
+
933
+ ---
934
+
935
+ ##### `connections`<sup>Required</sup> <a name="connections" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.property.connections"></a>
936
+
937
+ ```typescript
938
+ public readonly connections: Connections;
939
+ ```
940
+
941
+ - *Type:* aws-cdk-lib.aws_ec2.Connections
942
+
943
+ The network connections associated with this resource.
944
+
945
+ ---
946
+
947
+ ##### `grantPrincipal`<sup>Required</sup> <a name="grantPrincipal" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.property.grantPrincipal"></a>
948
+
949
+ ```typescript
950
+ public readonly grantPrincipal: IPrincipal;
951
+ ```
952
+
953
+ - *Type:* aws-cdk-lib.aws_iam.IPrincipal
954
+
955
+ Grant principal used to add permissions to the runner role.
956
+
957
+ ---
958
+
959
+ ##### `labels`<sup>Required</sup> <a name="labels" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.property.labels"></a>
960
+
961
+ ```typescript
962
+ public readonly labels: string[];
963
+ ```
964
+
965
+ - *Type:* string[]
966
+
967
+ Labels associated with this provider.
968
+
969
+ ---
970
+
971
+ ##### `securityGroup`<sup>Optional</sup> <a name="securityGroup" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.property.securityGroup"></a>
972
+
973
+ ```typescript
974
+ public readonly securityGroup: ISecurityGroup;
975
+ ```
976
+
977
+ - *Type:* aws-cdk-lib.aws_ec2.ISecurityGroup
978
+
979
+ Security group attached to launched instances.
980
+
981
+ ---
982
+
983
+ ##### `subnet`<sup>Optional</sup> <a name="subnet" id="@cloudsnorkel/cdk-github-runners.Ec2Runner.property.subnet"></a>
984
+
985
+ ```typescript
986
+ public readonly subnet: ISubnet;
987
+ ```
988
+
989
+ - *Type:* aws-cdk-lib.aws_ec2.ISubnet
990
+
991
+ VPC subnet used for hosting launched instances.
992
+
993
+ ---
994
+
995
+
772
996
  ### FargateRunner <a name="FargateRunner" id="@cloudsnorkel/cdk-github-runners.FargateRunner"></a>
773
997
 
774
998
  - *Implements:* <a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>
@@ -2553,6 +2777,165 @@ VPC to launch the runners in.
2553
2777
 
2554
2778
  ---
2555
2779
 
2780
+ ### Ec2RunnerProps <a name="Ec2RunnerProps" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProps"></a>
2781
+
2782
+ Properties for {@link Ec2Runner} construct.
2783
+
2784
+ #### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.Initializer"></a>
2785
+
2786
+ ```typescript
2787
+ import { Ec2RunnerProps } from '@cloudsnorkel/cdk-github-runners'
2788
+
2789
+ const ec2RunnerProps: Ec2RunnerProps = { ... }
2790
+ ```
2791
+
2792
+ #### Properties <a name="Properties" id="Properties"></a>
2793
+
2794
+ | **Name** | **Type** | **Description** |
2795
+ | --- | --- | --- |
2796
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.logRetention">logRetention</a></code> | <code>aws-cdk-lib.aws_logs.RetentionDays</code> | The number of days log events are kept in CloudWatch Logs. |
2797
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.amiBuilder">amiBuilder</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.IAmiBuilder">IAmiBuilder</a></code> | AMI builder that creates AMIs with GitHub runner pre-configured. |
2798
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.instanceType">instanceType</a></code> | <code>aws-cdk-lib.aws_ec2.InstanceType</code> | Instance type for launched runner instances. |
2799
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.labels">labels</a></code> | <code>string[]</code> | GitHub Actions labels used for this provider. |
2800
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup</code> | Security Group to assign to launched runner instances. |
2801
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.spot">spot</a></code> | <code>boolean</code> | Use spot instances to save money. |
2802
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.spotMaxPrice">spotMaxPrice</a></code> | <code>string</code> | Set a maximum price for spot instances. |
2803
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.storageSize">storageSize</a></code> | <code>aws-cdk-lib.Size</code> | Size of volume available for launched runner instances. |
2804
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.subnet">subnet</a></code> | <code>aws-cdk-lib.aws_ec2.ISubnet</code> | Subnet where the runner instances will be launched. |
2805
+
2806
+ ---
2807
+
2808
+ ##### `logRetention`<sup>Optional</sup> <a name="logRetention" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.logRetention"></a>
2809
+
2810
+ ```typescript
2811
+ public readonly logRetention: RetentionDays;
2812
+ ```
2813
+
2814
+ - *Type:* aws-cdk-lib.aws_logs.RetentionDays
2815
+ - *Default:* logs.RetentionDays.ONE_MONTH
2816
+
2817
+ The number of days log events are kept in CloudWatch Logs.
2818
+
2819
+ When updating
2820
+ this property, unsetting it doesn't remove the log retention policy. To
2821
+ remove the retention policy, set the value to `INFINITE`.
2822
+
2823
+ ---
2824
+
2825
+ ##### `amiBuilder`<sup>Optional</sup> <a name="amiBuilder" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.amiBuilder"></a>
2826
+
2827
+ ```typescript
2828
+ public readonly amiBuilder: IAmiBuilder;
2829
+ ```
2830
+
2831
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.IAmiBuilder">IAmiBuilder</a>
2832
+ - *Default:* AMI builder for Ubuntu Linux
2833
+
2834
+ AMI builder that creates AMIs with GitHub runner pre-configured.
2835
+
2836
+ On Linux, a user named `runner` is expected to exist with access to Docker.
2837
+
2838
+ ---
2839
+
2840
+ ##### `instanceType`<sup>Optional</sup> <a name="instanceType" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.instanceType"></a>
2841
+
2842
+ ```typescript
2843
+ public readonly instanceType: InstanceType;
2844
+ ```
2845
+
2846
+ - *Type:* aws-cdk-lib.aws_ec2.InstanceType
2847
+ - *Default:* m5.large
2848
+
2849
+ Instance type for launched runner instances.
2850
+
2851
+ ---
2852
+
2853
+ ##### `labels`<sup>Optional</sup> <a name="labels" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.labels"></a>
2854
+
2855
+ ```typescript
2856
+ public readonly labels: string[];
2857
+ ```
2858
+
2859
+ - *Type:* string[]
2860
+ - *Default:* ['ec2']
2861
+
2862
+ GitHub Actions labels used for this provider.
2863
+
2864
+ These labels are used to identify which provider should spawn a new on-demand runner. Every job sends a webhook with the labels it's looking for
2865
+ based on runs-on. We match the labels from the webhook with the labels specified here. If all the labels specified here are present in the
2866
+ job's labels, this provider will be chosen and spawn a new runner.
2867
+
2868
+ ---
2869
+
2870
+ ##### `securityGroup`<sup>Optional</sup> <a name="securityGroup" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.securityGroup"></a>
2871
+
2872
+ ```typescript
2873
+ public readonly securityGroup: ISecurityGroup;
2874
+ ```
2875
+
2876
+ - *Type:* aws-cdk-lib.aws_ec2.ISecurityGroup
2877
+ - *Default:* account's default security group
2878
+
2879
+ Security Group to assign to launched runner instances.
2880
+
2881
+ ---
2882
+
2883
+ ##### `spot`<sup>Optional</sup> <a name="spot" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.spot"></a>
2884
+
2885
+ ```typescript
2886
+ public readonly spot: boolean;
2887
+ ```
2888
+
2889
+ - *Type:* boolean
2890
+ - *Default:* false
2891
+
2892
+ Use spot instances to save money.
2893
+
2894
+ Spot instances are cheaper but not always available and can be stopped prematurely.
2895
+
2896
+ ---
2897
+
2898
+ ##### `spotMaxPrice`<sup>Optional</sup> <a name="spotMaxPrice" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.spotMaxPrice"></a>
2899
+
2900
+ ```typescript
2901
+ public readonly spotMaxPrice: string;
2902
+ ```
2903
+
2904
+ - *Type:* string
2905
+ - *Default:* no max price (you will pay current spot price)
2906
+
2907
+ Set a maximum price for spot instances.
2908
+
2909
+ ---
2910
+
2911
+ ##### `storageSize`<sup>Optional</sup> <a name="storageSize" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.storageSize"></a>
2912
+
2913
+ ```typescript
2914
+ public readonly storageSize: Size;
2915
+ ```
2916
+
2917
+ - *Type:* aws-cdk-lib.Size
2918
+ - *Default:* 30GB
2919
+
2920
+ Size of volume available for launched runner instances.
2921
+
2922
+ This modifies the boot volume size and doesn't add any additional volumes.
2923
+
2924
+ ---
2925
+
2926
+ ##### `subnet`<sup>Optional</sup> <a name="subnet" id="@cloudsnorkel/cdk-github-runners.Ec2RunnerProps.property.subnet"></a>
2927
+
2928
+ ```typescript
2929
+ public readonly subnet: ISubnet;
2930
+ ```
2931
+
2932
+ - *Type:* aws-cdk-lib.aws_ec2.ISubnet
2933
+ - *Default:* default subnet of account's default VPC
2934
+
2935
+ Subnet where the runner instances will be launched.
2936
+
2937
+ ---
2938
+
2556
2939
  ### FargateRunnerProps <a name="FargateRunnerProps" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProps"></a>
2557
2940
 
2558
2941
  Properties for FargateRunner.
@@ -3260,6 +3643,90 @@ VPC to launch the runners in.
3260
3643
 
3261
3644
  ---
3262
3645
 
3646
+ ### RunnerAmi <a name="RunnerAmi" id="@cloudsnorkel/cdk-github-runners.RunnerAmi"></a>
3647
+
3648
+ Description of a AMI built by {@link IAmiBuilder}.
3649
+
3650
+ #### Initializer <a name="Initializer" id="@cloudsnorkel/cdk-github-runners.RunnerAmi.Initializer"></a>
3651
+
3652
+ ```typescript
3653
+ import { RunnerAmi } from '@cloudsnorkel/cdk-github-runners'
3654
+
3655
+ const runnerAmi: RunnerAmi = { ... }
3656
+ ```
3657
+
3658
+ #### Properties <a name="Properties" id="Properties"></a>
3659
+
3660
+ | **Name** | **Type** | **Description** |
3661
+ | --- | --- | --- |
3662
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerAmi.property.architecture">architecture</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a></code> | Architecture of the image. |
3663
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerAmi.property.launchTemplate">launchTemplate</a></code> | <code>aws-cdk-lib.aws_ec2.ILaunchTemplate</code> | Launch template pointing to the latest AMI. |
3664
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerAmi.property.os">os</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a></code> | OS type of the image. |
3665
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerAmi.property.runnerVersion">runnerVersion</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerVersion">RunnerVersion</a></code> | Installed runner version. |
3666
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.RunnerAmi.property.logGroup">logGroup</a></code> | <code>aws-cdk-lib.aws_logs.LogGroup</code> | Log group where image builds are logged. |
3667
+
3668
+ ---
3669
+
3670
+ ##### `architecture`<sup>Required</sup> <a name="architecture" id="@cloudsnorkel/cdk-github-runners.RunnerAmi.property.architecture"></a>
3671
+
3672
+ ```typescript
3673
+ public readonly architecture: Architecture;
3674
+ ```
3675
+
3676
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a>
3677
+
3678
+ Architecture of the image.
3679
+
3680
+ ---
3681
+
3682
+ ##### `launchTemplate`<sup>Required</sup> <a name="launchTemplate" id="@cloudsnorkel/cdk-github-runners.RunnerAmi.property.launchTemplate"></a>
3683
+
3684
+ ```typescript
3685
+ public readonly launchTemplate: ILaunchTemplate;
3686
+ ```
3687
+
3688
+ - *Type:* aws-cdk-lib.aws_ec2.ILaunchTemplate
3689
+
3690
+ Launch template pointing to the latest AMI.
3691
+
3692
+ ---
3693
+
3694
+ ##### `os`<sup>Required</sup> <a name="os" id="@cloudsnorkel/cdk-github-runners.RunnerAmi.property.os"></a>
3695
+
3696
+ ```typescript
3697
+ public readonly os: Os;
3698
+ ```
3699
+
3700
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.Os">Os</a>
3701
+
3702
+ OS type of the image.
3703
+
3704
+ ---
3705
+
3706
+ ##### `runnerVersion`<sup>Required</sup> <a name="runnerVersion" id="@cloudsnorkel/cdk-github-runners.RunnerAmi.property.runnerVersion"></a>
3707
+
3708
+ ```typescript
3709
+ public readonly runnerVersion: RunnerVersion;
3710
+ ```
3711
+
3712
+ - *Type:* <a href="#@cloudsnorkel/cdk-github-runners.RunnerVersion">RunnerVersion</a>
3713
+
3714
+ Installed runner version.
3715
+
3716
+ ---
3717
+
3718
+ ##### `logGroup`<sup>Optional</sup> <a name="logGroup" id="@cloudsnorkel/cdk-github-runners.RunnerAmi.property.logGroup"></a>
3719
+
3720
+ ```typescript
3721
+ public readonly logGroup: LogGroup;
3722
+ ```
3723
+
3724
+ - *Type:* aws-cdk-lib.aws_logs.LogGroup
3725
+
3726
+ Log group where image builds are logged.
3727
+
3728
+ ---
3729
+
3263
3730
  ### RunnerImage <a name="RunnerImage" id="@cloudsnorkel/cdk-github-runners.RunnerImage"></a>
3264
3731
 
3265
3732
  Description of a Docker image built by {@link IImageBuilder}.
@@ -4317,6 +4784,35 @@ WindowsComponents.githubRunner(scope: Construct, id: string, runnerVersion: Runn
4317
4784
 
4318
4785
  ## Protocols <a name="Protocols" id="Protocols"></a>
4319
4786
 
4787
+ ### IAmiBuilder <a name="IAmiBuilder" id="@cloudsnorkel/cdk-github-runners.IAmiBuilder"></a>
4788
+
4789
+ - *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.IAmiBuilder">IAmiBuilder</a>
4790
+
4791
+ Interface for constructs that build an AMI that can be used in {@link IRunnerProvider}.
4792
+
4793
+ Anything that ends up with a launch template pointing to an AMI that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing AMI and nothing else.
4794
+
4795
+ The AMI can be further updated over time manually or using a schedule as long as it is always written to the same launch template.
4796
+
4797
+ #### Methods <a name="Methods" id="Methods"></a>
4798
+
4799
+ | **Name** | **Description** |
4800
+ | --- | --- |
4801
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.IAmiBuilder.bind">bind</a></code> | Finalize and return all required information about the AMI built by this builder. |
4802
+
4803
+ ---
4804
+
4805
+ ##### `bind` <a name="bind" id="@cloudsnorkel/cdk-github-runners.IAmiBuilder.bind"></a>
4806
+
4807
+ ```typescript
4808
+ public bind(): RunnerAmi
4809
+ ```
4810
+
4811
+ Finalize and return all required information about the AMI built by this builder.
4812
+
4813
+ This method can be called multiple times if the image is bound to multiple providers. Make sure you cache the image when implementing or return an error if this builder doesn't support reusing images.
4814
+
4815
+
4320
4816
  ### IImageBuilder <a name="IImageBuilder" id="@cloudsnorkel/cdk-github-runners.IImageBuilder"></a>
4321
4817
 
4322
4818
  - *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder">CodeBuildImageBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.ContainerImageBuilder">ContainerImageBuilder</a>, <a href="#@cloudsnorkel/cdk-github-runners.IImageBuilder">IImageBuilder</a>
@@ -4445,7 +4941,7 @@ Log group name for the image builder where history of image builds can be analyz
4445
4941
 
4446
4942
  - *Extends:* aws-cdk-lib.aws_ec2.IConnectable, aws-cdk-lib.aws_iam.IGrantable
4447
4943
 
4448
- - *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner">CodeBuildRunner</a>, <a href="#@cloudsnorkel/cdk-github-runners.FargateRunner">FargateRunner</a>, <a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner">LambdaRunner</a>, <a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>
4944
+ - *Implemented By:* <a href="#@cloudsnorkel/cdk-github-runners.CodeBuildRunner">CodeBuildRunner</a>, <a href="#@cloudsnorkel/cdk-github-runners.Ec2Runner">Ec2Runner</a>, <a href="#@cloudsnorkel/cdk-github-runners.FargateRunner">FargateRunner</a>, <a href="#@cloudsnorkel/cdk-github-runners.LambdaRunner">LambdaRunner</a>, <a href="#@cloudsnorkel/cdk-github-runners.IRunnerProvider">IRunnerProvider</a>
4449
4945
 
4450
4946
  Interface for all runner providers.
4451
4947
 
package/lib/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  export { Secrets } from './secrets';
2
2
  export { GitHubRunners, GitHubRunnersProps } from './runner';
3
3
  export { CodeBuildRunner, CodeBuildRunnerProps } from './providers/codebuild';
4
+ export { Ec2Runner, Ec2RunnerProps } from './providers/ec2';
4
5
  export { LambdaRunner, LambdaRunnerProps } from './providers/lambda';
5
6
  export { FargateRunner, FargateRunnerProps } from './providers/fargate';
6
- export { IRunnerProvider, RunnerProviderProps, RunnerVersion, RunnerRuntimeParameters, RunnerImage, IImageBuilder, IRunnerProviderStatus, IRunnerImageStatus, IRunnerAmiStatus, Architecture, Os } from './providers/common';
7
+ export { IRunnerProvider, RunnerProviderProps, RunnerVersion, RunnerRuntimeParameters, RunnerAmi, RunnerImage, IAmiBuilder, IImageBuilder, IRunnerProviderStatus, IRunnerImageStatus, IRunnerAmiStatus, Architecture, Os } from './providers/common';
7
8
  export { CodeBuildImageBuilder, CodeBuildImageBuilderProps } from './providers/image-builders/codebuild';
8
9
  export { ImageBuilderComponent, ImageBuilderComponentProperties, ImageBuilderAsset } from './providers/image-builders/common';
9
10
  export { ContainerImageBuilder, ContainerImageBuilderProps } from './providers/image-builders/container';
package/lib/index.js CHANGED
@@ -6,6 +6,8 @@ var runner_1 = require("./runner");
6
6
  Object.defineProperty(exports, "GitHubRunners", { enumerable: true, get: function () { return runner_1.GitHubRunners; } });
7
7
  var codebuild_1 = require("./providers/codebuild");
8
8
  Object.defineProperty(exports, "CodeBuildRunner", { enumerable: true, get: function () { return codebuild_1.CodeBuildRunner; } });
9
+ var ec2_1 = require("./providers/ec2");
10
+ Object.defineProperty(exports, "Ec2Runner", { enumerable: true, get: function () { return ec2_1.Ec2Runner; } });
9
11
  var lambda_1 = require("./providers/lambda");
10
12
  Object.defineProperty(exports, "LambdaRunner", { enumerable: true, get: function () { return lambda_1.LambdaRunner; } });
11
13
  var fargate_1 = require("./providers/fargate");
@@ -26,4 +28,4 @@ var linux_components_1 = require("./providers/image-builders/linux-components");
26
28
  Object.defineProperty(exports, "LinuxUbuntuComponents", { enumerable: true, get: function () { return linux_components_1.LinuxUbuntuComponents; } });
27
29
  var static_1 = require("./providers/image-builders/static");
28
30
  Object.defineProperty(exports, "StaticRunnerImage", { enumerable: true, get: function () { return static_1.StaticRunnerImage; } });
29
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxxQ0FBb0M7QUFBM0Isa0dBQUEsT0FBTyxPQUFBO0FBQ2hCLG1DQUE2RDtBQUFwRCx1R0FBQSxhQUFhLE9BQUE7QUFDdEIsbURBQThFO0FBQXJFLDRHQUFBLGVBQWUsT0FBQTtBQUN4Qiw2Q0FBcUU7QUFBNUQsc0dBQUEsWUFBWSxPQUFBO0FBQ3JCLCtDQUF3RTtBQUEvRCx3R0FBQSxhQUFhLE9BQUE7QUFDdEIsNkNBQTZOO0FBQTlLLHVHQUFBLGFBQWEsT0FBQTtBQUFvSCxzR0FBQSxZQUFZLE9BQUE7QUFBRSw0RkFBQSxFQUFFLE9BQUE7QUFDaE0sa0VBQXlHO0FBQWhHLGtIQUFBLHFCQUFxQixPQUFBO0FBQzlCLDREQUE4SDtBQUFySCwrR0FBQSxxQkFBcUIsT0FBQTtBQUM5QixrRUFBeUc7QUFBaEcsa0hBQUEscUJBQXFCLE9BQUE7QUFDOUIsb0ZBQWtGO0FBQXpFLHVIQUFBLGlCQUFpQixPQUFBO0FBQzFCLGdGQUFvRjtBQUEzRSx5SEFBQSxxQkFBcUIsT0FBQTtBQUM5Qiw0REFBc0U7QUFBN0QsMkdBQUEsaUJBQWlCLE9BQUEiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBTZWNyZXRzIH0gZnJvbSAnLi9zZWNyZXRzJztc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1xuZXhwb3J0IHsgQ29kZUJ1aWxkSW1hZ2VCdWlsZGVyLCBDb2RlQnVpbGRJbWFnZUJ1aWxkZXJQcm9wcyB9IGZyb20gJy4vcHJvdmlkZXJzL2ltYWdlLWJ1aWxkZXJzL2NvZGVidWlsZCc7XG5leHBvcnQgeyBJbWFnZUJ1aWxkZXJDb21wb25lbnQsIEltYWdlQnVpbGRlckNvbXBvbmVudFByb3BlcnRpZXMsIEltYWdlQnVpbGRlckFzc2V0IH0gZnJvbSAnLi9wcm92aWRlcnMvaW1hZ2UtYnVpbGRlcnMvY29tbW9uJztcbmV4cG9ydCB7IENvbnRhaW5lckltYWdlQnVpbGRlciwgQ29udGFpbmVySW1hZ2VCdWlsZGVyUHJvcHMgfSBmcm9tICcuL3Byb3ZpZGVycy9pbWFnZS1idWlsZGVycy9jb250YWluZXInO1xuZXhwb3J0IHsgV2luZG93c0NvbXBvbmVudHMgfSBmcm9tICcuL3Byb3ZpZGVycy9pbWFnZS1idWlsZGVycy93aW5kb3dzLWNvbXBvbmVudHMnO1xuZXhwb3J0IHsgTGludXhVYnVudHVDb21wb25lbnRzIH0gZnJvbSAnLi9wcm92aWRlcnMvaW1hZ2UtYnVpbGRlcnMvbGludXgtY29tcG9uZW50cyc7XG5leHBvcnQgeyBTdGF0aWNSdW5uZXJJbWFnZSB9IGZyb20gJy4vcHJvdmlkZXJzL2ltYWdlLWJ1aWxkZXJzL3N0YXRpYyc7XG4iXX0=
@@ -173,7 +173,7 @@ class CodeBuildRunner extends common_1.BaseProvider {
173
173
  }
174
174
  exports.CodeBuildRunner = CodeBuildRunner;
175
175
  _a = JSII_RTTI_SYMBOL_1;
176
- CodeBuildRunner[_a] = { fqn: "@cloudsnorkel/cdk-github-runners.CodeBuildRunner", version: "0.6.0" };
176
+ CodeBuildRunner[_a] = { fqn: "@cloudsnorkel/cdk-github-runners.CodeBuildRunner", version: "0.6.1" };
177
177
  /**
178
178
  * Path to Dockerfile for Linux x64 with all the requirements for CodeBuild runner. Use this Dockerfile unless you need to customize it further than allowed by hooks.
179
179
  *
@@ -39,7 +39,7 @@ class RunnerVersion {
39
39
  }
40
40
  exports.RunnerVersion = RunnerVersion;
41
41
  _a = JSII_RTTI_SYMBOL_1;
42
- RunnerVersion[_a] = { fqn: "@cloudsnorkel/cdk-github-runners.RunnerVersion", version: "0.6.0" };
42
+ RunnerVersion[_a] = { fqn: "@cloudsnorkel/cdk-github-runners.RunnerVersion", version: "0.6.1" };
43
43
  /**
44
44
  * CPU architecture enum for an image.
45
45
  */
@@ -88,7 +88,7 @@ class Architecture {
88
88
  }
89
89
  exports.Architecture = Architecture;
90
90
  _b = JSII_RTTI_SYMBOL_1;
91
- Architecture[_b] = { fqn: "@cloudsnorkel/cdk-github-runners.Architecture", version: "0.6.0" };
91
+ Architecture[_b] = { fqn: "@cloudsnorkel/cdk-github-runners.Architecture", version: "0.6.1" };
92
92
  /**
93
93
  * ARM64
94
94
  */
@@ -131,7 +131,7 @@ class Os {
131
131
  }
132
132
  exports.Os = Os;
133
133
  _c = JSII_RTTI_SYMBOL_1;
134
- Os[_c] = { fqn: "@cloudsnorkel/cdk-github-runners.Os", version: "0.6.0" };
134
+ Os[_c] = { fqn: "@cloudsnorkel/cdk-github-runners.Os", version: "0.6.1" };
135
135
  /**
136
136
  * Linux
137
137
  */