@cloudsnorkel/cdk-github-runners 0.2.0 → 0.3.2

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 (54) hide show
  1. package/.gitattributes +8 -1
  2. package/.jsii +1371 -206
  3. package/API.md +1191 -93
  4. package/README.md +59 -49
  5. package/lib/index.d.ts +3 -1
  6. package/lib/index.js +7 -1
  7. package/lib/lambdas/build-image/index.js +121 -0
  8. package/lib/lambdas/delete-runner/index.js +5151 -2999
  9. package/lib/lambdas/setup/index.html +37 -0
  10. package/lib/lambdas/setup/index.js +140 -255
  11. package/lib/lambdas/status/index.js +5151 -2999
  12. package/lib/lambdas/token-retriever/index.js +5151 -2999
  13. package/lib/lambdas/update-lambda/index.js +55 -0
  14. package/lib/providers/codebuild.d.ts +31 -1
  15. package/lib/providers/codebuild.js +57 -13
  16. package/lib/providers/common.d.ts +87 -6
  17. package/lib/providers/common.js +64 -4
  18. package/lib/providers/docker-images/codebuild/linux-arm64/Dockerfile +63 -0
  19. package/lib/providers/docker-images/codebuild/{Dockerfile → linux-x64/Dockerfile} +14 -5
  20. package/lib/providers/docker-images/fargate/linux-arm64/Dockerfile +45 -0
  21. package/lib/providers/docker-images/fargate/{runner.sh → linux-arm64/runner.sh} +0 -0
  22. package/lib/providers/docker-images/fargate/{Dockerfile → linux-x64/Dockerfile} +14 -5
  23. package/lib/providers/docker-images/fargate/linux-x64/runner.sh +5 -0
  24. package/lib/providers/docker-images/lambda/linux-arm64/Dockerfile +36 -0
  25. package/lib/providers/docker-images/lambda/{runner.js → linux-arm64/runner.js} +0 -0
  26. package/lib/providers/docker-images/lambda/{runner.sh → linux-arm64/runner.sh} +0 -0
  27. package/lib/providers/docker-images/lambda/linux-x64/Dockerfile +35 -0
  28. package/lib/providers/docker-images/lambda/linux-x64/runner.js +29 -0
  29. package/lib/providers/docker-images/lambda/linux-x64/runner.sh +12 -0
  30. package/lib/providers/fargate.d.ts +33 -1
  31. package/lib/providers/fargate.js +39 -8
  32. package/lib/providers/image-builders/codebuild.d.ts +178 -0
  33. package/lib/providers/image-builders/codebuild.js +354 -0
  34. package/lib/providers/image-builders/static.d.ts +29 -0
  35. package/lib/providers/image-builders/static.js +58 -0
  36. package/lib/providers/lambda.d.ts +27 -1
  37. package/lib/providers/lambda.js +88 -9
  38. package/lib/runner.d.ts +56 -9
  39. package/lib/runner.js +37 -11
  40. package/lib/secrets.js +1 -1
  41. package/lib/utils.d.ts +2 -1
  42. package/lib/utils.js +14 -3
  43. package/lib/webhook.js +2 -1
  44. package/package.json +30 -12
  45. package/setup/index.html +12 -0
  46. package/setup/src/App.svelte +291 -0
  47. package/setup/src/app.scss +15 -0
  48. package/setup/src/main.ts +8 -0
  49. package/setup/src/vite-env.d.ts +2 -0
  50. package/setup/svelte.config.mjs +7 -0
  51. package/setup/tsconfig.json +21 -0
  52. package/setup/tsconfig.node.json +8 -0
  53. package/setup/vite.config.ts +15 -0
  54. package/lib/providers/docker-images/lambda/Dockerfile +0 -27
package/.jsii CHANGED
@@ -2971,7 +2971,7 @@
2971
2971
  "stability": "experimental"
2972
2972
  },
2973
2973
  "homepage": "https://github.com/CloudSnorkel/cdk-github-runners.git",
2974
- "jsiiVersion": "1.60.1 (build 2799dc8)",
2974
+ "jsiiVersion": "1.62.0 (build 293ac17)",
2975
2975
  "keywords": [
2976
2976
  "aws",
2977
2977
  "aws-cdk",
@@ -2995,7 +2995,7 @@
2995
2995
  },
2996
2996
  "name": "@cloudsnorkel/cdk-github-runners",
2997
2997
  "readme": {
2998
- "markdown": "# GitHub Self-Hosted Runners CDK Constructs\n\n[![NPM](https://img.shields.io/npm/v/@cloudsnorkel/cdk-github-runners?label=npm&logo=npm)][6]\n[![PyPI](https://img.shields.io/pypi/v/cloudsnorkel.cdk-github-runners?label=pypi&logo=pypi)][7]\n[![Maven Central](https://img.shields.io/maven-central/v/com.cloudsnorkel/cdk.github.runners.svg?label=Maven%20Central&logo=java)][8]\n[![Go](https://img.shields.io/github/v/tag/CloudSnorkel/cdk-github-runners?color=red&label=go&logo=go)][11]\n[![Nuget](https://img.shields.io/nuget/v/CloudSnorkel.Cdk.Github.Runners?color=red&&logo=nuget)][12]\n[![Release](https://github.com/CloudSnorkel/cdk-github-runners/actions/workflows/release.yml/badge.svg)](https://github.com/CloudSnorkel/cdk-github-runners/actions/workflows/release.yml)\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/CloudSnorkel/cdk-github-runners/blob/main/LICENSE)\n\nUse this CDK construct to create ephemeral [self-hosted GitHub runners][1] on-demand inside your AWS account.\n\n* Easy to configure GitHub integration with a web-based interface\n* Customizable runners with decent defaults\n* Multiple runner configurations controlled by labels\n* Everything fully hosted in your account\n\nSelf-hosted runners in AWS are useful when:\n\n* You need easy access to internal resources in your actions\n* You want to pre-install some software for your actions\n* You want to provide some basic AWS API access (but [aws-actions/configure-aws-credentials][2] has more security controls)\n\nEphemeral (or on-demand) runners are the [recommended way by GitHub][14] for auto-scaling, and they make sure all jobs run with a clean image. Runners are started on-demand. You don't pay unless a job is running.\n\n## API\n\nThe best way to browse API documentation is on [Constructs Hub][13]. It is available in all supported programming languages.\n\n## Providers\n\nA runner provider creates compute resources on-demand and uses [actions/runner][5] to start a runner.\n\n| | CodeBuild | Fargate | Lambda |\n|----------------|--------------------------|---------------|---------------|\n| **Time limit** | 8 hours | Unlimited | 15 minutes |\n| **vCPUs** | 2, 4, 8, or 72 | 0.25 to 4 | 1 to 6 |\n| **RAM** | 3gb, 7gb, 15gb, or 145gb | 512mb to 30gb | 128mb to 10gb |\n| **Storage** | 50gb to 824gb | 20gb to 200gb | Up to 10gb |\n| **sudo** | ✔ | ✔ | ❌ |\n| **Docker** | ✔ | ❌ | ❌ |\n| **Spot** | ❌ | ✔ | ❌ |\n\nThe best provider to use mostly depends on your current infrastructure. When in doubt, CodeBuild is always a good choice. Execution history and logs are easy to view, and it has no restrictive limits unless you need to run for more than 8 hours.\n\nYou can also create your own provider by implementing `IRunnerProvider`.\n\n## Installation\n\n1. Confirm you're using CDK v2\n2. Install the appropriate package\n 1. [Python][6]\n ```\n pip install cloudsnorkel.cdk-github-runners\n ```\n 2. [TypeScript or JavaScript][7]\n ```\n npm i @cloudsnorkel/cdk-github-runners\n ```\n 3. [Java][8]\n ```xml\n <dependency>\n <groupId>com.cloudsnorkel</groupId>\n <artifactId>cdk.github.runners</artifactId>\n </dependency>\n ```\n 4. [Go][11]\n ```\n go get github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners\n ```\n 5. [.NET][12]\n ```\n dotnet add package CloudSnorkel.Cdk.Github.Runners\n ```\n3. Use `GitHubRunners` construct in your code (starting with default arguments is fine)\n4. Deploy your stack\n5. Look for the status command output similar to `aws --region us-east-1 lambda invoke --function-name status-XYZ123 status.json`\n6. Execute the status command (you may need to specify `--profile` too) and open the resulting `status.json` file\n7. Open the URL in `github.setup.url` from `status.json` or [manually setup GitHub](SETUP_GITHUB.md) integration as an app or with personal access token\n8. Run status command again to confirm `github.auth.status` and `github.webhook.status` are OK\n9. Trigger a GitHub action that has a `self-hosted` label with `runs-on: [self-hosted, linux, codebuild]` or similar\n10. If the action is not successful, see [troubleshooting](#Troubleshooting)\n\n[![Demo](demo-thumbnail.jpg)](https://youtu.be/wlyv_3V8lIw)\n\n## Customizing\n\nThe default providers configured by `GitHubRunners` are useful for testing but probably not too much for actual production work. They run in the default VPC or no VPC and have no added IAM permissions. You would usually want to configure the providers yourself.\n\nFor example:\n\n```typescript\nimport * as cdk from 'aws-cdk-lib';\nimport { aws_ec2 as ec2, aws_s3 as s3 } from 'aws-cdk-lib';\nimport { GitHubRunners, CodeBuildRunner } from '@cloudsnorkel/cdk-github-runners';\n\nconst app = new cdk.App();\nconst stack = new cdk.Stack(\n app,\n 'github-runners-test',\n {\n env: {\n account: process.env.CDK_DEFAULT_ACCOUNT,\n region: process.env.CDK_DEFAULT_REGION,\n },\n },\n);\n\nconst vpc = ec2.Vpc.fromLookup(stack, 'vpc', { vpcId: 'vpc-1234567' });\nconst runnerSg = new ec2.SecurityGroup(stack, 'runner security group', { vpc: vpc });\nconst dbSg = ec2.SecurityGroup.fromSecurityGroupId(stack, 'database security group', 'sg-1234567');\nconst bucket = new s3.Bucket(stack, 'runner bucket');\n\n// create a custom CodeBuild provider\nconst myProvider = new CodeBuildRunner(\n stack, 'codebuild runner',\n {\n label: 'my-codebuild',\n vpc: vpc,\n securityGroup: runnerSg,\n },\n);\n// grant some permissions to the provider\nbucket.grantReadWrite(myProvider);\ndbSg.connections.allowFrom(runnerSg, ec2.Port.tcp(3306), 'allow runners to connect to MySQL database');\n\n// create the runner infrastructure\nnew GitHubRunners(\n stack,\n 'runners',\n {\n providers: [myProvider],\n }\n);\n\napp.synth();\n```\n\n## Architecture\n\n![Architecture diagram](architecture.svg)\n\n## Troubleshooting\n\n1. Always start with the status function, make sure no errors are reported, and confirm all status codes are OK\n2. Confirm the webhook Lambda was called by visiting the URL in `troubleshooting.webhookHandlerUrl` from `status.json`\n 1. If it's not called or logs errors, confirm the webhook settings on the GitHub side\n 2. If you see too many errors, make sure you're only sending `workflow_job` events\n3. When using GitHub app, make sure there are active installation in `github.auth.app.installations`\n4. Check execution details of the orchestrator step function by visiting the URL in `troubleshooting.stepFunctionUrl` from `status.json`\n 1. Use the details tab to find the specific execution of the provider (Lambda, CodeBuild, Fargate, etc.)\n 2. Every step function execution should be successful, even if the runner action inside it failed\n\n## Other Options\n\n1. [philips-labs/terraform-aws-github-runner][3] if you're using Terraform\n2. [actions-runner-controller/actions-runner-controller][4] if you're using Kubernetes\n\n\n[1]: https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners\n[2]: https://github.com/marketplace/actions/configure-aws-credentials-action-for-github-actions\n[3]: https://github.com/philips-labs/terraform-aws-github-runner\n[4]: https://github.com/actions-runner-controller/actions-runner-controller\n[5]: https://github.com/actions/runner\n[6]: https://www.npmjs.com/package/@cloudsnorkel/cdk-github-runners\n[7]: https://pypi.org/project/cloudsnorkel.cdk-github-runners\n[8]: https://search.maven.org/search?q=g:%22com.cloudsnorkel%22%20AND%20a:%22cdk.github.runners%22\n[9]: https://docs.github.com/en/developers/apps/getting-started-with-apps/about-apps\n[10]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token\n[11]: https://pkg.go.dev/github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners\n[12]: https://www.nuget.org/packages/CloudSnorkel.Cdk.Github.Runners/\n[13]: https://constructs.dev/packages/@cloudsnorkel/cdk-github-runners/\n[14]: https://docs.github.com/en/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners#using-ephemeral-runners-for-autoscaling"
2998
+ "markdown": "# GitHub Self-Hosted Runners CDK Constructs\n\n[![NPM](https://img.shields.io/npm/v/@cloudsnorkel/cdk-github-runners?label=npm&logo=npm)][7]\n[![PyPI](https://img.shields.io/pypi/v/cloudsnorkel.cdk-github-runners?label=pypi&logo=pypi)][6]\n[![Maven Central](https://img.shields.io/maven-central/v/com.cloudsnorkel/cdk.github.runners.svg?label=Maven%20Central&logo=java)][8]\n[![Go](https://img.shields.io/github/v/tag/CloudSnorkel/cdk-github-runners?color=red&label=go&logo=go)][11]\n[![Nuget](https://img.shields.io/nuget/v/CloudSnorkel.Cdk.Github.Runners?color=red&&logo=nuget)][12]\n[![Release](https://github.com/CloudSnorkel/cdk-github-runners/actions/workflows/release.yml/badge.svg)](https://github.com/CloudSnorkel/cdk-github-runners/actions/workflows/release.yml)\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/CloudSnorkel/cdk-github-runners/blob/main/LICENSE)\n\nUse this CDK construct to create ephemeral [self-hosted GitHub runners][1] on-demand inside your AWS account.\n\n* Easy to configure GitHub integration with a web-based interface\n* Customizable runners with decent defaults\n* Multiple runner configurations controlled by labels\n* Everything fully hosted in your account\n\nSelf-hosted runners in AWS are useful when:\n\n* You need easy access to internal resources in your actions\n* You want to pre-install some software for your actions\n* You want to provide some basic AWS API access (but [aws-actions/configure-aws-credentials][2] has more security controls)\n\nEphemeral (or on-demand) runners are the [recommended way by GitHub][14] for auto-scaling, and they make sure all jobs run with a clean image. Runners are started on-demand. You don't pay unless a job is running.\n\n## API\n\nThe best way to browse API documentation is on [Constructs Hub][13]. It is available in all supported programming languages.\n\n## Providers\n\nA runner provider creates compute resources on-demand and uses [actions/runner][5] to start a runner.\n\n| | CodeBuild | Fargate | Lambda |\n|------------------|--------------------------|----------------|----------------|\n| **Time limit** | 8 hours | Unlimited | 15 minutes |\n| **vCPUs** | 2, 4, 8, or 72 | 0.25 to 4 | 1 to 6 |\n| **RAM** | 3gb, 7gb, 15gb, or 145gb | 512mb to 30gb | 128mb to 10gb |\n| **Storage** | 50gb to 824gb | 20gb to 200gb | Up to 10gb |\n| **Architecture** | x86_64, ARM64 | x86_64, ARM64 | x86_64, ARM64 |\n| **sudo** | ✔ | ✔ | ❌ |\n| **Docker** | ✔ | ❌ | ❌ |\n| **Spot pricing** | ❌ | ✔ | ❌ |\n\nThe best provider to use mostly depends on your current infrastructure. When in doubt, CodeBuild is always a good choice. Execution history and logs are easy to view, and it has no restrictive limits unless you need to run for more than 8 hours.\n\nYou can also create your own provider by implementing `IRunnerProvider`.\n\n## Installation\n\n1. Confirm you're using CDK v2\n2. Install the appropriate package\n 1. [Python][6]\n ```\n pip install cloudsnorkel.cdk-github-runners\n ```\n 2. [TypeScript or JavaScript][7]\n ```\n npm i @cloudsnorkel/cdk-github-runners\n ```\n 3. [Java][8]\n ```xml\n <dependency>\n <groupId>com.cloudsnorkel</groupId>\n <artifactId>cdk.github.runners</artifactId>\n </dependency>\n ```\n 4. [Go][11]\n ```\n go get github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners\n ```\n 5. [.NET][12]\n ```\n dotnet add package CloudSnorkel.Cdk.Github.Runners\n ```\n3. Use `GitHubRunners` construct in your code (starting with default arguments is fine)\n4. Deploy your stack\n5. Look for the status command output similar to `aws --region us-east-1 lambda invoke --function-name status-XYZ123 status.json`\n6. Execute the status command (you may need to specify `--profile` too) and open the resulting `status.json` file\n7. Open the URL in `github.setup.url` from `status.json` or [manually setup GitHub](SETUP_GITHUB.md) integration as an app or with personal access token\n8. Run status command again to confirm `github.auth.status` and `github.webhook.status` are OK\n9. Trigger a GitHub action that has a `self-hosted` label with `runs-on: [self-hosted, linux, codebuild]` or similar\n10. If the action is not successful, see [troubleshooting](#Troubleshooting)\n\n[![Demo](demo-thumbnail.jpg)](https://youtu.be/wlyv_3V8lIw)\n\n## Customizing\n\nThe default providers configured by `GitHubRunners` are useful for testing but probably not too much for actual production work. They run in the default VPC or no VPC and have no added IAM permissions. You would usually want to configure the providers yourself.\n\nFor example:\n\n```typescript\nlet vpc: ec2.Vpc;\nlet runnerSg: ec2.SecurityGroup;\nlet dbSg: ec2.SecurityGroup;\nlet bucket: s3.Bucket;\n\n// create a custom CodeBuild provider\nconst myProvider = new CodeBuildRunner(this, 'codebuild runner', {\n label: 'my-codebuild',\n vpc: vpc,\n securityGroup: runnerSg,\n});\n// grant some permissions to the provider\nbucket.grantReadWrite(myProvider);\ndbSg.connections.allowFrom(runnerSg, ec2.Port.tcp(3306), 'allow runners to connect to MySQL database');\n\n// create the runner infrastructure\nnew GitHubRunners(this, 'runners', {\n providers: [myProvider],\n});\n```\n\nAnother way to customize runners is by modifying the image used to spin them up. The image contains the [runner][5], any required dependencies, and integration code with the provider. You may choose to customize this image by adding more packages, for example.\n\n```typescript\nconst myBuilder = new CodeBuildImageBuilder(this, 'image builder', {\n dockerfilePath: FargateProvider.LINUX_X64_DOCKERFILE_PATH,\n runnerVersion: RunnerVersion.specific('2.291.0'),\n rebuildInterval: Duration.days(14),\n});\nmyBuilder.setBuildArg('EXTRA_PACKAGES', 'nginx xz-utils');\n\nconst myProvider = new FargateProvider(this, 'fargate runner', {\n label: 'customized-fargate',\n vpc: vpc,\n securityGroup: runnerSg,\n});\n\n// create the runner infrastructure\nnew GitHubRunners(stack, 'runners', {\n providers: [myProvider],\n});\n```\n\nYour workflow will then look like:\n\n```yaml\nname: self-hosted example\non: push\njobs:\n self-hosted:\n runs-on: [self-hosted, customized-fargate]\n steps:\n - run: echo hello world\n```\n\n## Architecture\n\n![Architecture diagram](architecture.svg)\n\n## Troubleshooting\n\n1. Always start with the status function, make sure no errors are reported, and confirm all status codes are OK\n2. Confirm the webhook Lambda was called by visiting the URL in `troubleshooting.webhookHandlerUrl` from `status.json`\n 1. If it's not called or logs errors, confirm the webhook settings on the GitHub side\n 2. If you see too many errors, make sure you're only sending `workflow_job` events\n3. When using GitHub app, make sure there are active installation in `github.auth.app.installations`\n4. Check execution details of the orchestrator step function by visiting the URL in `troubleshooting.stepFunctionUrl` from `status.json`\n 1. Use the details tab to find the specific execution of the provider (Lambda, CodeBuild, Fargate, etc.)\n 2. Every step function execution should be successful, even if the runner action inside it failed\n\n## Other Options\n\n1. [philips-labs/terraform-aws-github-runner][3] if you're using Terraform\n2. [actions-runner-controller/actions-runner-controller][4] if you're using Kubernetes\n\n\n[1]: https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners\n[2]: https://github.com/marketplace/actions/configure-aws-credentials-action-for-github-actions\n[3]: https://github.com/philips-labs/terraform-aws-github-runner\n[4]: https://github.com/actions-runner-controller/actions-runner-controller\n[5]: https://github.com/actions/runner\n[6]: https://pypi.org/project/cloudsnorkel.cdk-github-runners\n[7]: https://www.npmjs.com/package/@cloudsnorkel/cdk-github-runners\n[8]: https://search.maven.org/search?q=g:%22com.cloudsnorkel%22%20AND%20a:%22cdk.github.runners%22\n[9]: https://docs.github.com/en/developers/apps/getting-started-with-apps/about-apps\n[10]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token\n[11]: https://pkg.go.dev/github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners\n[12]: https://www.nuget.org/packages/CloudSnorkel.Cdk.Github.Runners/\n[13]: https://constructs.dev/packages/@cloudsnorkel/cdk-github-runners/\n[14]: https://docs.github.com/en/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners#using-ephemeral-runners-for-autoscaling\n"
2999
2999
  },
3000
3000
  "repository": {
3001
3001
  "type": "git",
@@ -3026,6 +3026,574 @@
3026
3026
  }
3027
3027
  },
3028
3028
  "types": {
3029
+ "@cloudsnorkel/cdk-github-runners.Architecture": {
3030
+ "assembly": "@cloudsnorkel/cdk-github-runners",
3031
+ "docs": {
3032
+ "stability": "experimental",
3033
+ "summary": "CPU architecture enum for an image."
3034
+ },
3035
+ "fqn": "@cloudsnorkel/cdk-github-runners.Architecture",
3036
+ "kind": "class",
3037
+ "locationInModule": {
3038
+ "filename": "src/providers/common.ts",
3039
+ "line": 32
3040
+ },
3041
+ "methods": [
3042
+ {
3043
+ "docs": {
3044
+ "stability": "experimental",
3045
+ "summary": "Checks if the given architecture is the same as this one."
3046
+ },
3047
+ "locationInModule": {
3048
+ "filename": "src/providers/common.ts",
3049
+ "line": 55
3050
+ },
3051
+ "name": "is",
3052
+ "parameters": [
3053
+ {
3054
+ "docs": {
3055
+ "summary": "architecture to compare."
3056
+ },
3057
+ "name": "arch",
3058
+ "type": {
3059
+ "fqn": "@cloudsnorkel/cdk-github-runners.Architecture"
3060
+ }
3061
+ }
3062
+ ],
3063
+ "returns": {
3064
+ "type": {
3065
+ "primitive": "boolean"
3066
+ }
3067
+ }
3068
+ }
3069
+ ],
3070
+ "name": "Architecture",
3071
+ "properties": [
3072
+ {
3073
+ "const": true,
3074
+ "docs": {
3075
+ "stability": "experimental",
3076
+ "summary": "ARM64."
3077
+ },
3078
+ "immutable": true,
3079
+ "locationInModule": {
3080
+ "filename": "src/providers/common.ts",
3081
+ "line": 36
3082
+ },
3083
+ "name": "ARM64",
3084
+ "static": true,
3085
+ "type": {
3086
+ "fqn": "@cloudsnorkel/cdk-github-runners.Architecture"
3087
+ }
3088
+ },
3089
+ {
3090
+ "const": true,
3091
+ "docs": {
3092
+ "stability": "experimental",
3093
+ "summary": "X86_64."
3094
+ },
3095
+ "immutable": true,
3096
+ "locationInModule": {
3097
+ "filename": "src/providers/common.ts",
3098
+ "line": 41
3099
+ },
3100
+ "name": "X86_64",
3101
+ "static": true,
3102
+ "type": {
3103
+ "fqn": "@cloudsnorkel/cdk-github-runners.Architecture"
3104
+ }
3105
+ },
3106
+ {
3107
+ "docs": {
3108
+ "stability": "experimental"
3109
+ },
3110
+ "immutable": true,
3111
+ "locationInModule": {
3112
+ "filename": "src/providers/common.ts",
3113
+ "line": 47
3114
+ },
3115
+ "name": "name",
3116
+ "type": {
3117
+ "primitive": "string"
3118
+ }
3119
+ }
3120
+ ],
3121
+ "symbolId": "src/providers/common:Architecture"
3122
+ },
3123
+ "@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder": {
3124
+ "assembly": "@cloudsnorkel/cdk-github-runners",
3125
+ "base": "constructs.Construct",
3126
+ "docs": {
3127
+ "remarks": "Builders can be used with runner providers.\n\nEach builder re-runs automatically at a set interval to make sure the images contain the latest versions of everything.\n\nYou can create an instance of this construct to customize the image used to spin-up runners. Each provider has its own requirements for what an image should do. That's why they each provide their own Dockerfile.\n\nFor example, to set a specific runner version, rebuild the image every 2 weeks, and add a few packages for the Fargate provider, use:\n\n```\nconst builder = new CodeBuildImageBuilder(this, 'Builder', {\n dockerfilePath: FargateProvider.LINUX_X64_DOCKERFILE_PATH,\n runnerVersion: RunnerVersion.specific('2.293.0'),\n rebuildInterval: Duration.days(14),\n});\nbuilder.setBuildArg('EXTRA_PACKAGES', 'nginx xz-utils');\nnew FargateProvider(this, 'Fargate provider', {\n label: 'customized-fargate',\n imageBuilder: builder,\n});\n```",
3128
+ "stability": "experimental",
3129
+ "summary": "An image builder that uses CodeBuild to build Docker images pre-baked with all the GitHub Actions runner requirements."
3130
+ },
3131
+ "fqn": "@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilder",
3132
+ "initializer": {
3133
+ "docs": {
3134
+ "stability": "experimental"
3135
+ },
3136
+ "locationInModule": {
3137
+ "filename": "src/providers/image-builders/codebuild.ts",
3138
+ "line": 164
3139
+ },
3140
+ "parameters": [
3141
+ {
3142
+ "name": "scope",
3143
+ "type": {
3144
+ "fqn": "constructs.Construct"
3145
+ }
3146
+ },
3147
+ {
3148
+ "name": "id",
3149
+ "type": {
3150
+ "primitive": "string"
3151
+ }
3152
+ },
3153
+ {
3154
+ "name": "props",
3155
+ "type": {
3156
+ "fqn": "@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps"
3157
+ }
3158
+ }
3159
+ ]
3160
+ },
3161
+ "interfaces": [
3162
+ "@cloudsnorkel/cdk-github-runners.IImageBuilder"
3163
+ ],
3164
+ "kind": "class",
3165
+ "locationInModule": {
3166
+ "filename": "src/providers/image-builders/codebuild.ts",
3167
+ "line": 149
3168
+ },
3169
+ "methods": [
3170
+ {
3171
+ "docs": {
3172
+ "remarks": "All first party Dockerfiles support this. Others may not.",
3173
+ "stability": "experimental",
3174
+ "summary": "Add extra trusted certificates. This helps deal with self-signed certificates for GitHub Enterprise Server."
3175
+ },
3176
+ "locationInModule": {
3177
+ "filename": "src/providers/image-builders/codebuild.ts",
3178
+ "line": 271
3179
+ },
3180
+ "name": "addExtraCertificates",
3181
+ "parameters": [
3182
+ {
3183
+ "docs": {
3184
+ "summary": "path to directory containing a file called certs.pem containing all the required certificates."
3185
+ },
3186
+ "name": "path",
3187
+ "type": {
3188
+ "primitive": "string"
3189
+ }
3190
+ }
3191
+ ]
3192
+ },
3193
+ {
3194
+ "docs": {
3195
+ "stability": "experimental",
3196
+ "summary": "Uploads a folder to the build server at a given folder name."
3197
+ },
3198
+ "locationInModule": {
3199
+ "filename": "src/providers/image-builders/codebuild.ts",
3200
+ "line": 205
3201
+ },
3202
+ "name": "addFiles",
3203
+ "parameters": [
3204
+ {
3205
+ "docs": {
3206
+ "summary": "path to source directory."
3207
+ },
3208
+ "name": "sourcePath",
3209
+ "type": {
3210
+ "primitive": "string"
3211
+ }
3212
+ },
3213
+ {
3214
+ "docs": {
3215
+ "summary": "name of destination folder."
3216
+ },
3217
+ "name": "destName",
3218
+ "type": {
3219
+ "primitive": "string"
3220
+ }
3221
+ }
3222
+ ]
3223
+ },
3224
+ {
3225
+ "docs": {
3226
+ "stability": "experimental",
3227
+ "summary": "Add a policy statement to the builder to access resources required to the image build."
3228
+ },
3229
+ "locationInModule": {
3230
+ "filename": "src/providers/image-builders/codebuild.ts",
3231
+ "line": 257
3232
+ },
3233
+ "name": "addPolicyStatement",
3234
+ "parameters": [
3235
+ {
3236
+ "docs": {
3237
+ "summary": "IAM policy statement."
3238
+ },
3239
+ "name": "statement",
3240
+ "type": {
3241
+ "fqn": "aws-cdk-lib.aws_iam.PolicyStatement"
3242
+ }
3243
+ }
3244
+ ]
3245
+ },
3246
+ {
3247
+ "docs": {
3248
+ "stability": "experimental",
3249
+ "summary": "Adds a command that runs after `docker build` and `docker push`."
3250
+ },
3251
+ "locationInModule": {
3252
+ "filename": "src/providers/image-builders/codebuild.ts",
3253
+ "line": 232
3254
+ },
3255
+ "name": "addPostBuildCommand",
3256
+ "parameters": [
3257
+ {
3258
+ "docs": {
3259
+ "summary": "command to add."
3260
+ },
3261
+ "name": "command",
3262
+ "type": {
3263
+ "primitive": "string"
3264
+ }
3265
+ }
3266
+ ]
3267
+ },
3268
+ {
3269
+ "docs": {
3270
+ "stability": "experimental",
3271
+ "summary": "Adds a command that runs before `docker build`."
3272
+ },
3273
+ "locationInModule": {
3274
+ "filename": "src/providers/image-builders/codebuild.ts",
3275
+ "line": 220
3276
+ },
3277
+ "name": "addPreBuildCommand",
3278
+ "parameters": [
3279
+ {
3280
+ "docs": {
3281
+ "summary": "command to add."
3282
+ },
3283
+ "name": "command",
3284
+ "type": {
3285
+ "primitive": "string"
3286
+ }
3287
+ }
3288
+ ]
3289
+ },
3290
+ {
3291
+ "docs": {
3292
+ "stability": "experimental",
3293
+ "summary": "Called by IRunnerProvider to finalize settings and create the image builder."
3294
+ },
3295
+ "locationInModule": {
3296
+ "filename": "src/providers/image-builders/codebuild.ts",
3297
+ "line": 281
3298
+ },
3299
+ "name": "bind",
3300
+ "overrides": "@cloudsnorkel/cdk-github-runners.IImageBuilder",
3301
+ "returns": {
3302
+ "type": {
3303
+ "fqn": "@cloudsnorkel/cdk-github-runners.RunnerImage"
3304
+ }
3305
+ }
3306
+ },
3307
+ {
3308
+ "docs": {
3309
+ "remarks": "See the documentation for the Dockerfile you're using for a list of supported build arguments.",
3310
+ "stability": "experimental",
3311
+ "summary": "Adds a build argument for Docker."
3312
+ },
3313
+ "locationInModule": {
3314
+ "filename": "src/providers/image-builders/codebuild.ts",
3315
+ "line": 245
3316
+ },
3317
+ "name": "setBuildArg",
3318
+ "parameters": [
3319
+ {
3320
+ "docs": {
3321
+ "summary": "build argument name."
3322
+ },
3323
+ "name": "name",
3324
+ "type": {
3325
+ "primitive": "string"
3326
+ }
3327
+ },
3328
+ {
3329
+ "docs": {
3330
+ "summary": "build argument value."
3331
+ },
3332
+ "name": "value",
3333
+ "type": {
3334
+ "primitive": "string"
3335
+ }
3336
+ }
3337
+ ]
3338
+ }
3339
+ ],
3340
+ "name": "CodeBuildImageBuilder",
3341
+ "properties": [
3342
+ {
3343
+ "docs": {
3344
+ "stability": "experimental"
3345
+ },
3346
+ "immutable": true,
3347
+ "locationInModule": {
3348
+ "filename": "src/providers/image-builders/codebuild.ts",
3349
+ "line": 164
3350
+ },
3351
+ "name": "props",
3352
+ "type": {
3353
+ "fqn": "@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps"
3354
+ }
3355
+ }
3356
+ ],
3357
+ "symbolId": "src/providers/image-builders/codebuild:CodeBuildImageBuilder"
3358
+ },
3359
+ "@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps": {
3360
+ "assembly": "@cloudsnorkel/cdk-github-runners",
3361
+ "datatype": true,
3362
+ "docs": {
3363
+ "stability": "experimental",
3364
+ "summary": "Properties for CodeBuildImageBuilder construct."
3365
+ },
3366
+ "fqn": "@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps",
3367
+ "kind": "interface",
3368
+ "locationInModule": {
3369
+ "filename": "src/providers/image-builders/codebuild.ts",
3370
+ "line": 34
3371
+ },
3372
+ "name": "CodeBuildImageBuilderProps",
3373
+ "properties": [
3374
+ {
3375
+ "abstract": true,
3376
+ "docs": {
3377
+ "remarks": "It can be a path to a Dockerfile, a folder containing a Dockerfile, or a zip file containing a Dockerfile.",
3378
+ "stability": "experimental",
3379
+ "summary": "Path to Dockerfile to be built."
3380
+ },
3381
+ "immutable": true,
3382
+ "locationInModule": {
3383
+ "filename": "src/providers/image-builders/codebuild.ts",
3384
+ "line": 52
3385
+ },
3386
+ "name": "dockerfilePath",
3387
+ "type": {
3388
+ "primitive": "string"
3389
+ }
3390
+ },
3391
+ {
3392
+ "abstract": true,
3393
+ "docs": {
3394
+ "default": "Architecture.X86_64",
3395
+ "stability": "experimental",
3396
+ "summary": "Image architecture."
3397
+ },
3398
+ "immutable": true,
3399
+ "locationInModule": {
3400
+ "filename": "src/providers/image-builders/codebuild.ts",
3401
+ "line": 40
3402
+ },
3403
+ "name": "architecture",
3404
+ "optional": true,
3405
+ "type": {
3406
+ "fqn": "@cloudsnorkel/cdk-github-runners.Architecture"
3407
+ }
3408
+ },
3409
+ {
3410
+ "abstract": true,
3411
+ "docs": {
3412
+ "default": "{@link ComputeType#SMALL}",
3413
+ "remarks": "See the {@link ComputeType} enum for the possible values.",
3414
+ "stability": "experimental",
3415
+ "summary": "The type of compute to use for this build."
3416
+ },
3417
+ "immutable": true,
3418
+ "locationInModule": {
3419
+ "filename": "src/providers/image-builders/codebuild.ts",
3420
+ "line": 97
3421
+ },
3422
+ "name": "computeType",
3423
+ "optional": true,
3424
+ "type": {
3425
+ "fqn": "aws-cdk-lib.aws_codebuild.ComputeType"
3426
+ }
3427
+ },
3428
+ {
3429
+ "abstract": true,
3430
+ "docs": {
3431
+ "default": "RemovalPolicy.DESTROY",
3432
+ "remarks": "If deployment fails on the custom resource, try setting this to `RemovalPolicy.RETAIN`. This way the CodeBuild logs can still be viewed, and you can see why the build failed.\n\nWe try to not leave anything behind when removed. But sometimes a log staying behind is useful.",
3433
+ "stability": "experimental",
3434
+ "summary": "Removal policy for logs of image builds."
3435
+ },
3436
+ "immutable": true,
3437
+ "locationInModule": {
3438
+ "filename": "src/providers/image-builders/codebuild.ts",
3439
+ "line": 124
3440
+ },
3441
+ "name": "logRemovalPolicy",
3442
+ "optional": true,
3443
+ "type": {
3444
+ "fqn": "aws-cdk-lib.RemovalPolicy"
3445
+ }
3446
+ },
3447
+ {
3448
+ "abstract": true,
3449
+ "docs": {
3450
+ "default": "logs.RetentionDays.ONE_MONTH",
3451
+ "remarks": "When updating\nthis property, unsetting it doesn't remove the log retention policy. To\nremove the retention policy, set the value to `INFINITE`.",
3452
+ "stability": "experimental",
3453
+ "summary": "The number of days log events are kept in CloudWatch Logs."
3454
+ },
3455
+ "immutable": true,
3456
+ "locationInModule": {
3457
+ "filename": "src/providers/image-builders/codebuild.ts",
3458
+ "line": 115
3459
+ },
3460
+ "name": "logRetention",
3461
+ "optional": true,
3462
+ "type": {
3463
+ "fqn": "aws-cdk-lib.aws_logs.RetentionDays"
3464
+ }
3465
+ },
3466
+ {
3467
+ "abstract": true,
3468
+ "docs": {
3469
+ "default": "OS.LINUX",
3470
+ "stability": "experimental",
3471
+ "summary": "Image OS."
3472
+ },
3473
+ "immutable": true,
3474
+ "locationInModule": {
3475
+ "filename": "src/providers/image-builders/codebuild.ts",
3476
+ "line": 47
3477
+ },
3478
+ "name": "os",
3479
+ "optional": true,
3480
+ "type": {
3481
+ "fqn": "@cloudsnorkel/cdk-github-runners.Os"
3482
+ }
3483
+ },
3484
+ {
3485
+ "abstract": true,
3486
+ "docs": {
3487
+ "default": "Duration.days(7)",
3488
+ "remarks": "Useful for keeping the image up-do-date with the latest GitHub runner version and latest OS updates.\n\nSet to zero to disable.",
3489
+ "stability": "experimental",
3490
+ "summary": "Schedule the image to be rebuilt every given interval."
3491
+ },
3492
+ "immutable": true,
3493
+ "locationInModule": {
3494
+ "filename": "src/providers/image-builders/codebuild.ts",
3495
+ "line": 68
3496
+ },
3497
+ "name": "rebuildInterval",
3498
+ "optional": true,
3499
+ "type": {
3500
+ "fqn": "aws-cdk-lib.Duration"
3501
+ }
3502
+ },
3503
+ {
3504
+ "abstract": true,
3505
+ "docs": {
3506
+ "default": "latest version available",
3507
+ "stability": "experimental",
3508
+ "summary": "Version of GitHub Runners to install."
3509
+ },
3510
+ "immutable": true,
3511
+ "locationInModule": {
3512
+ "filename": "src/providers/image-builders/codebuild.ts",
3513
+ "line": 59
3514
+ },
3515
+ "name": "runnerVersion",
3516
+ "optional": true,
3517
+ "type": {
3518
+ "fqn": "@cloudsnorkel/cdk-github-runners.RunnerVersion"
3519
+ }
3520
+ },
3521
+ {
3522
+ "abstract": true,
3523
+ "docs": {
3524
+ "default": "public project with no security group",
3525
+ "stability": "experimental",
3526
+ "summary": "Security Group to assign to this instance."
3527
+ },
3528
+ "immutable": true,
3529
+ "locationInModule": {
3530
+ "filename": "src/providers/image-builders/codebuild.ts",
3531
+ "line": 82
3532
+ },
3533
+ "name": "securityGroup",
3534
+ "optional": true,
3535
+ "type": {
3536
+ "fqn": "aws-cdk-lib.aws_ec2.ISecurityGroup"
3537
+ }
3538
+ },
3539
+ {
3540
+ "abstract": true,
3541
+ "docs": {
3542
+ "default": "no subnet",
3543
+ "stability": "experimental",
3544
+ "summary": "Where to place the network interfaces within the VPC."
3545
+ },
3546
+ "immutable": true,
3547
+ "locationInModule": {
3548
+ "filename": "src/providers/image-builders/codebuild.ts",
3549
+ "line": 89
3550
+ },
3551
+ "name": "subnetSelection",
3552
+ "optional": true,
3553
+ "type": {
3554
+ "fqn": "aws-cdk-lib.aws_ec2.SubnetSelection"
3555
+ }
3556
+ },
3557
+ {
3558
+ "abstract": true,
3559
+ "docs": {
3560
+ "default": "Duration.hours(1)",
3561
+ "remarks": "For valid values, see the timeoutInMinutes field in the AWS\nCodeBuild User Guide.",
3562
+ "stability": "experimental",
3563
+ "summary": "The number of minutes after which AWS CodeBuild stops the build if it's not complete."
3564
+ },
3565
+ "immutable": true,
3566
+ "locationInModule": {
3567
+ "filename": "src/providers/image-builders/codebuild.ts",
3568
+ "line": 106
3569
+ },
3570
+ "name": "timeout",
3571
+ "optional": true,
3572
+ "type": {
3573
+ "fqn": "aws-cdk-lib.Duration"
3574
+ }
3575
+ },
3576
+ {
3577
+ "abstract": true,
3578
+ "docs": {
3579
+ "default": "no VPC",
3580
+ "stability": "experimental",
3581
+ "summary": "VPC to launch the runners in."
3582
+ },
3583
+ "immutable": true,
3584
+ "locationInModule": {
3585
+ "filename": "src/providers/image-builders/codebuild.ts",
3586
+ "line": 75
3587
+ },
3588
+ "name": "vpc",
3589
+ "optional": true,
3590
+ "type": {
3591
+ "fqn": "aws-cdk-lib.aws_ec2.IVpc"
3592
+ }
3593
+ }
3594
+ ],
3595
+ "symbolId": "src/providers/image-builders/codebuild:CodeBuildImageBuilderProps"
3596
+ },
3029
3597
  "@cloudsnorkel/cdk-github-runners.CodeBuildRunner": {
3030
3598
  "assembly": "@cloudsnorkel/cdk-github-runners",
3031
3599
  "base": "constructs.Construct",
@@ -3041,7 +3609,7 @@
3041
3609
  },
3042
3610
  "locationInModule": {
3043
3611
  "filename": "src/providers/codebuild.ts",
3044
- "line": 98
3612
+ "line": 133
3045
3613
  },
3046
3614
  "parameters": [
3047
3615
  {
@@ -3070,7 +3638,7 @@
3070
3638
  "kind": "class",
3071
3639
  "locationInModule": {
3072
3640
  "filename": "src/providers/codebuild.ts",
3073
- "line": 72
3641
+ "line": 81
3074
3642
  },
3075
3643
  "methods": [
3076
3644
  {
@@ -3081,7 +3649,7 @@
3081
3649
  },
3082
3650
  "locationInModule": {
3083
3651
  "filename": "src/providers/codebuild.ts",
3084
- "line": 177
3652
+ "line": 233
3085
3653
  },
3086
3654
  "name": "getStepFunctionTask",
3087
3655
  "overrides": "@cloudsnorkel/cdk-github-runners.IRunnerProvider",
@@ -3105,6 +3673,42 @@
3105
3673
  ],
3106
3674
  "name": "CodeBuildRunner",
3107
3675
  "properties": [
3676
+ {
3677
+ "const": true,
3678
+ "docs": {
3679
+ "remarks": "Use this Dockerfile unless you need to customize it further than allowed by hooks.\n\nAvailable build arguments that can be set in the image builder:\n* `BASE_IMAGE` sets the `FROM` line. This should be an Ubuntu compatible image.\n* `EXTRA_PACKAGES` can be used to install additional packages.\n* `DOCKER_CHANNEL` overrides the channel from which Docker will be downloaded. Defaults to `\"stsable\"`.\n* `DIND_COMMIT` overrides the commit where dind is found.\n* `DOCKER_VERSION` overrides the installed Docker version.\n* `DOCKER_COMPOSE_VERSION` overrides the installed docker-compose version.",
3680
+ "stability": "experimental",
3681
+ "summary": "Path to Dockerfile for Linux ARM64 with all the requirements for CodeBuild runner."
3682
+ },
3683
+ "immutable": true,
3684
+ "locationInModule": {
3685
+ "filename": "src/providers/codebuild.ts",
3686
+ "line": 106
3687
+ },
3688
+ "name": "LINUX_ARM64_DOCKERFILE_PATH",
3689
+ "static": true,
3690
+ "type": {
3691
+ "primitive": "string"
3692
+ }
3693
+ },
3694
+ {
3695
+ "const": true,
3696
+ "docs": {
3697
+ "remarks": "Use this Dockerfile unless you need to customize it further than allowed by hooks.\n\nAvailable build arguments that can be set in the image builder:\n* `BASE_IMAGE` sets the `FROM` line. This should be an Ubuntu compatible image.\n* `EXTRA_PACKAGES` can be used to install additional packages.\n* `DOCKER_CHANNEL` overrides the channel from which Docker will be downloaded. Defaults to `\"stsable\"`.\n* `DIND_COMMIT` overrides the commit where dind is found.\n* `DOCKER_VERSION` overrides the installed Docker version.\n* `DOCKER_COMPOSE_VERSION` overrides the installed docker-compose version.",
3698
+ "stability": "experimental",
3699
+ "summary": "Path to Dockerfile for Linux x64 with all the requirements for CodeBuild runner."
3700
+ },
3701
+ "immutable": true,
3702
+ "locationInModule": {
3703
+ "filename": "src/providers/codebuild.ts",
3704
+ "line": 93
3705
+ },
3706
+ "name": "LINUX_X64_DOCKERFILE_PATH",
3707
+ "static": true,
3708
+ "type": {
3709
+ "primitive": "string"
3710
+ }
3711
+ },
3108
3712
  {
3109
3713
  "docs": {
3110
3714
  "stability": "experimental",
@@ -3113,7 +3717,7 @@
3113
3717
  "immutable": true,
3114
3718
  "locationInModule": {
3115
3719
  "filename": "src/providers/codebuild.ts",
3116
- "line": 217
3720
+ "line": 273
3117
3721
  },
3118
3722
  "name": "connections",
3119
3723
  "overrides": "aws-cdk-lib.aws_ec2.IConnectable",
@@ -3129,7 +3733,7 @@
3129
3733
  "immutable": true,
3130
3734
  "locationInModule": {
3131
3735
  "filename": "src/providers/codebuild.ts",
3132
- "line": 96
3736
+ "line": 131
3133
3737
  },
3134
3738
  "name": "grantPrincipal",
3135
3739
  "overrides": "aws-cdk-lib.aws_iam.IGrantable",
@@ -3145,7 +3749,7 @@
3145
3749
  "immutable": true,
3146
3750
  "locationInModule": {
3147
3751
  "filename": "src/providers/codebuild.ts",
3148
- "line": 81
3752
+ "line": 116
3149
3753
  },
3150
3754
  "name": "label",
3151
3755
  "overrides": "@cloudsnorkel/cdk-github-runners.IRunnerProvider",
@@ -3161,7 +3765,7 @@
3161
3765
  "immutable": true,
3162
3766
  "locationInModule": {
3163
3767
  "filename": "src/providers/codebuild.ts",
3164
- "line": 76
3768
+ "line": 111
3165
3769
  },
3166
3770
  "name": "project",
3167
3771
  "type": {
@@ -3176,7 +3780,7 @@
3176
3780
  "immutable": true,
3177
3781
  "locationInModule": {
3178
3782
  "filename": "src/providers/codebuild.ts",
3179
- "line": 91
3783
+ "line": 126
3180
3784
  },
3181
3785
  "name": "securityGroup",
3182
3786
  "optional": true,
@@ -3193,7 +3797,7 @@
3193
3797
  "immutable": true,
3194
3798
  "locationInModule": {
3195
3799
  "filename": "src/providers/codebuild.ts",
3196
- "line": 86
3800
+ "line": 121
3197
3801
  },
3198
3802
  "name": "vpc",
3199
3803
  "optional": true,
@@ -3218,7 +3822,7 @@
3218
3822
  "kind": "interface",
3219
3823
  "locationInModule": {
3220
3824
  "filename": "src/providers/codebuild.ts",
3221
- "line": 18
3825
+ "line": 20
3222
3826
  },
3223
3827
  "name": "CodeBuildRunnerProps",
3224
3828
  "properties": [
@@ -3233,7 +3837,7 @@
3233
3837
  "immutable": true,
3234
3838
  "locationInModule": {
3235
3839
  "filename": "src/providers/codebuild.ts",
3236
- "line": 53
3840
+ "line": 62
3237
3841
  },
3238
3842
  "name": "computeType",
3239
3843
  "optional": true,
@@ -3241,6 +3845,25 @@
3241
3845
  "fqn": "aws-cdk-lib.aws_codebuild.ComputeType"
3242
3846
  }
3243
3847
  },
3848
+ {
3849
+ "abstract": true,
3850
+ "docs": {
3851
+ "default": "image builder with `CodeBuildRunner.LINUX_X64_DOCKERFILE_PATH` as Dockerfile",
3852
+ "remarks": "A user named `runner` is expected to exist with access to Docker-in-Docker.",
3853
+ "stability": "experimental",
3854
+ "summary": "Provider running an image to run inside CodeBuild with GitHub runner pre-configured."
3855
+ },
3856
+ "immutable": true,
3857
+ "locationInModule": {
3858
+ "filename": "src/providers/codebuild.ts",
3859
+ "line": 26
3860
+ },
3861
+ "name": "imageBuilder",
3862
+ "optional": true,
3863
+ "type": {
3864
+ "fqn": "@cloudsnorkel/cdk-github-runners.IImageBuilder"
3865
+ }
3866
+ },
3244
3867
  {
3245
3868
  "abstract": true,
3246
3869
  "docs": {
@@ -3251,7 +3874,7 @@
3251
3874
  "immutable": true,
3252
3875
  "locationInModule": {
3253
3876
  "filename": "src/providers/codebuild.ts",
3254
- "line": 24
3877
+ "line": 33
3255
3878
  },
3256
3879
  "name": "label",
3257
3880
  "optional": true,
@@ -3269,7 +3892,7 @@
3269
3892
  "immutable": true,
3270
3893
  "locationInModule": {
3271
3894
  "filename": "src/providers/codebuild.ts",
3272
- "line": 38
3895
+ "line": 47
3273
3896
  },
3274
3897
  "name": "securityGroup",
3275
3898
  "optional": true,
@@ -3287,7 +3910,7 @@
3287
3910
  "immutable": true,
3288
3911
  "locationInModule": {
3289
3912
  "filename": "src/providers/codebuild.ts",
3290
- "line": 45
3913
+ "line": 54
3291
3914
  },
3292
3915
  "name": "subnetSelection",
3293
3916
  "optional": true,
@@ -3306,7 +3929,7 @@
3306
3929
  "immutable": true,
3307
3930
  "locationInModule": {
3308
3931
  "filename": "src/providers/codebuild.ts",
3309
- "line": 62
3932
+ "line": 71
3310
3933
  },
3311
3934
  "name": "timeout",
3312
3935
  "optional": true,
@@ -3324,7 +3947,7 @@
3324
3947
  "immutable": true,
3325
3948
  "locationInModule": {
3326
3949
  "filename": "src/providers/codebuild.ts",
3327
- "line": 31
3950
+ "line": 40
3328
3951
  },
3329
3952
  "name": "vpc",
3330
3953
  "optional": true,
@@ -3350,7 +3973,7 @@
3350
3973
  },
3351
3974
  "locationInModule": {
3352
3975
  "filename": "src/providers/fargate.ts",
3353
- "line": 193
3976
+ "line": 229
3354
3977
  },
3355
3978
  "parameters": [
3356
3979
  {
@@ -3379,7 +4002,7 @@
3379
4002
  "kind": "class",
3380
4003
  "locationInModule": {
3381
4004
  "filename": "src/providers/fargate.ts",
3382
- "line": 142
4005
+ "line": 160
3383
4006
  },
3384
4007
  "methods": [
3385
4008
  {
@@ -3390,7 +4013,7 @@
3390
4013
  },
3391
4014
  "locationInModule": {
3392
4015
  "filename": "src/providers/fargate.ts",
3393
- "line": 251
4016
+ "line": 298
3394
4017
  },
3395
4018
  "name": "getStepFunctionTask",
3396
4019
  "overrides": "@cloudsnorkel/cdk-github-runners.IRunnerProvider",
@@ -3414,6 +4037,42 @@
3414
4037
  ],
3415
4038
  "name": "FargateRunner",
3416
4039
  "properties": [
4040
+ {
4041
+ "const": true,
4042
+ "docs": {
4043
+ "remarks": "Use this Dockerfile unless you need to customize it further than allowed by hooks.\n\nAvailable build arguments that can be set in the image builder:\n* `BASE_IMAGE` sets the `FROM` line. This should be an Ubuntu compatible image.\n* `EXTRA_PACKAGES` can be used to install additional packages.",
4044
+ "stability": "experimental",
4045
+ "summary": "Path to Dockerfile for Linux ARM64 with all the requirement for Fargate runner."
4046
+ },
4047
+ "immutable": true,
4048
+ "locationInModule": {
4049
+ "filename": "src/providers/fargate.ts",
4050
+ "line": 177
4051
+ },
4052
+ "name": "LINUX_ARM64_DOCKERFILE_PATH",
4053
+ "static": true,
4054
+ "type": {
4055
+ "primitive": "string"
4056
+ }
4057
+ },
4058
+ {
4059
+ "const": true,
4060
+ "docs": {
4061
+ "remarks": "Use this Dockerfile unless you need to customize it further than allowed by hooks.\n\nAvailable build arguments that can be set in the image builder:\n* `BASE_IMAGE` sets the `FROM` line. This should be an Ubuntu compatible image.\n* `EXTRA_PACKAGES` can be used to install additional packages.",
4062
+ "stability": "experimental",
4063
+ "summary": "Path to Dockerfile for Linux x64 with all the requirement for Fargate runner."
4064
+ },
4065
+ "immutable": true,
4066
+ "locationInModule": {
4067
+ "filename": "src/providers/fargate.ts",
4068
+ "line": 168
4069
+ },
4070
+ "name": "LINUX_X64_DOCKERFILE_PATH",
4071
+ "static": true,
4072
+ "type": {
4073
+ "primitive": "string"
4074
+ }
4075
+ },
3417
4076
  {
3418
4077
  "docs": {
3419
4078
  "stability": "experimental",
@@ -3422,7 +4081,7 @@
3422
4081
  "immutable": true,
3423
4082
  "locationInModule": {
3424
4083
  "filename": "src/providers/fargate.ts",
3425
- "line": 176
4084
+ "line": 212
3426
4085
  },
3427
4086
  "name": "assignPublicIp",
3428
4087
  "type": {
@@ -3437,7 +4096,7 @@
3437
4096
  "immutable": true,
3438
4097
  "locationInModule": {
3439
4098
  "filename": "src/providers/fargate.ts",
3440
- "line": 146
4099
+ "line": 182
3441
4100
  },
3442
4101
  "name": "cluster",
3443
4102
  "type": {
@@ -3452,7 +4111,7 @@
3452
4111
  "immutable": true,
3453
4112
  "locationInModule": {
3454
4113
  "filename": "src/providers/fargate.ts",
3455
- "line": 186
4114
+ "line": 222
3456
4115
  },
3457
4116
  "name": "connections",
3458
4117
  "overrides": "aws-cdk-lib.aws_ec2.IConnectable",
@@ -3468,7 +4127,7 @@
3468
4127
  "immutable": true,
3469
4128
  "locationInModule": {
3470
4129
  "filename": "src/providers/fargate.ts",
3471
- "line": 156
4130
+ "line": 192
3472
4131
  },
3473
4132
  "name": "container",
3474
4133
  "type": {
@@ -3483,7 +4142,7 @@
3483
4142
  "immutable": true,
3484
4143
  "locationInModule": {
3485
4144
  "filename": "src/providers/fargate.ts",
3486
- "line": 181
4145
+ "line": 217
3487
4146
  },
3488
4147
  "name": "grantPrincipal",
3489
4148
  "overrides": "aws-cdk-lib.aws_iam.IGrantable",
@@ -3499,7 +4158,7 @@
3499
4158
  "immutable": true,
3500
4159
  "locationInModule": {
3501
4160
  "filename": "src/providers/fargate.ts",
3502
- "line": 161
4161
+ "line": 197
3503
4162
  },
3504
4163
  "name": "label",
3505
4164
  "overrides": "@cloudsnorkel/cdk-github-runners.IRunnerProvider",
@@ -3515,7 +4174,7 @@
3515
4174
  "immutable": true,
3516
4175
  "locationInModule": {
3517
4176
  "filename": "src/providers/fargate.ts",
3518
- "line": 191
4177
+ "line": 227
3519
4178
  },
3520
4179
  "name": "spot",
3521
4180
  "type": {
@@ -3530,7 +4189,7 @@
3530
4189
  "immutable": true,
3531
4190
  "locationInModule": {
3532
4191
  "filename": "src/providers/fargate.ts",
3533
- "line": 151
4192
+ "line": 187
3534
4193
  },
3535
4194
  "name": "task",
3536
4195
  "type": {
@@ -3545,7 +4204,7 @@
3545
4204
  "immutable": true,
3546
4205
  "locationInModule": {
3547
4206
  "filename": "src/providers/fargate.ts",
3548
- "line": 171
4207
+ "line": 207
3549
4208
  },
3550
4209
  "name": "securityGroup",
3551
4210
  "optional": true,
@@ -3562,7 +4221,7 @@
3562
4221
  "immutable": true,
3563
4222
  "locationInModule": {
3564
4223
  "filename": "src/providers/fargate.ts",
3565
- "line": 166
4224
+ "line": 202
3566
4225
  },
3567
4226
  "name": "vpc",
3568
4227
  "optional": true,
@@ -3588,7 +4247,7 @@
3588
4247
  "kind": "interface",
3589
4248
  "locationInModule": {
3590
4249
  "filename": "src/providers/fargate.ts",
3591
- "line": 18
4250
+ "line": 19
3592
4251
  },
3593
4252
  "name": "FargateRunnerProps",
3594
4253
  "properties": [
@@ -3603,7 +4262,7 @@
3603
4262
  "immutable": true,
3604
4263
  "locationInModule": {
3605
4264
  "filename": "src/providers/fargate.ts",
3606
- "line": 54
4265
+ "line": 72
3607
4266
  },
3608
4267
  "name": "assignPublicIp",
3609
4268
  "optional": true,
@@ -3621,7 +4280,7 @@
3621
4280
  "immutable": true,
3622
4281
  "locationInModule": {
3623
4282
  "filename": "src/providers/fargate.ts",
3624
- "line": 45
4283
+ "line": 63
3625
4284
  },
3626
4285
  "name": "cluster",
3627
4286
  "optional": true,
@@ -3640,7 +4299,7 @@
3640
4299
  "immutable": true,
3641
4300
  "locationInModule": {
3642
4301
  "filename": "src/providers/fargate.ts",
3643
- "line": 73
4302
+ "line": 91
3644
4303
  },
3645
4304
  "name": "cpu",
3646
4305
  "optional": true,
@@ -3659,7 +4318,7 @@
3659
4318
  "immutable": true,
3660
4319
  "locationInModule": {
3661
4320
  "filename": "src/providers/fargate.ts",
3662
- "line": 100
4321
+ "line": 118
3663
4322
  },
3664
4323
  "name": "ephemeralStorageGiB",
3665
4324
  "optional": true,
@@ -3667,6 +4326,25 @@
3667
4326
  "primitive": "number"
3668
4327
  }
3669
4328
  },
4329
+ {
4330
+ "abstract": true,
4331
+ "docs": {
4332
+ "default": "image builder with `FargateRunner.LINUX_X64_DOCKERFILE_PATH` as Dockerfile",
4333
+ "remarks": "A user named `runner` is expected to exist.\n\nThe entry point should start GitHub runner. For example:\n\n```\n#!/bin/bash\nset -e -u -o pipefail\n\n/home/runner/config.sh --unattended --url \"https://${GITHUB_DOMAIN}/${OWNER}/${REPO}\" --token \"${RUNNER_TOKEN}\" --ephemeral --work _work --labels \"${RUNNER_LABEL}\" --disableupdate --name \"${RUNNER_NAME}\"\n/home/runner/run.sh\n```",
4334
+ "stability": "experimental",
4335
+ "summary": "Provider running an image to run inside CodeBuild with GitHub runner pre-configured."
4336
+ },
4337
+ "immutable": true,
4338
+ "locationInModule": {
4339
+ "filename": "src/providers/fargate.ts",
4340
+ "line": 35
4341
+ },
4342
+ "name": "imageBuilder",
4343
+ "optional": true,
4344
+ "type": {
4345
+ "fqn": "@cloudsnorkel/cdk-github-runners.IImageBuilder"
4346
+ }
4347
+ },
3670
4348
  {
3671
4349
  "abstract": true,
3672
4350
  "docs": {
@@ -3677,7 +4355,7 @@
3677
4355
  "immutable": true,
3678
4356
  "locationInModule": {
3679
4357
  "filename": "src/providers/fargate.ts",
3680
- "line": 24
4358
+ "line": 42
3681
4359
  },
3682
4360
  "name": "label",
3683
4361
  "optional": true,
@@ -3696,7 +4374,7 @@
3696
4374
  "immutable": true,
3697
4375
  "locationInModule": {
3698
4376
  "filename": "src/providers/fargate.ts",
3699
- "line": 91
4377
+ "line": 109
3700
4378
  },
3701
4379
  "name": "memoryLimitMiB",
3702
4380
  "optional": true,
@@ -3714,7 +4392,7 @@
3714
4392
  "immutable": true,
3715
4393
  "locationInModule": {
3716
4394
  "filename": "src/providers/fargate.ts",
3717
- "line": 38
4395
+ "line": 56
3718
4396
  },
3719
4397
  "name": "securityGroup",
3720
4398
  "optional": true,
@@ -3733,7 +4411,7 @@
3733
4411
  "immutable": true,
3734
4412
  "locationInModule": {
3735
4413
  "filename": "src/providers/fargate.ts",
3736
- "line": 110
4414
+ "line": 128
3737
4415
  },
3738
4416
  "name": "spot",
3739
4417
  "optional": true,
@@ -3751,7 +4429,7 @@
3751
4429
  "immutable": true,
3752
4430
  "locationInModule": {
3753
4431
  "filename": "src/providers/fargate.ts",
3754
- "line": 31
4432
+ "line": 49
3755
4433
  },
3756
4434
  "name": "vpc",
3757
4435
  "optional": true,
@@ -3766,7 +4444,7 @@
3766
4444
  "assembly": "@cloudsnorkel/cdk-github-runners",
3767
4445
  "base": "constructs.Construct",
3768
4446
  "docs": {
3769
- "remarks": "It creates a webhook, secrets, and a step function to orchestrate all runs. Secrets are not automatically filled. See README.md for instructions on how to setup GitHub integration.\n\nBy default, this will create a runner provider of each available type with the defaults. This is good enough for the initial setup stage when you just want to get GitHub integration working.\n\n```typescript\nnew GitHubRunners(stack, 'runners', {});\n```\n\nUsually you'd want to configure the runner providers so the runners can run in a certain VPC or have certain permissions.\n\n```typescript\nconst vpc = ec2.Vpc.fromLookup(stack, 'vpc', { vpcId: 'vpc-1234567' });\nconst runnerSg = new ec2.SecurityGroup(stack, 'runner security group', { vpc: vpc });\nconst dbSg = ec2.SecurityGroup.fromSecurityGroupId(stack, 'database security group', 'sg-1234567');\nconst bucket = new s3.Bucket(stack, 'runner bucket');\n\n// create a custom CodeBuild provider\nconst myProvider = new CodeBuildRunner(\n stack, 'codebuild runner',\n {\n label: 'my-codebuild',\n vpc: vpc,\n securityGroup: runnerSg,\n },\n);\n// grant some permissions to the provider\nbucket.grantReadWrite(myProvider);\ndbSg.connections.allowFrom(runnerSg, ec2.Port.tcp(3306), 'allow runners to connect to MySQL database');\n\n// create the runner infrastructure\nnew GitHubRunners(\n stack,\n 'runners',\n {\n providers: [myProvider],\n }\n);\n```",
4447
+ "remarks": "It creates a webhook, secrets, and a step function to orchestrate all runs. Secrets are not automatically filled. See README.md for instructions on how to setup GitHub integration.\n\nBy default, this will create a runner provider of each available type with the defaults. This is good enough for the initial setup stage when you just want to get GitHub integration working.\n\n```typescript\nnew GitHubRunners(this, 'runners');\n```\n\nUsually you'd want to configure the runner providers so the runners can run in a certain VPC or have certain permissions.\n\n```typescript\nconst vpc = ec2.Vpc.fromLookup(this, 'vpc', { vpcId: 'vpc-1234567' });\nconst runnerSg = new ec2.SecurityGroup(this, 'runner security group', { vpc: vpc });\nconst dbSg = ec2.SecurityGroup.fromSecurityGroupId(this, 'database security group', 'sg-1234567');\nconst bucket = new s3.Bucket(this, 'runner bucket');\n\n// create a custom CodeBuild provider\nconst myProvider = new CodeBuildRunner(\n this, 'codebuild runner',\n {\n label: 'my-codebuild',\n vpc: vpc,\n securityGroup: runnerSg,\n },\n);\n// grant some permissions to the provider\nbucket.grantReadWrite(myProvider);\ndbSg.connections.allowFrom(runnerSg, ec2.Port.tcp(3306), 'allow runners to connect to MySQL database');\n\n// create the runner infrastructure\nnew GitHubRunners(\n this,\n 'runners',\n {\n providers: [myProvider],\n }\n);\n```",
3770
4448
  "stability": "experimental",
3771
4449
  "summary": "Create all the required infrastructure to provide self-hosted GitHub runners."
3772
4450
  },
@@ -3777,7 +4455,7 @@
3777
4455
  },
3778
4456
  "locationInModule": {
3779
4457
  "filename": "src/runner.ts",
3780
- "line": 81
4458
+ "line": 140
3781
4459
  },
3782
4460
  "parameters": [
3783
4461
  {
@@ -3794,112 +4472,227 @@
3794
4472
  },
3795
4473
  {
3796
4474
  "name": "props",
4475
+ "optional": true,
3797
4476
  "type": {
3798
4477
  "fqn": "@cloudsnorkel/cdk-github-runners.GitHubRunnersProps"
3799
4478
  }
3800
4479
  }
3801
- ]
3802
- },
3803
- "kind": "class",
3804
- "locationInModule": {
3805
- "filename": "src/runner.ts",
3806
- "line": 65
3807
- },
3808
- "name": "GitHubRunners",
3809
- "properties": [
4480
+ ]
4481
+ },
4482
+ "kind": "class",
4483
+ "locationInModule": {
4484
+ "filename": "src/runner.ts",
4485
+ "line": 120
4486
+ },
4487
+ "name": "GitHubRunners",
4488
+ "properties": [
4489
+ {
4490
+ "docs": {
4491
+ "stability": "experimental",
4492
+ "summary": "Configured runner providers."
4493
+ },
4494
+ "immutable": true,
4495
+ "locationInModule": {
4496
+ "filename": "src/runner.ts",
4497
+ "line": 127
4498
+ },
4499
+ "name": "providers",
4500
+ "type": {
4501
+ "collection": {
4502
+ "elementtype": {
4503
+ "fqn": "@cloudsnorkel/cdk-github-runners.IRunnerProvider"
4504
+ },
4505
+ "kind": "array"
4506
+ }
4507
+ }
4508
+ },
4509
+ {
4510
+ "docs": {
4511
+ "stability": "experimental",
4512
+ "summary": "Secrets for GitHub communication including webhook secret and runner authentication."
4513
+ },
4514
+ "immutable": true,
4515
+ "locationInModule": {
4516
+ "filename": "src/runner.ts",
4517
+ "line": 132
4518
+ },
4519
+ "name": "secrets",
4520
+ "type": {
4521
+ "fqn": "@cloudsnorkel/cdk-github-runners.Secrets"
4522
+ }
4523
+ }
4524
+ ],
4525
+ "symbolId": "src/runner:GitHubRunners"
4526
+ },
4527
+ "@cloudsnorkel/cdk-github-runners.GitHubRunnersProps": {
4528
+ "assembly": "@cloudsnorkel/cdk-github-runners",
4529
+ "datatype": true,
4530
+ "docs": {
4531
+ "stability": "experimental",
4532
+ "summary": "Properties for GitHubRunners."
4533
+ },
4534
+ "fqn": "@cloudsnorkel/cdk-github-runners.GitHubRunnersProps",
4535
+ "kind": "interface",
4536
+ "locationInModule": {
4537
+ "filename": "src/runner.ts",
4538
+ "line": 22
4539
+ },
4540
+ "name": "GitHubRunnersProps",
4541
+ "properties": [
4542
+ {
4543
+ "abstract": true,
4544
+ "docs": {
4545
+ "default": "false",
4546
+ "remarks": "Lambda Functions in a public subnet can NOT access the internet.",
4547
+ "stability": "experimental",
4548
+ "summary": "Allow management functions to run in public subnets."
4549
+ },
4550
+ "immutable": true,
4551
+ "locationInModule": {
4552
+ "filename": "src/runner.ts",
4553
+ "line": 45
4554
+ },
4555
+ "name": "allowPublicSubnet",
4556
+ "optional": true,
4557
+ "type": {
4558
+ "primitive": "boolean"
4559
+ }
4560
+ },
4561
+ {
4562
+ "abstract": true,
4563
+ "docs": {
4564
+ "remarks": "You may also want to use custom images for your runner providers that contain the same certificates. See {@link CodeBuildImageBuilder.addCertificates}.\n\n```typescript\nconst imageBuilder = new CodeBuildImageBuilder(this, 'Image Builder with Certs', {\n dockerfilePath: CodeBuildRunner.LINUX_X64_DOCKERFILE_PATH,\n});\nimageBuilder.addExtraCertificates('path-to-my-extra-certs-folder');\n\nconst provider = new CodeBuildRunner(this, 'CodeBuild', {\n imageBuilder: imageBuilder,\n});\n\nnew GitHubRunners(\n this,\n 'runners',\n {\n providers: [provider],\n extraCertificates: 'path-to-my-extra-certs-folder',\n }\n);\n```",
4565
+ "stability": "experimental",
4566
+ "summary": "Path to a directory containing a file named certs.pem containing any additional certificates required to trust GitHub Enterprise Server. Use this when GitHub Enterprise Server certificates are self-signed."
4567
+ },
4568
+ "immutable": true,
4569
+ "locationInModule": {
4570
+ "filename": "src/runner.ts",
4571
+ "line": 77
4572
+ },
4573
+ "name": "extraCertificates",
4574
+ "optional": true,
4575
+ "type": {
4576
+ "primitive": "string"
4577
+ }
4578
+ },
4579
+ {
4580
+ "abstract": true,
4581
+ "docs": {
4582
+ "default": "CodeBuild, Lambda and Fargate runners with all the defaults (no VPC or default account VPC)",
4583
+ "remarks": "At least one provider is required. Provider will be selected when its label matches the labels requested by the workflow job.",
4584
+ "stability": "experimental",
4585
+ "summary": "List of runner providers to use."
4586
+ },
4587
+ "immutable": true,
4588
+ "locationInModule": {
4589
+ "filename": "src/runner.ts",
4590
+ "line": 28
4591
+ },
4592
+ "name": "providers",
4593
+ "optional": true,
4594
+ "type": {
4595
+ "collection": {
4596
+ "elementtype": {
4597
+ "fqn": "@cloudsnorkel/cdk-github-runners.IRunnerProvider"
4598
+ },
4599
+ "kind": "array"
4600
+ }
4601
+ }
4602
+ },
3810
4603
  {
4604
+ "abstract": true,
3811
4605
  "docs": {
3812
- "stability": "experimental"
4606
+ "remarks": "Use this with to provide access to GitHub Enterprise Server hosted inside a VPC.",
4607
+ "stability": "experimental",
4608
+ "summary": "Security group attached to all management functions."
3813
4609
  },
3814
4610
  "immutable": true,
3815
4611
  "locationInModule": {
3816
4612
  "filename": "src/runner.ts",
3817
- "line": 81
4613
+ "line": 50
3818
4614
  },
3819
- "name": "props",
4615
+ "name": "securityGroup",
4616
+ "optional": true,
3820
4617
  "type": {
3821
- "fqn": "@cloudsnorkel/cdk-github-runners.GitHubRunnersProps"
4618
+ "fqn": "aws-cdk-lib.aws_ec2.ISecurityGroup"
3822
4619
  }
3823
4620
  },
3824
4621
  {
4622
+ "abstract": true,
3825
4623
  "docs": {
4624
+ "remarks": "Use this with GitHub Enterprise Server hosted that's inaccessible from outside the VPC.",
3826
4625
  "stability": "experimental",
3827
- "summary": "Configured runner providers."
4626
+ "summary": "VPC used for all management functions."
3828
4627
  },
3829
4628
  "immutable": true,
3830
4629
  "locationInModule": {
3831
4630
  "filename": "src/runner.ts",
3832
- "line": 70
4631
+ "line": 33
3833
4632
  },
3834
- "name": "providers",
4633
+ "name": "vpc",
4634
+ "optional": true,
3835
4635
  "type": {
3836
- "collection": {
3837
- "elementtype": {
3838
- "fqn": "@cloudsnorkel/cdk-github-runners.IRunnerProvider"
3839
- },
3840
- "kind": "array"
3841
- }
4636
+ "fqn": "aws-cdk-lib.aws_ec2.IVpc"
3842
4637
  }
3843
4638
  },
3844
4639
  {
4640
+ "abstract": true,
3845
4641
  "docs": {
4642
+ "remarks": "Use this with GitHub Enterprise Server hosted that's inaccessible from outside the VPC.",
3846
4643
  "stability": "experimental",
3847
- "summary": "Secrets for GitHub communication including webhook secret and runner authentication."
4644
+ "summary": "VPC subnets used for all management functions."
3848
4645
  },
3849
4646
  "immutable": true,
3850
4647
  "locationInModule": {
3851
4648
  "filename": "src/runner.ts",
3852
- "line": 75
4649
+ "line": 38
3853
4650
  },
3854
- "name": "secrets",
4651
+ "name": "vpcSubnets",
4652
+ "optional": true,
3855
4653
  "type": {
3856
- "fqn": "@cloudsnorkel/cdk-github-runners.Secrets"
4654
+ "fqn": "aws-cdk-lib.aws_ec2.SubnetSelection"
3857
4655
  }
3858
4656
  }
3859
4657
  ],
3860
- "symbolId": "src/runner:GitHubRunners"
4658
+ "symbolId": "src/runner:GitHubRunnersProps"
3861
4659
  },
3862
- "@cloudsnorkel/cdk-github-runners.GitHubRunnersProps": {
4660
+ "@cloudsnorkel/cdk-github-runners.IImageBuilder": {
3863
4661
  "assembly": "@cloudsnorkel/cdk-github-runners",
3864
- "datatype": true,
3865
4662
  "docs": {
4663
+ "remarks": "Anything that ends up with an ECR repository containing a Docker image that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing image and nothing else.\n\nIt's important that the specified image tag be available at the time the repository is available. Providers usually assume the image is ready and will fail if it's not.\n\nThe image can be further updated over time manually or using a schedule as long as it is always written to the same tag.",
3866
4664
  "stability": "experimental",
3867
- "summary": "Properties for GitHubRunners."
4665
+ "summary": "Interface for constructs that build an image that can be used in {@link IRunnerProvider}."
3868
4666
  },
3869
- "fqn": "@cloudsnorkel/cdk-github-runners.GitHubRunnersProps",
4667
+ "fqn": "@cloudsnorkel/cdk-github-runners.IImageBuilder",
3870
4668
  "kind": "interface",
3871
4669
  "locationInModule": {
3872
- "filename": "src/runner.ts",
3873
- "line": 16
4670
+ "filename": "src/providers/common.ts",
4671
+ "line": 129
3874
4672
  },
3875
- "name": "GitHubRunnersProps",
3876
- "properties": [
4673
+ "methods": [
3877
4674
  {
3878
4675
  "abstract": true,
3879
4676
  "docs": {
3880
- "default": "CodeBuild, Lambda and Fargate runners with all the defaults (no VPC or default account VPC)",
3881
- "remarks": "At least one provider is required. Provider will be selected when its label matches the labels requested by the workflow job.",
4677
+ "remarks": "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.",
4678
+ "returns": "image",
3882
4679
  "stability": "experimental",
3883
- "summary": "List of runner providers to use."
4680
+ "summary": "ECR repository containing the image."
3884
4681
  },
3885
- "immutable": true,
3886
4682
  "locationInModule": {
3887
- "filename": "src/runner.ts",
3888
- "line": 22
4683
+ "filename": "src/providers/common.ts",
4684
+ "line": 137
3889
4685
  },
3890
- "name": "providers",
3891
- "optional": true,
3892
- "type": {
3893
- "collection": {
3894
- "elementtype": {
3895
- "fqn": "@cloudsnorkel/cdk-github-runners.IRunnerProvider"
3896
- },
3897
- "kind": "array"
4686
+ "name": "bind",
4687
+ "returns": {
4688
+ "type": {
4689
+ "fqn": "@cloudsnorkel/cdk-github-runners.RunnerImage"
3898
4690
  }
3899
4691
  }
3900
4692
  }
3901
4693
  ],
3902
- "symbolId": "src/runner:GitHubRunnersProps"
4694
+ "name": "IImageBuilder",
4695
+ "symbolId": "src/providers/common:IImageBuilder"
3903
4696
  },
3904
4697
  "@cloudsnorkel/cdk-github-runners.IRunnerProvider": {
3905
4698
  "assembly": "@cloudsnorkel/cdk-github-runners",
@@ -3916,7 +4709,7 @@
3916
4709
  "kind": "interface",
3917
4710
  "locationInModule": {
3918
4711
  "filename": "src/providers/common.ts",
3919
- "line": 89
4712
+ "line": 193
3920
4713
  },
3921
4714
  "methods": [
3922
4715
  {
@@ -3928,7 +4721,7 @@
3928
4721
  },
3929
4722
  "locationInModule": {
3930
4723
  "filename": "src/providers/common.ts",
3931
- "line": 112
4724
+ "line": 216
3932
4725
  },
3933
4726
  "name": "getStepFunctionTask",
3934
4727
  "parameters": [
@@ -3960,7 +4753,7 @@
3960
4753
  "immutable": true,
3961
4754
  "locationInModule": {
3962
4755
  "filename": "src/providers/common.ts",
3963
- "line": 93
4756
+ "line": 197
3964
4757
  },
3965
4758
  "name": "label",
3966
4759
  "type": {
@@ -3976,7 +4769,7 @@
3976
4769
  "immutable": true,
3977
4770
  "locationInModule": {
3978
4771
  "filename": "src/providers/common.ts",
3979
- "line": 103
4772
+ "line": 207
3980
4773
  },
3981
4774
  "name": "securityGroup",
3982
4775
  "optional": true,
@@ -3993,7 +4786,7 @@
3993
4786
  "immutable": true,
3994
4787
  "locationInModule": {
3995
4788
  "filename": "src/providers/common.ts",
3996
- "line": 98
4789
+ "line": 202
3997
4790
  },
3998
4791
  "name": "vpc",
3999
4792
  "optional": true,
@@ -4019,7 +4812,7 @@
4019
4812
  },
4020
4813
  "locationInModule": {
4021
4814
  "filename": "src/providers/lambda.ts",
4022
- "line": 103
4815
+ "line": 135
4023
4816
  },
4024
4817
  "parameters": [
4025
4818
  {
@@ -4048,7 +4841,7 @@
4048
4841
  "kind": "class",
4049
4842
  "locationInModule": {
4050
4843
  "filename": "src/providers/lambda.ts",
4051
- "line": 77
4844
+ "line": 91
4052
4845
  },
4053
4846
  "methods": [
4054
4847
  {
@@ -4059,7 +4852,7 @@
4059
4852
  },
4060
4853
  "locationInModule": {
4061
4854
  "filename": "src/providers/lambda.ts",
4062
- "line": 150
4855
+ "line": 198
4063
4856
  },
4064
4857
  "name": "getStepFunctionTask",
4065
4858
  "overrides": "@cloudsnorkel/cdk-github-runners.IRunnerProvider",
@@ -4083,6 +4876,42 @@
4083
4876
  ],
4084
4877
  "name": "LambdaRunner",
4085
4878
  "properties": [
4879
+ {
4880
+ "const": true,
4881
+ "docs": {
4882
+ "remarks": "Use this Dockerfile unless you need to customize it further than allowed by hooks.\n\nAvailable build arguments that can be set in the image builder:\n* `BASE_IMAGE` sets the `FROM` line. This should be similar to public.ecr.aws/lambda/nodejs:14.\n* `EXTRA_PACKAGES` can be used to install additional packages.",
4883
+ "stability": "experimental",
4884
+ "summary": "Path to Dockerfile for Linux ARM64 with all the requirement for Lambda runner."
4885
+ },
4886
+ "immutable": true,
4887
+ "locationInModule": {
4888
+ "filename": "src/providers/lambda.ts",
4889
+ "line": 108
4890
+ },
4891
+ "name": "LINUX_ARM64_DOCKERFILE_PATH",
4892
+ "static": true,
4893
+ "type": {
4894
+ "primitive": "string"
4895
+ }
4896
+ },
4897
+ {
4898
+ "const": true,
4899
+ "docs": {
4900
+ "remarks": "Use this Dockerfile unless you need to customize it further than allowed by hooks.\n\nAvailable build arguments that can be set in the image builder:\n* `BASE_IMAGE` sets the `FROM` line. This should be similar to public.ecr.aws/lambda/nodejs:14.\n* `EXTRA_PACKAGES` can be used to install additional packages.",
4901
+ "stability": "experimental",
4902
+ "summary": "Path to Dockerfile for Linux x64 with all the requirement for Lambda runner."
4903
+ },
4904
+ "immutable": true,
4905
+ "locationInModule": {
4906
+ "filename": "src/providers/lambda.ts",
4907
+ "line": 99
4908
+ },
4909
+ "name": "LINUX_X64_DOCKERFILE_PATH",
4910
+ "static": true,
4911
+ "type": {
4912
+ "primitive": "string"
4913
+ }
4914
+ },
4086
4915
  {
4087
4916
  "docs": {
4088
4917
  "stability": "experimental",
@@ -4091,7 +4920,7 @@
4091
4920
  "immutable": true,
4092
4921
  "locationInModule": {
4093
4922
  "filename": "src/providers/lambda.ts",
4094
- "line": 139
4923
+ "line": 187
4095
4924
  },
4096
4925
  "name": "connections",
4097
4926
  "overrides": "aws-cdk-lib.aws_ec2.IConnectable",
@@ -4107,7 +4936,7 @@
4107
4936
  "immutable": true,
4108
4937
  "locationInModule": {
4109
4938
  "filename": "src/providers/lambda.ts",
4110
- "line": 81
4939
+ "line": 113
4111
4940
  },
4112
4941
  "name": "function",
4113
4942
  "type": {
@@ -4122,7 +4951,7 @@
4122
4951
  "immutable": true,
4123
4952
  "locationInModule": {
4124
4953
  "filename": "src/providers/lambda.ts",
4125
- "line": 101
4954
+ "line": 133
4126
4955
  },
4127
4956
  "name": "grantPrincipal",
4128
4957
  "overrides": "aws-cdk-lib.aws_iam.IGrantable",
@@ -4138,7 +4967,7 @@
4138
4967
  "immutable": true,
4139
4968
  "locationInModule": {
4140
4969
  "filename": "src/providers/lambda.ts",
4141
- "line": 86
4970
+ "line": 118
4142
4971
  },
4143
4972
  "name": "label",
4144
4973
  "overrides": "@cloudsnorkel/cdk-github-runners.IRunnerProvider",
@@ -4154,182 +4983,394 @@
4154
4983
  "immutable": true,
4155
4984
  "locationInModule": {
4156
4985
  "filename": "src/providers/lambda.ts",
4157
- "line": 96
4986
+ "line": 128
4987
+ },
4988
+ "name": "securityGroup",
4989
+ "optional": true,
4990
+ "overrides": "@cloudsnorkel/cdk-github-runners.IRunnerProvider",
4991
+ "type": {
4992
+ "fqn": "aws-cdk-lib.aws_ec2.ISecurityGroup"
4993
+ }
4994
+ },
4995
+ {
4996
+ "docs": {
4997
+ "stability": "experimental",
4998
+ "summary": "VPC used for hosting the function."
4999
+ },
5000
+ "immutable": true,
5001
+ "locationInModule": {
5002
+ "filename": "src/providers/lambda.ts",
5003
+ "line": 123
5004
+ },
5005
+ "name": "vpc",
5006
+ "optional": true,
5007
+ "overrides": "@cloudsnorkel/cdk-github-runners.IRunnerProvider",
5008
+ "type": {
5009
+ "fqn": "aws-cdk-lib.aws_ec2.IVpc"
5010
+ }
5011
+ }
5012
+ ],
5013
+ "symbolId": "src/providers/lambda:LambdaRunner"
5014
+ },
5015
+ "@cloudsnorkel/cdk-github-runners.LambdaRunnerProps": {
5016
+ "assembly": "@cloudsnorkel/cdk-github-runners",
5017
+ "datatype": true,
5018
+ "docs": {
5019
+ "stability": "experimental"
5020
+ },
5021
+ "fqn": "@cloudsnorkel/cdk-github-runners.LambdaRunnerProps",
5022
+ "interfaces": [
5023
+ "@cloudsnorkel/cdk-github-runners.RunnerProviderProps"
5024
+ ],
5025
+ "kind": "interface",
5026
+ "locationInModule": {
5027
+ "filename": "src/providers/lambda.ts",
5028
+ "line": 18
5029
+ },
5030
+ "name": "LambdaRunnerProps",
5031
+ "properties": [
5032
+ {
5033
+ "abstract": true,
5034
+ "docs": {
5035
+ "default": "10 GiB",
5036
+ "stability": "experimental",
5037
+ "summary": "The size of the function’s /tmp directory in MiB."
5038
+ },
5039
+ "immutable": true,
5040
+ "locationInModule": {
5041
+ "filename": "src/providers/lambda.ts",
5042
+ "line": 51
5043
+ },
5044
+ "name": "ephemeralStorageSize",
5045
+ "optional": true,
5046
+ "type": {
5047
+ "fqn": "aws-cdk-lib.Size"
5048
+ }
5049
+ },
5050
+ {
5051
+ "abstract": true,
5052
+ "docs": {
5053
+ "default": "image builder with LambdaRunner.LINUX_X64_DOCKERFILE_PATH as Dockerfile",
5054
+ "remarks": "The default command (`CMD`) should be `[\"runner.handler\"]` which points to an included `runner.js` with a function named `handler`. The function should start the GitHub runner.",
5055
+ "see": "https://github.com/CloudSnorkel/cdk-github-runners/tree/main/src/providers/docker-images/lambda",
5056
+ "stability": "experimental",
5057
+ "summary": "Provider running an image to run inside CodeBuild with GitHub runner pre-configured."
5058
+ },
5059
+ "immutable": true,
5060
+ "locationInModule": {
5061
+ "filename": "src/providers/lambda.ts",
5062
+ "line": 27
5063
+ },
5064
+ "name": "imageBuilder",
5065
+ "optional": true,
5066
+ "type": {
5067
+ "fqn": "@cloudsnorkel/cdk-github-runners.IImageBuilder"
5068
+ }
5069
+ },
5070
+ {
5071
+ "abstract": true,
5072
+ "docs": {
5073
+ "default": "'lambda'",
5074
+ "stability": "experimental",
5075
+ "summary": "GitHub Actions label used for this provider."
5076
+ },
5077
+ "immutable": true,
5078
+ "locationInModule": {
5079
+ "filename": "src/providers/lambda.ts",
5080
+ "line": 34
5081
+ },
5082
+ "name": "label",
5083
+ "optional": true,
5084
+ "type": {
5085
+ "primitive": "string"
5086
+ }
5087
+ },
5088
+ {
5089
+ "abstract": true,
5090
+ "docs": {
5091
+ "default": "2048",
5092
+ "remarks": "Lambda uses this value to proportionally allocate the amount of CPU\npower. For more information, see Resource Model in the AWS Lambda\nDeveloper Guide.",
5093
+ "stability": "experimental",
5094
+ "summary": "The amount of memory, in MB, that is allocated to your Lambda function."
5095
+ },
5096
+ "immutable": true,
5097
+ "locationInModule": {
5098
+ "filename": "src/providers/lambda.ts",
5099
+ "line": 44
5100
+ },
5101
+ "name": "memorySize",
5102
+ "optional": true,
5103
+ "type": {
5104
+ "primitive": "number"
5105
+ }
5106
+ },
5107
+ {
5108
+ "abstract": true,
5109
+ "docs": {
5110
+ "default": "public lambda with no security group",
5111
+ "stability": "experimental",
5112
+ "summary": "Security Group to assign to this instance."
5113
+ },
5114
+ "immutable": true,
5115
+ "locationInModule": {
5116
+ "filename": "src/providers/lambda.ts",
5117
+ "line": 74
4158
5118
  },
4159
5119
  "name": "securityGroup",
4160
5120
  "optional": true,
4161
- "overrides": "@cloudsnorkel/cdk-github-runners.IRunnerProvider",
4162
5121
  "type": {
4163
- "fqn": "aws-cdk-lib.aws_ec2.ISecurityGroup"
5122
+ "fqn": "aws-cdk-lib.aws_ec2.ISecurityGroup"
5123
+ }
5124
+ },
5125
+ {
5126
+ "abstract": true,
5127
+ "docs": {
5128
+ "default": "no subnet",
5129
+ "stability": "experimental",
5130
+ "summary": "Where to place the network interfaces within the VPC."
5131
+ },
5132
+ "immutable": true,
5133
+ "locationInModule": {
5134
+ "filename": "src/providers/lambda.ts",
5135
+ "line": 81
5136
+ },
5137
+ "name": "subnetSelection",
5138
+ "optional": true,
5139
+ "type": {
5140
+ "fqn": "aws-cdk-lib.aws_ec2.SubnetSelection"
5141
+ }
5142
+ },
5143
+ {
5144
+ "abstract": true,
5145
+ "docs": {
5146
+ "default": "Duration.minutes(15)",
5147
+ "remarks": "Because the execution time affects cost, set this value\nbased on the function's expected execution time.",
5148
+ "stability": "experimental",
5149
+ "summary": "The function execution time (in seconds) after which Lambda terminates the function."
5150
+ },
5151
+ "immutable": true,
5152
+ "locationInModule": {
5153
+ "filename": "src/providers/lambda.ts",
5154
+ "line": 60
5155
+ },
5156
+ "name": "timeout",
5157
+ "optional": true,
5158
+ "type": {
5159
+ "fqn": "aws-cdk-lib.Duration"
4164
5160
  }
4165
5161
  },
4166
5162
  {
5163
+ "abstract": true,
4167
5164
  "docs": {
5165
+ "default": "no VPC",
4168
5166
  "stability": "experimental",
4169
- "summary": "VPC used for hosting the function."
5167
+ "summary": "VPC to launch the runners in."
4170
5168
  },
4171
5169
  "immutable": true,
4172
5170
  "locationInModule": {
4173
5171
  "filename": "src/providers/lambda.ts",
4174
- "line": 91
5172
+ "line": 67
4175
5173
  },
4176
5174
  "name": "vpc",
4177
5175
  "optional": true,
4178
- "overrides": "@cloudsnorkel/cdk-github-runners.IRunnerProvider",
4179
5176
  "type": {
4180
5177
  "fqn": "aws-cdk-lib.aws_ec2.IVpc"
4181
5178
  }
4182
5179
  }
4183
5180
  ],
4184
- "symbolId": "src/providers/lambda:LambdaRunner"
5181
+ "symbolId": "src/providers/lambda:LambdaRunnerProps"
4185
5182
  },
4186
- "@cloudsnorkel/cdk-github-runners.LambdaRunnerProps": {
5183
+ "@cloudsnorkel/cdk-github-runners.Os": {
4187
5184
  "assembly": "@cloudsnorkel/cdk-github-runners",
4188
- "datatype": true,
4189
5185
  "docs": {
4190
- "stability": "experimental"
5186
+ "stability": "experimental",
5187
+ "summary": "OS enum for an image."
4191
5188
  },
4192
- "fqn": "@cloudsnorkel/cdk-github-runners.LambdaRunnerProps",
4193
- "interfaces": [
4194
- "@cloudsnorkel/cdk-github-runners.RunnerProviderProps"
4195
- ],
4196
- "kind": "interface",
5189
+ "fqn": "@cloudsnorkel/cdk-github-runners.Os",
5190
+ "kind": "class",
4197
5191
  "locationInModule": {
4198
- "filename": "src/providers/lambda.ts",
4199
- "line": 14
5192
+ "filename": "src/providers/common.ts",
5193
+ "line": 63
4200
5194
  },
4201
- "name": "LambdaRunnerProps",
5195
+ "methods": [
5196
+ {
5197
+ "docs": {
5198
+ "stability": "experimental",
5199
+ "summary": "Checks if the given OS is the same as this one."
5200
+ },
5201
+ "locationInModule": {
5202
+ "filename": "src/providers/common.ts",
5203
+ "line": 86
5204
+ },
5205
+ "name": "is",
5206
+ "parameters": [
5207
+ {
5208
+ "docs": {
5209
+ "summary": "OS to compare."
5210
+ },
5211
+ "name": "os",
5212
+ "type": {
5213
+ "fqn": "@cloudsnorkel/cdk-github-runners.Os"
5214
+ }
5215
+ }
5216
+ ],
5217
+ "returns": {
5218
+ "type": {
5219
+ "primitive": "boolean"
5220
+ }
5221
+ }
5222
+ }
5223
+ ],
5224
+ "name": "Os",
4202
5225
  "properties": [
4203
5226
  {
4204
- "abstract": true,
5227
+ "const": true,
4205
5228
  "docs": {
4206
- "default": "10 GiB",
4207
5229
  "stability": "experimental",
4208
- "summary": "The size of the function’s /tmp directory in MiB."
5230
+ "summary": "Linux."
4209
5231
  },
4210
5232
  "immutable": true,
4211
5233
  "locationInModule": {
4212
- "filename": "src/providers/lambda.ts",
4213
- "line": 37
5234
+ "filename": "src/providers/common.ts",
5235
+ "line": 67
4214
5236
  },
4215
- "name": "ephemeralStorageSize",
4216
- "optional": true,
5237
+ "name": "LINUX",
5238
+ "static": true,
4217
5239
  "type": {
4218
- "fqn": "aws-cdk-lib.Size"
5240
+ "fqn": "@cloudsnorkel/cdk-github-runners.Os"
4219
5241
  }
4220
5242
  },
4221
5243
  {
4222
- "abstract": true,
5244
+ "const": true,
4223
5245
  "docs": {
4224
- "default": "'lambda'",
4225
5246
  "stability": "experimental",
4226
- "summary": "GitHub Actions label used for this provider."
5247
+ "summary": "Windows."
4227
5248
  },
4228
5249
  "immutable": true,
4229
5250
  "locationInModule": {
4230
- "filename": "src/providers/lambda.ts",
4231
- "line": 20
5251
+ "filename": "src/providers/common.ts",
5252
+ "line": 72
4232
5253
  },
4233
- "name": "label",
4234
- "optional": true,
5254
+ "name": "WINDOWS",
5255
+ "static": true,
4235
5256
  "type": {
4236
- "primitive": "string"
5257
+ "fqn": "@cloudsnorkel/cdk-github-runners.Os"
4237
5258
  }
4238
5259
  },
5260
+ {
5261
+ "docs": {
5262
+ "stability": "experimental"
5263
+ },
5264
+ "immutable": true,
5265
+ "locationInModule": {
5266
+ "filename": "src/providers/common.ts",
5267
+ "line": 78
5268
+ },
5269
+ "name": "name",
5270
+ "type": {
5271
+ "primitive": "string"
5272
+ }
5273
+ }
5274
+ ],
5275
+ "symbolId": "src/providers/common:Os"
5276
+ },
5277
+ "@cloudsnorkel/cdk-github-runners.RunnerImage": {
5278
+ "assembly": "@cloudsnorkel/cdk-github-runners",
5279
+ "datatype": true,
5280
+ "docs": {
5281
+ "stability": "experimental"
5282
+ },
5283
+ "fqn": "@cloudsnorkel/cdk-github-runners.RunnerImage",
5284
+ "kind": "interface",
5285
+ "locationInModule": {
5286
+ "filename": "src/providers/common.ts",
5287
+ "line": 91
5288
+ },
5289
+ "name": "RunnerImage",
5290
+ "properties": [
4239
5291
  {
4240
5292
  "abstract": true,
4241
5293
  "docs": {
4242
- "default": "2048",
4243
- "remarks": "Lambda uses this value to proportionally allocate the amount of CPU\npower. For more information, see Resource Model in the AWS Lambda\nDeveloper Guide.",
4244
5294
  "stability": "experimental",
4245
- "summary": "The amount of memory, in MB, that is allocated to your Lambda function."
5295
+ "summary": "Architecture of the image."
4246
5296
  },
4247
5297
  "immutable": true,
4248
5298
  "locationInModule": {
4249
- "filename": "src/providers/lambda.ts",
4250
- "line": 30
5299
+ "filename": "src/providers/common.ts",
5300
+ "line": 112
4251
5301
  },
4252
- "name": "memorySize",
4253
- "optional": true,
5302
+ "name": "architecture",
4254
5303
  "type": {
4255
- "primitive": "number"
5304
+ "fqn": "@cloudsnorkel/cdk-github-runners.Architecture"
4256
5305
  }
4257
5306
  },
4258
5307
  {
4259
5308
  "abstract": true,
4260
5309
  "docs": {
4261
- "default": "public lambda with no security group",
5310
+ "remarks": "WARNING: the digest might change when the builder automatically rebuilds the image on a schedule. Do not expect for this digest to stay the same between deploys.",
4262
5311
  "stability": "experimental",
4263
- "summary": "Security Group to assign to this instance."
5312
+ "summary": "Image digest for providers that need to know the digest like Lambda."
4264
5313
  },
4265
5314
  "immutable": true,
4266
5315
  "locationInModule": {
4267
- "filename": "src/providers/lambda.ts",
4268
- "line": 60
5316
+ "filename": "src/providers/common.ts",
5317
+ "line": 107
4269
5318
  },
4270
- "name": "securityGroup",
4271
- "optional": true,
5319
+ "name": "imageDigest",
4272
5320
  "type": {
4273
- "fqn": "aws-cdk-lib.aws_ec2.ISecurityGroup"
5321
+ "primitive": "string"
4274
5322
  }
4275
5323
  },
4276
5324
  {
4277
5325
  "abstract": true,
4278
5326
  "docs": {
4279
- "default": "no subnet",
4280
5327
  "stability": "experimental",
4281
- "summary": "Where to place the network interfaces within the VPC."
5328
+ "summary": "ECR repository containing the image."
4282
5329
  },
4283
5330
  "immutable": true,
4284
5331
  "locationInModule": {
4285
- "filename": "src/providers/lambda.ts",
4286
- "line": 67
5332
+ "filename": "src/providers/common.ts",
5333
+ "line": 95
4287
5334
  },
4288
- "name": "subnetSelection",
4289
- "optional": true,
5335
+ "name": "imageRepository",
4290
5336
  "type": {
4291
- "fqn": "aws-cdk-lib.aws_ec2.SubnetSelection"
5337
+ "fqn": "aws-cdk-lib.aws_ecr.IRepository"
4292
5338
  }
4293
5339
  },
4294
5340
  {
4295
5341
  "abstract": true,
4296
5342
  "docs": {
4297
- "default": "Duration.minutes(15)",
4298
- "remarks": "Because the execution time affects cost, set this value\nbased on the function's expected execution time.",
4299
5343
  "stability": "experimental",
4300
- "summary": "The function execution time (in seconds) after which Lambda terminates the function."
5344
+ "summary": "Static image tag where the image will be pushed."
4301
5345
  },
4302
5346
  "immutable": true,
4303
5347
  "locationInModule": {
4304
- "filename": "src/providers/lambda.ts",
4305
- "line": 46
5348
+ "filename": "src/providers/common.ts",
5349
+ "line": 100
4306
5350
  },
4307
- "name": "timeout",
4308
- "optional": true,
5351
+ "name": "imageTag",
4309
5352
  "type": {
4310
- "fqn": "aws-cdk-lib.Duration"
5353
+ "primitive": "string"
4311
5354
  }
4312
5355
  },
4313
5356
  {
4314
5357
  "abstract": true,
4315
5358
  "docs": {
4316
- "default": "no VPC",
4317
5359
  "stability": "experimental",
4318
- "summary": "VPC to launch the runners in."
5360
+ "summary": "OS type of the image."
4319
5361
  },
4320
5362
  "immutable": true,
4321
5363
  "locationInModule": {
4322
- "filename": "src/providers/lambda.ts",
4323
- "line": 53
5364
+ "filename": "src/providers/common.ts",
5365
+ "line": 117
4324
5366
  },
4325
- "name": "vpc",
4326
- "optional": true,
5367
+ "name": "os",
4327
5368
  "type": {
4328
- "fqn": "aws-cdk-lib.aws_ec2.IVpc"
5369
+ "fqn": "@cloudsnorkel/cdk-github-runners.Os"
4329
5370
  }
4330
5371
  }
4331
5372
  ],
4332
- "symbolId": "src/providers/lambda:LambdaRunnerProps"
5373
+ "symbolId": "src/providers/common:RunnerImage"
4333
5374
  },
4334
5375
  "@cloudsnorkel/cdk-github-runners.RunnerProviderProps": {
4335
5376
  "assembly": "@cloudsnorkel/cdk-github-runners",
@@ -4342,7 +5383,7 @@
4342
5383
  "kind": "interface",
4343
5384
  "locationInModule": {
4344
5385
  "filename": "src/providers/common.ts",
4345
- "line": 32
5386
+ "line": 143
4346
5387
  },
4347
5388
  "name": "RunnerProviderProps",
4348
5389
  "properties": [
@@ -4357,31 +5398,13 @@
4357
5398
  "immutable": true,
4358
5399
  "locationInModule": {
4359
5400
  "filename": "src/providers/common.ts",
4360
- "line": 47
5401
+ "line": 151
4361
5402
  },
4362
5403
  "name": "logRetention",
4363
5404
  "optional": true,
4364
5405
  "type": {
4365
5406
  "fqn": "aws-cdk-lib.aws_logs.RetentionDays"
4366
5407
  }
4367
- },
4368
- {
4369
- "abstract": true,
4370
- "docs": {
4371
- "default": "latest version available",
4372
- "stability": "experimental",
4373
- "summary": "Version of GitHub Runners to install."
4374
- },
4375
- "immutable": true,
4376
- "locationInModule": {
4377
- "filename": "src/providers/common.ts",
4378
- "line": 38
4379
- },
4380
- "name": "runnerVersion",
4381
- "optional": true,
4382
- "type": {
4383
- "fqn": "@cloudsnorkel/cdk-github-runners.RunnerVersion"
4384
- }
4385
5408
  }
4386
5409
  ],
4387
5410
  "symbolId": "src/providers/common:RunnerProviderProps"
@@ -4398,7 +5421,7 @@
4398
5421
  "kind": "interface",
4399
5422
  "locationInModule": {
4400
5423
  "filename": "src/providers/common.ts",
4401
- "line": 59
5424
+ "line": 163
4402
5425
  },
4403
5426
  "name": "RunnerRuntimeParameters",
4404
5427
  "properties": [
@@ -4412,7 +5435,7 @@
4412
5435
  "immutable": true,
4413
5436
  "locationInModule": {
4414
5437
  "filename": "src/providers/common.ts",
4415
- "line": 73
5438
+ "line": 177
4416
5439
  },
4417
5440
  "name": "githubDomainPath",
4418
5441
  "type": {
@@ -4428,7 +5451,7 @@
4428
5451
  "immutable": true,
4429
5452
  "locationInModule": {
4430
5453
  "filename": "src/providers/common.ts",
4431
- "line": 78
5454
+ "line": 182
4432
5455
  },
4433
5456
  "name": "ownerPath",
4434
5457
  "type": {
@@ -4444,7 +5467,7 @@
4444
5467
  "immutable": true,
4445
5468
  "locationInModule": {
4446
5469
  "filename": "src/providers/common.ts",
4447
- "line": 83
5470
+ "line": 187
4448
5471
  },
4449
5472
  "name": "repoPath",
4450
5473
  "type": {
@@ -4461,7 +5484,7 @@
4461
5484
  "immutable": true,
4462
5485
  "locationInModule": {
4463
5486
  "filename": "src/providers/common.ts",
4464
- "line": 68
5487
+ "line": 172
4465
5488
  },
4466
5489
  "name": "runnerNamePath",
4467
5490
  "type": {
@@ -4477,7 +5500,7 @@
4477
5500
  "immutable": true,
4478
5501
  "locationInModule": {
4479
5502
  "filename": "src/providers/common.ts",
4480
- "line": 63
5503
+ "line": 167
4481
5504
  },
4482
5505
  "name": "runnerTokenPath",
4483
5506
  "type": {
@@ -4687,8 +5710,150 @@
4687
5710
  }
4688
5711
  ],
4689
5712
  "symbolId": "src/secrets:Secrets"
5713
+ },
5714
+ "@cloudsnorkel/cdk-github-runners.StaticRunnerImage": {
5715
+ "assembly": "@cloudsnorkel/cdk-github-runners",
5716
+ "docs": {
5717
+ "stability": "experimental",
5718
+ "summary": "Helper class with methods to use static images that are built outside the context of this project."
5719
+ },
5720
+ "fqn": "@cloudsnorkel/cdk-github-runners.StaticRunnerImage",
5721
+ "initializer": {
5722
+ "docs": {
5723
+ "stability": "experimental"
5724
+ }
5725
+ },
5726
+ "kind": "class",
5727
+ "locationInModule": {
5728
+ "filename": "src/providers/image-builders/static.ts",
5729
+ "line": 10
5730
+ },
5731
+ "methods": [
5732
+ {
5733
+ "docs": {
5734
+ "remarks": "The image must already have GitHub Actions runner installed. You are responsible to update it and remove it when done.\n\nWe create a CodeBuild image builder behind the scenes to copy the image over to ECR. This helps avoid Docker Hub rate limits and prevent failures.",
5735
+ "stability": "experimental",
5736
+ "summary": "Create a builder from an existing Docker Hub image."
5737
+ },
5738
+ "locationInModule": {
5739
+ "filename": "src/providers/image-builders/static.ts",
5740
+ "line": 44
5741
+ },
5742
+ "name": "fromDockerHub",
5743
+ "parameters": [
5744
+ {
5745
+ "name": "scope",
5746
+ "type": {
5747
+ "fqn": "constructs.Construct"
5748
+ }
5749
+ },
5750
+ {
5751
+ "name": "id",
5752
+ "type": {
5753
+ "primitive": "string"
5754
+ }
5755
+ },
5756
+ {
5757
+ "docs": {
5758
+ "summary": "Docker Hub image with optional tag."
5759
+ },
5760
+ "name": "image",
5761
+ "type": {
5762
+ "primitive": "string"
5763
+ }
5764
+ },
5765
+ {
5766
+ "docs": {
5767
+ "summary": "image architecture."
5768
+ },
5769
+ "name": "architecture",
5770
+ "optional": true,
5771
+ "type": {
5772
+ "fqn": "@cloudsnorkel/cdk-github-runners.Architecture"
5773
+ }
5774
+ },
5775
+ {
5776
+ "docs": {
5777
+ "summary": "image OS."
5778
+ },
5779
+ "name": "os",
5780
+ "optional": true,
5781
+ "type": {
5782
+ "fqn": "@cloudsnorkel/cdk-github-runners.Os"
5783
+ }
5784
+ }
5785
+ ],
5786
+ "returns": {
5787
+ "type": {
5788
+ "fqn": "@cloudsnorkel/cdk-github-runners.IImageBuilder"
5789
+ }
5790
+ },
5791
+ "static": true
5792
+ },
5793
+ {
5794
+ "docs": {
5795
+ "remarks": "The image must already have GitHub Actions runner installed. You are responsible to update it and remove it when done.",
5796
+ "stability": "experimental",
5797
+ "summary": "Create a builder (that doesn't actually build anything) from an existing image in an existing repository."
5798
+ },
5799
+ "locationInModule": {
5800
+ "filename": "src/providers/image-builders/static.ts",
5801
+ "line": 19
5802
+ },
5803
+ "name": "fromEcrRepository",
5804
+ "parameters": [
5805
+ {
5806
+ "docs": {
5807
+ "summary": "ECR repository."
5808
+ },
5809
+ "name": "repository",
5810
+ "type": {
5811
+ "fqn": "aws-cdk-lib.aws_ecr.IRepository"
5812
+ }
5813
+ },
5814
+ {
5815
+ "docs": {
5816
+ "summary": "image tag."
5817
+ },
5818
+ "name": "tag",
5819
+ "optional": true,
5820
+ "type": {
5821
+ "primitive": "string"
5822
+ }
5823
+ },
5824
+ {
5825
+ "docs": {
5826
+ "summary": "image architecture."
5827
+ },
5828
+ "name": "architecture",
5829
+ "optional": true,
5830
+ "type": {
5831
+ "fqn": "@cloudsnorkel/cdk-github-runners.Architecture"
5832
+ }
5833
+ },
5834
+ {
5835
+ "docs": {
5836
+ "summary": "image OS."
5837
+ },
5838
+ "name": "os",
5839
+ "optional": true,
5840
+ "type": {
5841
+ "fqn": "@cloudsnorkel/cdk-github-runners.Os"
5842
+ }
5843
+ }
5844
+ ],
5845
+ "returns": {
5846
+ "type": {
5847
+ "fqn": "@cloudsnorkel/cdk-github-runners.IImageBuilder"
5848
+ }
5849
+ },
5850
+ "static": true
5851
+ }
5852
+ ],
5853
+ "name": "StaticRunnerImage",
5854
+ "symbolId": "src/providers/image-builders/static:StaticRunnerImage"
4690
5855
  }
4691
5856
  },
4692
- "version": "0.2.0",
4693
- "fingerprint": "v+NQ0HXb/MqIb1CabazvNOGWELcQpAjFqi+9xq6QPnU="
4694
- }
5857
+ "version": "0.3.2",
5858
+ "fingerprint": "5LpDdECrJv22Gc6zQvmsw2Sh7T6mwuk2VTMzBpwEcHI="
5859
+ }