@cloudsnorkel/cdk-github-runners 0.8.3 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +4 -4
- package/README.md +3 -3
- package/assets/lambdas/aws-image-builder-versioner.lambda/index.js +42 -27
- package/assets/lambdas/setup.lambda/index.html +12 -12
- package/lib/lambdas/aws-image-builder-versioner-function.js +2 -2
- package/lib/lambdas/aws-image-builder-versioner.lambda.js +38 -22
- package/lib/lambdas/build-image-function.js +2 -2
- package/lib/lambdas/delete-ami-function.js +2 -2
- package/lib/lambdas/delete-runner-function.js +2 -2
- package/lib/lambdas/setup-function.js +2 -2
- package/lib/lambdas/status-function.js +2 -2
- package/lib/lambdas/token-retriever-function.js +2 -2
- package/lib/lambdas/update-lambda-function.js +2 -2
- package/lib/lambdas/webhook-handler-function.js +2 -2
- package/lib/providers/codebuild.js +4 -4
- package/lib/providers/common.js +3 -3
- package/lib/providers/ec2.js +2 -2
- package/lib/providers/fargate.js +4 -4
- package/lib/providers/image-builders/ami.js +1 -1
- package/lib/providers/image-builders/codebuild.js +3 -3
- package/lib/providers/image-builders/common.js +1 -1
- package/lib/providers/image-builders/container.js +1 -1
- package/lib/providers/image-builders/linux-components.js +1 -1
- package/lib/providers/image-builders/static.js +1 -1
- package/lib/providers/image-builders/windows-components.js +1 -1
- package/lib/providers/lambda.js +2 -2
- package/lib/runner.js +1 -1
- package/lib/secrets.js +1 -1
- package/package.json +11 -11
package/.jsii
CHANGED
|
@@ -3114,7 +3114,7 @@
|
|
|
3114
3114
|
"stability": "experimental"
|
|
3115
3115
|
},
|
|
3116
3116
|
"homepage": "https://github.com/CloudSnorkel/cdk-github-runners.git",
|
|
3117
|
-
"jsiiVersion": "1.
|
|
3117
|
+
"jsiiVersion": "1.79.0 (build b22f628)",
|
|
3118
3118
|
"keywords": [
|
|
3119
3119
|
"aws",
|
|
3120
3120
|
"aws-cdk",
|
|
@@ -3138,7 +3138,7 @@
|
|
|
3138
3138
|
},
|
|
3139
3139
|
"name": "@cloudsnorkel/cdk-github-runners",
|
|
3140
3140
|
"readme": {
|
|
3141
|
-
"markdown": "# GitHub Self-Hosted Runners CDK Constructs\n\n[][7]\n[][6]\n[][8]\n[][11]\n[][12]\n[](https://github.com/CloudSnorkel/cdk-github-runners/actions/workflows/release.yml)\n[](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* Automatically updated build environment with latest runner version\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| | EC2 | CodeBuild | Fargate | Lambda |\n|------------------|-------------------|----------------------------|----------------|---------------|\n| **Time limit** | Unlimited | 8 hours | Unlimited | 15 minutes |\n| **vCPUs** | Unlimited | 2, 4, 8, or 72 | 0.25 to 4 | 1 to 6 |\n| **RAM** | Unlimited | 3gb, 7gb, 15gb, or 145gb | 512mb to 30gb | 128mb to 10gb |\n| **Storage** | Unlimited | 50gb to 824gb | 20gb to 200gb | Up to 10gb |\n| **Architecture** | x86_64, ARM64 | x86_64, ARM64 | x86_64, ARM64 | x86_64, ARM64 |\n| **sudo** | ✔ | ✔ | ✔ | ❌ |\n| **Docker** | ✔ | ✔ (Linux only) | ❌ | ❌ |\n| **Spot pricing** | ✔ | ❌ | ✔ | ❌ |\n| **OS** | Linux, Windows | Linux, Windows | Linux, Windows | Linux |\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[](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: FargateRunner.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 FargateRunnerProvider(this, 'fargate runner', {\n label: 'customized-fargate',\n vpc: vpc,\n securityGroup: runnerSg,\n imageBuilder: myBuilder,\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\nWindows images must be built with AWS Image Builder.\n\n```typescript\nconst myWindowsBuilder = new ContainerImageBuilder(this, 'Windows image builder', {\n architecture: Architecture.X86_64,\n os: Os.WINDOWS,\n runnerVersion: RunnerVersion.specific('2.291.0'),\n rebuildInterval: Duration.days(14),\n});\nmyWindowsBuilder.addComponent(new ImageBuilderComponent(this, 'Ninja Component',\n {\n displayName: 'Ninja',\n description: 'Download and install Ninja build system',\n platform: 'Windows',\n commands: [\n 'Invoke-WebRequest -UseBasicParsing -Uri \"https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip\" -OutFile ninja.zip',\n 'Expand-Archive ninja.zip -DestinationPath C:\\\\actions',\n 'del ninja.zip',\n ],\n }\n));\n\nconst myProvider = new FargateRunnerProvider(this, 'fargate runner', {\n label: 'customized-windows-fargate',\n vpc: vpc,\n securityGroup: runnerSg,\n imageBuidler: myWindowsBuilder,\n});\n\n// create the runner infrastructure\nnew GitHubRunners(stack, 'runners', {\n providers: [myProvider],\n});\n```\n\nThe runner OS and architecture is determined by the image it is set to use. For example, to create a CodeBuild runner provider for ARM64 set the `architecture` property for the image builder to `Architecture.ARM64` and use the `LINUX_ARM64_DOCKERFILE_PATH` constant.\n\n```typescript\nnew GitHubRunners(stack, 'runners', {\n providers: [\n new FargateRunnerProvider(this, 'fargate runner', {\n labels: ['arm64', 'fargate'],\n imageBuidler: new CodeBuildImageBuilder(this, 'image builder', {\n architecture: Architecture.ARM64,\n os: Os.LINUX,\n dockerfilePath: FargateRunner.LINUX_ARM64_DOCKERFILE_PATH,\n }),\n }),\n ],\n});\n```\n\n## Architecture\n\n\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. If jobs are stuck on pending:\n 1. Make sure `runs-on` in the workflow matches the expected labels set in the runner provider\n 2. If it happens every time, cancel the job and start it again\n4. 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\n5. When using GitHub app, make sure there are active installation in `github.auth.app.installations`\n6. 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/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/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"
|
|
3141
|
+
"markdown": "# GitHub Self-Hosted Runners CDK Constructs\n\n[][7]\n[][6]\n[][8]\n[][11]\n[][12]\n[](https://github.com/CloudSnorkel/cdk-github-runners/actions/workflows/release.yml)\n[](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* Automatically updated build environment with latest runner version\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| | EC2 | CodeBuild | Fargate | Lambda |\n|------------------|-------------------|----------------------------|----------------|---------------|\n| **Time limit** | Unlimited | 8 hours | Unlimited | 15 minutes |\n| **vCPUs** | Unlimited | 2, 4, 8, or 72 | 0.25 to 4 | 1 to 6 |\n| **RAM** | Unlimited | 3gb, 7gb, 15gb, or 145gb | 512mb to 30gb | 128mb to 10gb |\n| **Storage** | Unlimited | 50gb to 824gb | 20gb to 200gb | Up to 10gb |\n| **Architecture** | x86_64, ARM64 | x86_64, ARM64 | x86_64, ARM64 | x86_64, ARM64 |\n| **sudo** | ✔ | ✔ | ✔ | ❌ |\n| **Docker** | ✔ | ✔ (Linux only) | ❌ | ❌ |\n| **Spot pricing** | ✔ | ❌ | ✔ | ❌ |\n| **OS** | Linux, Windows | Linux, Windows | Linux, Windows | Linux |\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[](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: FargateRunner.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 FargateRunnerProvider(this, 'fargate runner', {\n label: 'customized-fargate',\n vpc: vpc,\n securityGroup: runnerSg,\n imageBuilder: myBuilder,\n});\n\n// create the runner infrastructure\nnew GitHubRunners(this, '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\nWindows images must be built with AWS Image Builder.\n\n```typescript\nconst myWindowsBuilder = new ContainerImageBuilder(this, 'Windows image builder', {\n architecture: Architecture.X86_64,\n os: Os.WINDOWS,\n runnerVersion: RunnerVersion.specific('2.291.0'),\n rebuildInterval: Duration.days(14),\n});\nmyWindowsBuilder.addComponent(new ImageBuilderComponent(this, 'Ninja Component',\n {\n displayName: 'Ninja',\n description: 'Download and install Ninja build system',\n platform: 'Windows',\n commands: [\n 'Invoke-WebRequest -UseBasicParsing -Uri \"https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip\" -OutFile ninja.zip',\n 'Expand-Archive ninja.zip -DestinationPath C:\\\\actions',\n 'del ninja.zip',\n ],\n }\n));\n\nconst myProvider = new FargateRunnerProvider(this, 'fargate runner', {\n label: 'customized-windows-fargate',\n vpc: vpc,\n securityGroup: runnerSg,\n imageBuidler: myWindowsBuilder,\n});\n\n// create the runner infrastructure\nnew GitHubRunners(this, 'runners', {\n providers: [myProvider],\n});\n```\n\nThe runner OS and architecture is determined by the image it is set to use. For example, to create a CodeBuild runner provider for ARM64 set the `architecture` property for the image builder to `Architecture.ARM64` and use the `LINUX_ARM64_DOCKERFILE_PATH` constant.\n\n```typescript\nnew GitHubRunners(this, 'runners', {\n providers: [\n new FargateRunnerProvider(this, 'fargate runner', {\n labels: ['arm64', 'fargate'],\n imageBuidler: new CodeBuildImageBuilder(this, 'image builder', {\n architecture: Architecture.ARM64,\n os: Os.LINUX,\n dockerfilePath: FargateRunner.LINUX_ARM64_DOCKERFILE_PATH,\n }),\n }),\n ],\n});\n```\n\n## Architecture\n\n\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. If jobs are stuck on pending:\n 1. Make sure `runs-on` in the workflow matches the expected labels set in the runner provider\n 2. If it happens every time, cancel the job and start it again\n4. 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\n5. When using GitHub app, make sure there are active installation in `github.auth.app.installations`\n6. 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/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/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"
|
|
3142
3142
|
},
|
|
3143
3143
|
"repository": {
|
|
3144
3144
|
"type": "git",
|
|
@@ -10461,6 +10461,6 @@
|
|
|
10461
10461
|
"symbolId": "src/providers/image-builders/windows-components:WindowsComponents"
|
|
10462
10462
|
}
|
|
10463
10463
|
},
|
|
10464
|
-
"version": "0.8.
|
|
10465
|
-
"fingerprint": "
|
|
10464
|
+
"version": "0.8.4",
|
|
10465
|
+
"fingerprint": "5FI3ExjE5qaaWB37BaY1pM8TomyJWYxj9yB0uQ7xumo="
|
|
10466
10466
|
}
|
package/README.md
CHANGED
|
@@ -132,7 +132,7 @@ const myProvider = new FargateRunnerProvider(this, 'fargate runner', {
|
|
|
132
132
|
});
|
|
133
133
|
|
|
134
134
|
// create the runner infrastructure
|
|
135
|
-
new GitHubRunners(
|
|
135
|
+
new GitHubRunners(this, 'runners', {
|
|
136
136
|
providers: [myProvider],
|
|
137
137
|
});
|
|
138
138
|
```
|
|
@@ -179,7 +179,7 @@ const myProvider = new FargateRunnerProvider(this, 'fargate runner', {
|
|
|
179
179
|
});
|
|
180
180
|
|
|
181
181
|
// create the runner infrastructure
|
|
182
|
-
new GitHubRunners(
|
|
182
|
+
new GitHubRunners(this, 'runners', {
|
|
183
183
|
providers: [myProvider],
|
|
184
184
|
});
|
|
185
185
|
```
|
|
@@ -187,7 +187,7 @@ new GitHubRunners(stack, 'runners', {
|
|
|
187
187
|
The runner OS and architecture is determined by the image it is set to use. For example, to create a CodeBuild runner provider for ARM64 set the `architecture` property for the image builder to `Architecture.ARM64` and use the `LINUX_ARM64_DOCKERFILE_PATH` constant.
|
|
188
188
|
|
|
189
189
|
```typescript
|
|
190
|
-
new GitHubRunners(
|
|
190
|
+
new GitHubRunners(this, 'runners', {
|
|
191
191
|
providers: [
|
|
192
192
|
new FargateRunnerProvider(this, 'fargate runner', {
|
|
193
193
|
labels: ['arm64', 'fargate'],
|
|
@@ -2453,51 +2453,66 @@ async function handler(event, context) {
|
|
|
2453
2453
|
try {
|
|
2454
2454
|
switch (objectType) {
|
|
2455
2455
|
case "Component": {
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2456
|
+
let result = {};
|
|
2457
|
+
do {
|
|
2458
|
+
result = await ib.listComponents({
|
|
2459
|
+
filters: [{
|
|
2460
|
+
name: "name",
|
|
2461
|
+
values: [objectName]
|
|
2462
|
+
}],
|
|
2463
|
+
nextToken: result.nextToken
|
|
2464
|
+
}).promise();
|
|
2465
|
+
allVersions = allVersions.concat(result.componentVersionList.map((i) => i.version || "1.0.0"));
|
|
2466
|
+
} while (result.nextToken);
|
|
2463
2467
|
break;
|
|
2464
2468
|
}
|
|
2465
2469
|
case "ImageRecipe": {
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2470
|
+
let result = {};
|
|
2471
|
+
do {
|
|
2472
|
+
result = await ib.listImageRecipes({
|
|
2473
|
+
filters: [{
|
|
2474
|
+
name: "name",
|
|
2475
|
+
values: [objectName]
|
|
2476
|
+
}],
|
|
2477
|
+
nextToken: result.nextToken
|
|
2478
|
+
}).promise();
|
|
2479
|
+
allVersions = allVersions.concat(result.imageRecipeSummaryList.map((i) => {
|
|
2480
|
+
var _a;
|
|
2481
|
+
return ((_a = i.arn) == null ? void 0 : _a.split("/").pop()) || "1.0.0";
|
|
2482
|
+
}));
|
|
2483
|
+
} while (result.nextToken);
|
|
2476
2484
|
break;
|
|
2477
2485
|
}
|
|
2478
2486
|
case "ContainerRecipe": {
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2487
|
+
let result = {};
|
|
2488
|
+
do {
|
|
2489
|
+
result = await ib.listContainerRecipes({
|
|
2490
|
+
filters: [{
|
|
2491
|
+
name: "name",
|
|
2492
|
+
values: [objectName]
|
|
2493
|
+
}],
|
|
2494
|
+
nextToken: result.nextToken
|
|
2495
|
+
}).promise();
|
|
2496
|
+
allVersions = allVersions.concat(result.containerRecipeSummaryList.map((i) => {
|
|
2497
|
+
var _a;
|
|
2498
|
+
return ((_a = i.arn) == null ? void 0 : _a.split("/").pop()) || "1.0.0";
|
|
2499
|
+
}));
|
|
2500
|
+
} while (result.nextToken);
|
|
2489
2501
|
break;
|
|
2490
2502
|
}
|
|
2491
2503
|
}
|
|
2492
2504
|
} catch (e) {
|
|
2493
2505
|
if (e.code !== "ResourceNotFoundException") {
|
|
2494
2506
|
throw e;
|
|
2507
|
+
} else {
|
|
2508
|
+
console.log("Resource not found, assuming first version");
|
|
2495
2509
|
}
|
|
2496
2510
|
}
|
|
2497
2511
|
version = (0, import_semver.maxSatisfying)(allVersions, ">=0.0.0");
|
|
2498
2512
|
if (version === null) {
|
|
2499
2513
|
version = "1.0.0";
|
|
2500
2514
|
}
|
|
2515
|
+
console.log(`Found versions ${allVersions} -- latest is ${version}`);
|
|
2501
2516
|
version = (0, import_semver.inc)(version, "patch");
|
|
2502
2517
|
if (version === null) {
|
|
2503
2518
|
throw new Error("Unable to bump version");
|
|
@@ -5,24 +5,24 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Setup GitHub Runners</title>
|
|
7
7
|
<script type="module" crossorigin>
|
|
8
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const
|
|
9
|
-
and without any path. It should look something like <code>github.mycompany.com</code>.`,
|
|
8
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))n(l);new MutationObserver(l=>{for(const f of l)if(f.type==="childList")for(const a of f.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function o(l){const f={};return l.integrity&&(f.integrity=l.integrity),l.referrerpolicy&&(f.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?f.credentials="include":l.crossorigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function n(l){if(l.ep)return;l.ep=!0;const f=o(l);fetch(l.href,f)}})();function X(){}function $e(e){return e()}function Te(){return Object.create(null)}function q(e){e.forEach($e)}function ze(e){return typeof e=="function"}function Me(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function je(e){return Object.keys(e).length===0}function i(e,t){e.appendChild(t)}function T(e,t,o){e.insertBefore(t,o||null)}function C(e){e.parentNode&&e.parentNode.removeChild(e)}function s(e){return document.createElement(e)}function G(e){return document.createTextNode(e)}function b(){return G(" ")}function qe(){return G("")}function z(e,t,o,n){return e.addEventListener(t,o,n),()=>e.removeEventListener(t,o,n)}function r(e,t,o){o==null?e.removeAttribute(t):e.getAttribute(t)!==o&&e.setAttribute(t,o)}function ye(e){let t;return{p(...o){t=o,t.forEach(n=>e.push(n))},r(){t.forEach(o=>e.splice(e.indexOf(o),1))}}}function Be(e){return e===""?null:+e}function Je(e){return Array.from(e.childNodes)}function ce(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function j(e,t){e.value=t==null?"":t}let we;function le(e){we=e}const Q=[],He=[];let V=[];const Ne=[],Ke=Promise.resolve();let ge=!1;function We(){ge||(ge=!0,Ke.then(De))}function ve(e){V.push(e)}const me=new Set;let Z=0;function De(){if(Z!==0)return;const e=we;do{try{for(;Z<Q.length;){const t=Q[Z];Z++,le(t),Fe(t.$$)}}catch(t){throw Q.length=0,Z=0,t}for(le(null),Q.length=0,Z=0;He.length;)He.pop()();for(let t=0;t<V.length;t+=1){const o=V[t];me.has(o)||(me.add(o),o())}V.length=0}while(Q.length);for(;Ne.length;)Ne.pop()();ge=!1,me.clear(),le(e)}function Fe(e){if(e.fragment!==null){e.update(),q(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ve)}}function Ye(e){const t=[],o=[];V.forEach(n=>e.indexOf(n)===-1?t.push(n):o.push(n)),o.forEach(n=>n()),V=t}const Ze=new Set;function Qe(e,t){e&&e.i&&(Ze.delete(e),e.i(t))}function Ve(e,t,o,n){const{fragment:l,after_update:f}=e.$$;l&&l.m(t,o),n||ve(()=>{const a=e.$$.on_mount.map($e).filter(ze);e.$$.on_destroy?e.$$.on_destroy.push(...a):q(a),e.$$.on_mount=[]}),f.forEach(ve)}function Xe(e,t){const o=e.$$;o.fragment!==null&&(Ye(o.after_update),q(o.on_destroy),o.fragment&&o.fragment.d(t),o.on_destroy=o.fragment=null,o.ctx=[])}function xe(e,t){e.$$.dirty[0]===-1&&(Q.push(e),We(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function et(e,t,o,n,l,f,a,c=[-1]){const g=we;le(e);const u=e.$$={fragment:null,ctx:[],props:f,update:X,not_equal:l,bound:Te(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(g?g.$$.context:[])),callbacks:Te(),dirty:c,skip_bound:!1,root:t.target||g.$$.root};a&&a(u.root);let h=!1;if(u.ctx=o?o(e,t.props||{},(v,p,...S)=>{const k=S.length?S[0]:p;return u.ctx&&l(u.ctx[v],u.ctx[v]=k)&&(!u.skip_bound&&u.bound[v]&&u.bound[v](k),h&&xe(e,v)),p}):[],u.update(),h=!0,q(u.before_update),u.fragment=n?n(u.ctx):!1,t.target){if(t.hydrate){const v=Je(t.target);u.fragment&&u.fragment.l(v),v.forEach(C)}else u.fragment&&u.fragment.c();t.intro&&Qe(e.$$.fragment),Ve(e,t.target,t.anchor,t.customElement),De()}le(g)}class tt{$destroy(){Xe(this,1),this.$destroy=X}$on(t,o){if(!ze(o))return X;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(o),()=>{const l=n.indexOf(o);l!==-1&&n.splice(l,1)}}$set(t){this.$$set&&!je(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function Ie(e){let t,o,n,l,f,a,c,g;return{c(){t=s("h3"),t.textContent="GitHub Enterprise Server Domain",o=b(),n=s("div"),l=s("p"),l.innerHTML=`Where is GitHub Enterprise Server hosted? Type in the domain without <code>https://</code>
|
|
9
|
+
and without any path. It should look something like <code>github.mycompany.com</code>.`,f=b(),a=s("input"),r(a,"class","form-control"),r(n,"class","px-3 py-3")},m(u,h){T(u,t,h),T(u,o,h),T(u,n,h),i(n,l),i(n,f),i(n,a),j(a,e[1]),c||(g=z(a,"input",e[15]),c=!0)},p(u,h){h&2&&a.value!==u[1]&&j(a,u[1])},d(u){u&&C(t),u&&C(o),u&&C(n),c=!1,g()}}}function Oe(e){let t,o,n,l,f,a,c,g,u,h,v,p,S,k,A,E,_,m,w,O,I,H;return O=ye(e[13][1]),{c(){t=s("h3"),t.textContent="Authentication Type",o=b(),n=s("div"),l=s("p"),l.textContent=`You can choose between creating a new app that will provide authentication for specific
|
|
10
10
|
repositories, or a personal access token that will provide access to all repositories
|
|
11
11
|
available to you. Apps are easier to set up and provide more fine-grained access control. If
|
|
12
|
-
you have previously created an app, you can choose to use an existing app.`,
|
|
13
|
-
scope enabled. Don't forget to also create a webhook as described in `),
|
|
14
|
-
permissions. Don't forget to set up the webhook and its secret as described in <a href="https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md">SETUP_GITHUB.md</a>.`,
|
|
12
|
+
you have previously created an app, you can choose to use an existing app.`,f=b(),a=s("div"),c=s("input"),g=b(),u=s("label"),u.innerHTML="New GitHub App <b>(recommended)</b>",h=b(),v=s("div"),p=s("input"),S=b(),k=s("label"),k.textContent="Existing GitHub App",A=b(),E=s("div"),_=s("input"),m=b(),w=s("label"),w.textContent="Personal Authentication Token",r(c,"class","form-check-input"),r(c,"type","radio"),c.__value="newApp",c.value=c.__value,r(c,"id","newApp"),r(u,"class","form-check-label"),r(u,"for","newApp"),r(a,"class","form-check"),r(p,"class","form-check-input"),r(p,"type","radio"),p.__value="existingApp",p.value=p.__value,r(p,"id","existingApp"),r(k,"class","form-check-label"),r(k,"for","existingApp"),r(v,"class","form-check"),r(_,"class","form-check-input"),r(_,"type","radio"),_.__value="pat",_.value=_.__value,r(_,"id","pat"),r(w,"class","form-check-label"),r(w,"for","pat"),r(E,"class","form-check"),r(n,"class","px-3 py-3"),O.p(c,p,_)},m(d,N){T(d,t,N),T(d,o,N),T(d,n,N),i(n,l),i(n,f),i(n,a),i(a,c),c.checked=c.__value===e[2],i(a,g),i(a,u),i(n,h),i(n,v),i(v,p),p.checked=p.__value===e[2],i(v,S),i(v,k),i(n,A),i(n,E),i(E,_),_.checked=_.__value===e[2],i(E,m),i(E,w),I||(H=[z(c,"change",e[16]),z(p,"change",e[17]),z(_,"change",e[18])],I=!0)},p(d,N){N&4&&(c.checked=c.__value===d[2]),N&4&&(p.checked=p.__value===d[2]),N&4&&(_.checked=_.__value===d[2])},d(d){d&&C(t),d&&C(o),d&&C(n),O.r(),I=!1,q(H)}}}function nt(e){let t,o,n,l,f,a,c,g,u,h,v,p,S,k,A,E,_;return{c(){t=s("h2"),t.textContent="Personal Access Token",o=b(),n=s("div"),l=s("p"),f=G("The "),a=s("a"),c=G("personal access token"),u=G(" must have the "),h=s("code"),h.textContent="repo",v=G(`
|
|
13
|
+
scope enabled. Don't forget to also create a webhook as described in `),p=s("a"),p.textContent="SETUP_GITHUB.md",S=G("."),k=b(),A=s("input"),r(a,"href",g="https://"+e[1]+"/settings/tokens"),r(p,"href","https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md"),r(A,"class","form-control"),r(A,"placeholder","Token e.g. ghp_abcdefghijklmnopqrstuvwxyz1234567890"),r(n,"class","px-3 py-3")},m(m,w){T(m,t,w),T(m,o,w),T(m,n,w),i(n,l),i(l,f),i(l,a),i(a,c),i(l,u),i(l,h),i(l,v),i(l,p),i(l,S),i(n,k),i(n,A),j(A,e[7]),E||(_=z(A,"input",e[25]),E=!0)},p(m,w){w&2&&g!==(g="https://"+m[1]+"/settings/tokens")&&r(a,"href",g),w&128&&A.value!==m[7]&&j(A,m[7])},d(m){m&&C(t),m&&C(o),m&&C(n),E=!1,_()}}}function lt(e){let t,o,n,l,f,a,c,g,u,h,v,p,S,k,A,E,_,m;return{c(){t=s("h3"),t.textContent="Existing App Details",o=b(),n=s("div"),l=s("p"),l.innerHTML=`Existing apps must have <code>actions</code> and <code>administration</code> write
|
|
14
|
+
permissions. Don't forget to set up the webhook and its secret as described in <a href="https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md">SETUP_GITHUB.md</a>.`,f=b(),a=s("div"),c=s("label"),c.textContent="App Id",g=b(),u=s("div"),h=s("input"),v=b(),p=s("div"),S=s("label"),S.textContent="Private Key",k=b(),A=s("div"),E=s("textarea"),r(c,"for","appid"),r(c,"class","col-sm-2 col-form-label"),r(h,"type","number"),r(h,"class","form-control"),r(h,"id","appid"),r(u,"class","col-sm-10"),r(a,"class","form-group row px-3 py-2"),r(S,"for","pk"),r(S,"class","col-sm-2 col-form-label"),r(E,"class","form-control"),r(E,"id","pk"),r(E,"rows","10"),r(A,"class","col-sm-10"),r(p,"class","form-group row px-3 py-2"),r(n,"class","px-3 py-3")},m(w,O){T(w,t,O),T(w,o,O),T(w,n,O),i(n,l),i(n,f),i(n,a),i(a,c),i(a,g),i(a,u),i(u,h),j(h,e[5]),i(n,v),i(n,p),i(p,S),i(p,k),i(p,A),i(A,E),j(E,e[6]),_||(m=[z(h,"input",e[23]),z(E,"input",e[24])],_=!0)},p(w,O){O&32&&Be(h.value)!==w[5]&&j(h,w[5]),O&64&&j(E,w[6])},d(w){w&&C(t),w&&C(o),w&&C(n),_=!1,q(m)}}}function it(e){let t,o,n,l,f,a,c,g,u,h,v,p,S,k,A,E,_,m,w,O,I=e[0]==="ghes"&&Ge(e),H=e[3]==="org"&&Re(e);return m=ye(e[13][0]),{c(){t=s("h3"),t.textContent="New App Settings",o=b(),n=s("div"),l=s("p"),l.textContent=`Choose whether to create a new personal app or organization app. A private personal app can
|
|
15
15
|
only be used for repositories under your user. A private origination app can only be used
|
|
16
|
-
for repositories under that organization.`,
|
|
17
|
-
you can make the app public.`,o=b(),
|
|
18
|
-
`),
|
|
19
|
-
then your organization slug is `),
|
|
16
|
+
for repositories under that organization.`,f=b(),a=s("div"),c=s("input"),g=b(),u=s("label"),u.textContent="User app",h=b(),v=s("div"),p=s("input"),S=b(),k=s("label"),k.textContent="Organization app",A=b(),I&&I.c(),E=b(),H&&H.c(),_=qe(),r(c,"class","form-check-input"),r(c,"type","radio"),c.__value="user",c.value=c.__value,r(c,"id","userScope"),r(u,"class","form-check-label"),r(u,"for","userScope"),r(a,"class","form-check"),r(p,"class","form-check-input"),r(p,"type","radio"),p.__value="org",p.value=p.__value,r(p,"id","orgScope"),r(k,"class","form-check-label"),r(k,"for","orgScope"),r(v,"class","form-check"),r(n,"class","px-3 py-3"),m.p(c,p)},m(d,N){T(d,t,N),T(d,o,N),T(d,n,N),i(n,l),i(n,f),i(n,a),i(a,c),c.checked=c.__value===e[3],i(a,g),i(a,u),i(n,h),i(n,v),i(v,p),p.checked=p.__value===e[3],i(v,S),i(v,k),i(n,A),I&&I.m(n,null),T(d,E,N),H&&H.m(d,N),T(d,_,N),w||(O=[z(c,"change",e[19]),z(p,"change",e[20])],w=!0)},p(d,N){N&8&&(c.checked=c.__value===d[3]),N&8&&(p.checked=p.__value===d[3]),d[0]==="ghes"?I?I.p(d,N):(I=Ge(d),I.c(),I.m(n,null)):I&&(I.d(1),I=null),d[3]==="org"?H?H.p(d,N):(H=Re(d),H.c(),H.m(_.parentNode,_)):H&&(H.d(1),H=null)},d(d){d&&C(t),d&&C(o),d&&C(n),I&&I.d(),d&&C(E),H&&H.d(d),d&&C(_),m.r(),w=!1,q(O)}}}function Ge(e){let t,o,n,l,f,a,c,g;return{c(){t=s("p"),t.textContent=`If multiple organizations under the same GitHub Enterprise Server need to use the runners,
|
|
17
|
+
you can make the app public.`,o=b(),n=s("div"),l=s("input"),f=b(),a=s("label"),a.textContent="Public app",r(t,"class","pt-2"),r(l,"class","form-check-input"),r(l,"type","checkbox"),r(l,"id","public"),r(a,"class","form-check-label"),r(a,"for","public"),r(n,"class","form-check")},m(u,h){T(u,t,h),T(u,o,h),T(u,n,h),i(n,l),l.checked=e[10].public,i(n,f),i(n,a),c||(g=z(l,"change",e[21]),c=!0)},p(u,h){h&1024&&(l.checked=u[10].public)},d(u){u&&C(t),u&&C(o),u&&C(n),c=!1,g()}}}function Re(e){let t,o,n,l,f,a,c,g,u,h,v,p,S,k,A,E;return{c(){t=s("h3"),t.textContent="Organization name",o=b(),n=s("div"),l=s("p"),f=G(`What is the slug for your organization? If your repositories have a URL like
|
|
18
|
+
`),a=s("code"),c=G("https://"),g=G(e[1]),u=G("/MyOrg/my-repo"),h=G(`
|
|
19
|
+
then your organization slug is `),v=s("code"),v.textContent="MyOrg",p=G("."),S=b(),k=s("input"),r(k,"class","form-control"),r(n,"class","px-3 py-3")},m(_,m){T(_,t,m),T(_,o,m),T(_,n,m),i(n,l),i(l,f),i(l,a),i(a,c),i(a,g),i(a,u),i(l,h),i(l,v),i(l,p),i(n,S),i(n,k),j(k,e[4]),A||(E=z(k,"input",e[22]),A=!0)},p(_,m){m&2&&ce(g,_[1]),m&16&&k.value!==_[4]&&j(k,_[4])},d(_){_&&C(t),_&&C(o),_&&C(n),A=!1,E()}}}function ot(e){let t,o,n;return{c(){t=s("div"),o=G(e[9]),r(t,"class",n="alert alert-"+(e[8]?"success":"danger")),r(t,"role","alert")},m(l,f){T(l,t,f),i(t,o)},p(l,f){f&512&&ce(o,l[9]),f&256&&n!==(n="alert alert-"+(l[8]?"success":"danger"))&&r(t,"class",n)},d(l){l&&C(t)}}}function rt(e){let t;return{c(){t=s("p"),t.textContent="This button will be enabled once all the questions above are answered."},m(o,n){T(o,t,n)},p:X,d(o){o&&C(t)}}}function Pe(e){let t,o,n,l,f,a;return{c(){t=s("p"),o=s("b"),o.textContent="WARNING:",n=G(" using a public app means anyone with access to "),l=s("code"),f=G(e[1]),a=G(`
|
|
20
20
|
can use the runners you're setting up now. Anyone can create a workflow that will run on those runners,
|
|
21
21
|
have access to their instance profile, and be part of their security group. Consider the security
|
|
22
|
-
implications before continuing.`),
|
|
22
|
+
implications before continuing.`),r(o,"class","text-danger")},m(c,g){T(c,t,g),i(t,o),i(t,n),i(t,l),i(l,f),i(t,a)},p(c,g){g&2&&ce(f,c[1])},d(c){c&&C(t)}}}function st(e){let t,o,n,l,f,a,c,g,u,h,v,p,S,k,A,E,_,m,w,O,I,H,d,N,J,ie,x,ee,te,ne,D,B,fe,pe,K,oe=Ue(e[2])+"",de,re,Ee,W,F,se,ue,_e,he,Ae,P=e[0]==="ghes"&&Ie(e),L=e[0]&&Oe(e);function Ce(y,R){if(y[2]==="newApp")return it;if(y[2]==="existingApp")return lt;if(y[2]==="pat")return nt}let Y=Ce(e),U=Y&&Y(e);function Se(y,R){return y[9]===void 0?rt:ot}let ae=Se(e),M=ae(e),$=e[10].public&&e[2]==="newApp"&&Pe(e);return _e=ye(e[13][2]),{c(){t=s("main"),o=s("div"),n=s("div"),l=s("form"),f=s("h1"),f.textContent="Setup GitHub Runners",a=b(),c=s("p"),g=G(`Answer all the questions on this page to automatically configure GitHub integration and get the
|
|
23
23
|
runners working. This page will not be accessible once you complete this operation. If you ever want
|
|
24
|
-
to access it again, edit `),
|
|
25
|
-
Enterprise Server?`,
|
|
24
|
+
to access it again, edit `),u=s("code"),u.textContent=`${ut}`,h=G(" and run the status function again."),v=b(),p=s("h3"),p.textContent="Choose GitHub Instance",S=b(),k=s("div"),A=s("p"),A.textContent=`Are your repositories hosted on GitHub.com or are you using an on-premise installation of GitHub
|
|
25
|
+
Enterprise Server?`,E=b(),_=s("div"),m=s("input"),w=b(),O=s("label"),O.textContent="GitHub.com",I=b(),H=s("div"),d=s("input"),N=b(),J=s("label"),J.textContent="GitHub Enterprise Server",ie=b(),P&&P.c(),x=b(),L&&L.c(),ee=b(),U&&U.c(),te=b(),ne=s("h2"),ne.textContent="Finish Setup",D=b(),B=s("div"),M.c(),fe=b(),$&&$.c(),pe=b(),K=s("button"),de=G(oe),Ee=b(),W=s("form"),F=s("input"),r(m,"class","form-check-input"),r(m,"type","radio"),m.__value="github.com",m.value=m.__value,r(m,"id","github.com"),r(O,"class","form-check-label"),r(O,"for","github.com"),r(_,"class","form-check"),r(d,"class","form-check-input"),r(d,"type","radio"),d.__value="ghes",d.value=d.__value,r(d,"id","ghes"),r(J,"class","form-check-label"),r(J,"for","ghes"),r(H,"class","form-check"),r(k,"class","px-3 py-3"),r(K,"type","submit"),r(K,"class","btn btn-success"),K.disabled=re=Le(e[0],e[2],e[5],e[6],e[7],e[8]),r(B,"class","px-3 py-3"),r(l,"class","col"),r(n,"class","row"),r(o,"class","container py-3 px-2"),r(F,"type","hidden"),r(F,"name","manifest"),F.value=se=JSON.stringify(e[10]),r(W,"action",ue="https://"+e[1]+"/"+(e[3]==="org"?`organizations/${e[4]}/`:"")+"settings/apps/new?state="+ke),r(W,"method","post"),r(W,"id","appform"),_e.p(m,d)},m(y,R){T(y,t,R),i(t,o),i(o,n),i(n,l),i(l,f),i(l,a),i(l,c),i(c,g),i(c,u),i(c,h),i(l,v),i(l,p),i(l,S),i(l,k),i(k,A),i(k,E),i(k,_),i(_,m),m.checked=m.__value===e[0],i(_,w),i(_,O),i(k,I),i(k,H),i(H,d),d.checked=d.__value===e[0],i(H,N),i(H,J),i(l,ie),P&&P.m(l,null),i(l,x),L&&L.m(l,null),i(l,ee),U&&U.m(l,null),i(l,te),i(l,ne),i(l,D),i(l,B),M.m(B,null),i(B,fe),$&&$.m(B,null),i(B,pe),i(B,K),i(K,de),i(t,Ee),i(t,W),i(W,F),he||(Ae=[z(m,"change",e[12]),z(d,"change",e[14]),z(l,"submit",e[11])],he=!0)},p(y,[R]){R&1&&(m.checked=m.__value===y[0]),R&1&&(d.checked=d.__value===y[0]),y[0]==="ghes"?P?P.p(y,R):(P=Ie(y),P.c(),P.m(l,x)):P&&(P.d(1),P=null),y[0]?L?L.p(y,R):(L=Oe(y),L.c(),L.m(l,ee)):L&&(L.d(1),L=null),Y===(Y=Ce(y))&&U?U.p(y,R):(U&&U.d(1),U=Y&&Y(y),U&&(U.c(),U.m(l,te))),ae===(ae=Se(y))&&M?M.p(y,R):(M.d(1),M=ae(y),M&&(M.c(),M.m(B,fe))),y[10].public&&y[2]==="newApp"?$?$.p(y,R):($=Pe(y),$.c(),$.m(B,pe)):$&&($.d(1),$=null),R&4&&oe!==(oe=Ue(y[2])+"")&&ce(de,oe),R&485&&re!==(re=Le(y[0],y[2],y[5],y[6],y[7],y[8]))&&(K.disabled=re),R&1024&&se!==(se=JSON.stringify(y[10]))&&(F.value=se),R&26&&ue!==(ue="https://"+y[1]+"/"+(y[3]==="org"?`organizations/${y[4]}/`:"")+"settings/apps/new?state="+ke)&&r(W,"action",ue)},i:X,o:X,d(y){y&&C(t),P&&P.d(),L&&L.d(),U&&U.d(),M.d(),$&&$.d(),_e.r(),he=!1,q(Ae)}}}const ut="INSERT_SECRET_ARN_HERE",ke="INSERT_TOKEN_HERE";function Le(e,t,o,n,l,f){return f||e===void 0||t===void 0?!0:t==="newApp"?!1:t==="existingApp"?o===""||n==="":t==="pat"?l==="":(console.error("Something is broken",e,t,o),!0)}function Ue(e){return e==="newApp"?"Create GitHub App":"Setup"}function be(e,t){return new Promise((o,n)=>{fetch(`${e}?token=${ke}`,{method:"POST",mode:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),redirect:"error"}).then(l=>{l.ok?l.text().then(o).catch(n):l.text().then(f=>{n(new Error(`${f} [${l.status}]`))}).catch(n)}).catch(n)})}function at(e,t,o){let n,l="INSERT_DOMAIN_HERE",f,a="user",c="ORGANIZATION",g="",u="",h="",v,p;const S={url:"https://github.com/CloudSnorkel/cdk-github-runners",hook_attributes:{url:"INSERT_WEBHOOK_URL_HERE"},redirect_url:"INSERT_BASE_URL_HERE/complete-new-app",public:!1,default_permissions:{actions:"write",administration:"write"},default_events:["workflow_job"]};function k(te){te.preventDefault();function ne(){const D=n==="ghes"?l:"github.com";switch(f){case"newApp":return be("domain",{domain:D}).then(B=>(document.getElementById("appform").submit(),Promise.resolve("Redirecting to GitHub...")));case"existingApp":return be("app",{appid:g,pk:u,domain:D});case"pat":return be("pat",{pat:h,domain:D})}}ne().then(D=>{o(9,p=D),o(8,v=!0)}).catch(D=>{o(9,p=`${D}`),o(8,v=!1)})}const A=[[],[],[]];function E(){n=this.__value,o(0,n)}function _(){n=this.__value,o(0,n)}function m(){l=this.value,o(1,l)}function w(){f=this.__value,o(2,f)}function O(){f=this.__value,o(2,f)}function I(){f=this.__value,o(2,f)}function H(){a=this.__value,o(3,a)}function d(){a=this.__value,o(3,a)}function N(){S.public=this.checked,o(10,S)}function J(){c=this.value,o(4,c)}function ie(){g=Be(this.value),o(5,g)}function x(){u=this.value,o(6,u)}function ee(){h=this.value,o(7,h)}return[n,l,f,a,c,g,u,h,v,p,S,k,E,A,_,m,w,O,I,H,d,N,J,ie,x,ee]}class ct extends tt{constructor(t){super(),et(this,t,at,st,Me,{})}}new ct({target:document.getElementById("app")});
|
|
26
26
|
|
|
27
27
|
</script>
|
|
28
28
|
<style type="text/css">
|
|
@@ -12,7 +12,7 @@ class AwsImageBuilderVersionerFunction extends lambda.Function {
|
|
|
12
12
|
super(scope, id, {
|
|
13
13
|
description: 'src/lambdas/aws-image-builder-versioner.lambda.ts',
|
|
14
14
|
...props,
|
|
15
|
-
runtime: new lambda.Runtime('
|
|
15
|
+
runtime: new lambda.Runtime('nodejs16.x', lambda.RuntimeFamily.NODEJS),
|
|
16
16
|
handler: 'index.handler',
|
|
17
17
|
code: lambda.Code.fromAsset(path.join(__dirname, '../../assets/lambdas/aws-image-builder-versioner.lambda')),
|
|
18
18
|
});
|
|
@@ -20,4 +20,4 @@ class AwsImageBuilderVersionerFunction extends lambda.Function {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
exports.AwsImageBuilderVersionerFunction = AwsImageBuilderVersionerFunction;
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXdzLWltYWdlLWJ1aWxkZXItdmVyc2lvbmVyLWZ1bmN0aW9uLmpzIiwic291cmNl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L2F3cy1pbWFnZS1idWlsZGVyLXZlcnNpb25lci5cbiAqL1xuZXhwb3J0IGNsYXNzIEF3c0ltYWdlQnVpbGRlclZlcnNpb25lckZ1bmN0aW9uIGV4dGVuZHMgbGFtYmRhLkZ1bmN0aW9uIHtcbiAgY29uc3RydWN0b3Ioc2NvcGU6IENvbnN0cnVjdCwgaWQ6IHN0cmluZywgcHJvcHM/OiBBd3NJbWFnZUJ1aWxkZXJWZXJzaW9uZXJGdW5jdGlvblByb3BzKSB7XG4gICAgc3VwZXIoc2NvcGUsIGlkLCB7XG4gICAgICBkZXNjcmlwdGlvbjogJ3NyYy9sYW1iZGFzL2F3cy1pbWFnZS1idWlsZGVyLXZlcnNpb25lci5sYW1iZGEudHMnLFxuICAgICAgLi4ucHJvcHMsXG4gICAgICBydW50aW1lOiBuZXcgbGFtYmRhLlJ1bnRpbWUoJ25vZGVqczE2LngnLCBsYW1iZGEuUnVudGltZUZhbWlseS5OT0RFSlMpLFxuICAgICAgaGFuZGxlcjogJ2luZGV4LmhhbmRsZXInLFxuICAgICAgY29kZTogbGFtYmRhLkNvZGUuZnJvbUFzc2V0KHBhdGguam9pbihfX2Rpcm5hbWUsICcuLi8uLi9hc3NldHMvbGFtYmRhcy9hd3MtaW1hZ2UtYnVpbGRlci12ZXJzaW9uZXIubGFtYmRhJykpLFxuICAgIH0pO1xuICAgIHRoaXMuYWRkRW52aXJvbm1lbnQoJ0FXU19OT0RFSlNfQ09OTkVDVElPTl9SRVVTRV9FTkFCTEVEJywgJzEnLCB7IHJlbW92ZUluRWRnZTogdHJ1ZSB9KTtcbiAgfVxufSJdfQ==
|
|
@@ -20,33 +20,45 @@ async function handler(event, context) {
|
|
|
20
20
|
try {
|
|
21
21
|
switch (objectType) {
|
|
22
22
|
case 'Component': {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
let result = {};
|
|
24
|
+
do {
|
|
25
|
+
result = await ib.listComponents({
|
|
26
|
+
filters: [{
|
|
27
|
+
name: 'name',
|
|
28
|
+
values: [objectName],
|
|
29
|
+
}],
|
|
30
|
+
nextToken: result.nextToken,
|
|
31
|
+
}).promise();
|
|
32
|
+
allVersions = allVersions.concat(result.componentVersionList.map(i => i.version || '1.0.0'));
|
|
33
|
+
} while (result.nextToken);
|
|
30
34
|
break;
|
|
31
35
|
}
|
|
32
36
|
case 'ImageRecipe': {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
let result = {};
|
|
38
|
+
do {
|
|
39
|
+
result = await ib.listImageRecipes({
|
|
40
|
+
filters: [{
|
|
41
|
+
name: 'name',
|
|
42
|
+
values: [objectName],
|
|
43
|
+
}],
|
|
44
|
+
nextToken: result.nextToken,
|
|
45
|
+
}).promise();
|
|
46
|
+
allVersions = allVersions.concat(result.imageRecipeSummaryList.map(i => i.arn?.split('/').pop() || '1.0.0'));
|
|
47
|
+
} while (result.nextToken);
|
|
40
48
|
break;
|
|
41
49
|
}
|
|
42
50
|
case 'ContainerRecipe': {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
let result = {};
|
|
52
|
+
do {
|
|
53
|
+
result = await ib.listContainerRecipes({
|
|
54
|
+
filters: [{
|
|
55
|
+
name: 'name',
|
|
56
|
+
values: [objectName],
|
|
57
|
+
}],
|
|
58
|
+
nextToken: result.nextToken,
|
|
59
|
+
}).promise();
|
|
60
|
+
allVersions = allVersions.concat(result.containerRecipeSummaryList.map(i => i.arn?.split('/').pop() || '1.0.0'));
|
|
61
|
+
} while (result.nextToken);
|
|
50
62
|
break;
|
|
51
63
|
}
|
|
52
64
|
}
|
|
@@ -55,11 +67,15 @@ async function handler(event, context) {
|
|
|
55
67
|
if (e.code !== 'ResourceNotFoundException') {
|
|
56
68
|
throw e;
|
|
57
69
|
}
|
|
70
|
+
else {
|
|
71
|
+
console.log('Resource not found, assuming first version');
|
|
72
|
+
}
|
|
58
73
|
}
|
|
59
74
|
version = semver_1.maxSatisfying(allVersions, '>=0.0.0');
|
|
60
75
|
if (version === null) {
|
|
61
76
|
version = '1.0.0';
|
|
62
77
|
}
|
|
78
|
+
console.log(`Found versions ${allVersions} -- latest is ${version}`);
|
|
63
79
|
version = semver_1.inc(version, 'patch');
|
|
64
80
|
if (version === null) {
|
|
65
81
|
throw new Error('Unable to bump version');
|
|
@@ -77,4 +93,4 @@ async function handler(event, context) {
|
|
|
77
93
|
}
|
|
78
94
|
}
|
|
79
95
|
exports.handler = handler;
|
|
80
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
96
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXdzLWltYWdlLWJ1aWxkZXItdmVyc2lvbmVyLmxhbWJkYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9sYW1iZGFzL2F3cy1pbWFnZS1idWlsZGVyLXZlcnNpb25lci5sYW1iZGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsc0RBQXNEO0FBQ3RELCtCQUErQjtBQUMvQixtQ0FBNEM7QUFDNUMsdUNBQWtEO0FBRWxELE1BQU0sRUFBRSxHQUFHLElBQUksR0FBRyxDQUFDLFlBQVksRUFBRSxDQUFDO0FBRWxDLDZGQUE2RjtBQUN0RixLQUFLLFVBQVUsT0FBTyxDQUFDLEtBQWtELEVBQUUsT0FBMEI7SUFDMUcsT0FBTyxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLEVBQUUsR0FBRyxLQUFLLEVBQUUsV0FBVyxFQUFFLEtBQUssRUFBRSxDQUFDLENBQUMsQ0FBQztJQUU5RCxJQUFJO1FBQ0YsTUFBTSxVQUFVLEdBQUcsS0FBS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biAgY29uc29sZS5sb2coSlNPTi5zdHJpbmdpZnkoeyAuLi5ldmVudCwgUmVzcG9uc2VVUkw6ICcuLi4nIH0pKTtcblxuICB0cnkge1xuICAgIGNvbnN0IG9iamVjdFR5cGUgPSBldmVudC5SZXNvdXJjZVByb3BlcnRpZXMuT2JqZWN0VHlwZTtcbiAgICBjb25zdCBvYmplY3ROYW1lID0gZXZlbnQuUmVzb3VyY2VQcm9wZXJ0aWVzLk9iamVjdE5hbWU7XG5cbiAgICBzd2l0Y2ggKGV2ZW50LlJlcXVlc3RUeXBlKSB7XG4gICAgICBjYXNlICdDcmVhdGUnOlxuICAgICAgY2FzZSAnVXBkYXRlJzpcbiAgICAgICAgbGV0IHZlcnNpb246IHN0cmluZyB8IG51bGwgPSAnMS4wLjAnO1xuICAgICAgICBsZXQgYWxsVmVyc2lvbnM6IHN0cmluZ1tdID0gW107XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgc3dpdGNoIChvYmplY3RUeXBlKSB7XG4gICAgICAgICAgICBjYXNlICdDb21wb25lbnQnOiB7XG4gICAgICAgICAgICAgIGxldCByZXN1bHQ6IEFXUy5JbWFnZWJ1aWxkZXIuTGlzdENvbXBvbmVudHNSZXNwb25zZSA9IHt9O1xuICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gYXdhaXQgaWIubGlzdENvbXBvbmVudHMoe1xuICAgICAgICAgICAgICAgICAgZmlsdGVyczogW3tcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogJ25hbWUnLFxuICAgICAgICAgICAgICAgICAgICB2YWx1ZXM6IFtvYmplY3ROYW1lXSxcbiAgICAgICAgICAgICAgICAgIH1dLFxuICAgICAgICAgICAgICAgICAgbmV4dFRva2VuOiByZXN1bHQubmV4dFRva2VuLFxuICAgICAgICAgICAgICAgIH0pLnByb21pc2UoKTtcbiAgICAgICAgICAgICAgICBhbGxWZXJzaW9ucyA9IGFsbFZlcnNpb25zLmNvbmNhdChyZXN1bHQuY29tcG9uZW50VmVyc2lvbkxpc3QhLm1hcChpID0+IGkudmVyc2lvbiB8fCAnMS4wLjAnKSk7XG4gICAgICAgICAgICAgIH0gd2hpbGUgKHJlc3VsdC5uZXh0VG9rZW4pO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgJ0ltYWdlUmVjaXBlJzoge1xuICAgICAgICAgICAgICBsZXQgcmVzdWx0OiBBV1MuSW1hZ2VidWlsZGVyLkxpc3RJbWFnZVJlY2lwZXNSZXNwb25zZSA9IHt9O1xuICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gYXdhaXQgaWIubGlzdEltYWdlUmVjaXBlcyh7XG4gICAgICAgICAgICAgICAgICBmaWx0ZXJzOiBbe1xuICAgICAgICAgICAgICAgICAgICBuYW1lOiAnbmFtZScsXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlczogW29iamVjdE5hbWVdLFxuICAgICAgICAgICAgICAgICAgfV0sXG4gICAgICAgICAgICAgICAgICBuZXh0VG9rZW46IHJlc3VsdC5uZXh0VG9rZW4sXG4gICAgICAgICAgICAgICAgfSkucHJvbWlzZSgpO1xuICAgICAgICAgICAgICAgIGFsbFZlcnNpb25zID0gYWxsVmVyc2lvbnMuY29uY2F0KHJlc3VsdC5pbWFnZVJlY2lwZVN1bW1hcnlMaXN0IS5tYXAoaSA9PiBpLmFybj8uc3BsaXQoJy8nKS5wb3AoKSB8fCAnMS4wLjAnKSk7XG4gICAgICAgICAgICAgIH0gd2hpbGUgKHJlc3VsdC5uZXh0VG9rZW4pO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgJ0NvbnRhaW5lclJlY2lwZSc6IHtcbiAgICAgICAgICAgICAgbGV0IHJlc3VsdDogQVdTLkltYWdlYnVpbGRlci5MaXN0Q29udGFpbmVyUmVjaXBlc1Jlc3BvbnNlID0ge307XG4gICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBhd2FpdCBpYi5saXN0Q29udGFpbmVyUmVjaXBlcyh7XG4gICAgICAgICAgICAgICAgICBmaWx0ZXJzOiBbe1xuICAgICAgICAgICAgICAgICAgICBuYW1lOiAnbmFtZScsXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlczogW29iamVjdE5hbWVdLFxuICAgICAgICAgICAgICAgICAgfV0sXG4gICAgICAgICAgICAgICAgICBuZXh0VG9rZW46IHJlc3VsdC5uZXh0VG9rZW4sXG4gICAgICAgICAgICAgICAgfSkucHJvbWlzZSgpO1xuICAgICAgICAgICAgICAgIGFsbFZlcnNpb25zID0gYWxsVmVyc2lvbnMuY29uY2F0KHJlc3VsdC5jb250YWluZXJSZWNpcGVTdW1tYXJ5TGlzdCEubWFwKGkgPT4gaS5hcm4/LnNwbGl0KCcvJykucG9wKCkgfHwgJzEuMC4wJykpO1xuICAgICAgICAgICAgICB9IHdoaWxlIChyZXN1bHQubmV4dFRva2VuKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgaWYgKChlIGFzIGFueSkuY29kZSAhPT0gJ1Jlc291cmNlTm90Rm91bmRFeGNlcHRpb24nKSB7XG4gICAgICAgICAgICB0aHJvdyBlO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjb25zb2xlLmxvZygnUmVzb3VyY2Ugbm90IGZvdW5kLCBhc3N1bWluZyBmaXJzdCB2ZXJzaW9uJyk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdmVyc2lvbiA9IG1heFNhdGlzZnlpbmcoYWxsVmVyc2lvbnMsICc+PTAuMC4wJyk7XG4gICAgICAgIGlmICh2ZXJzaW9uID09PSBudWxsKSB7XG4gICAgICAgICAgdmVyc2lvbiA9ICcxLjAuMCc7XG4gICAgICAgIH1cbiAgICAgICAgY29uc29sZS5sb2coYEZvdW5kIHZlcnNpb25zICR7YWxsVmVyc2lvbnN9IC0tIGxhdGVzdCBpcyAke3ZlcnNpb259YCk7XG5cbiAgICAgICAgdmVyc2lvbiA9IGluYyh2ZXJzaW9uLCAncGF0Y2gnKTtcbiAgICAgICAgaWYgKHZlcnNpb24gPT09IG51bGwpIHtcbiAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1VuYWJsZSB0byBidW1wIHZlcnNpb24nKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBjdXN0b21SZXNvdXJjZVJlc3BvbmQoZXZlbnQsICdTVUNDRVNTJywgJ09LJywgdmVyc2lvbiwge30pO1xuXG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnRGVsZXRlJzpcbiAgICAgICAgYXdhaXQgY3VzdG9tUmVzb3VyY2VSZXNwb25kKGV2ZW50LCAnU1VDQ0VTUycsICdPSycsIGV2ZW50LlBoeXNpY2FsUmVzb3VyY2VJZCwge30pO1xuICAgICAgICBicmVhaztcbiAgICB9XG4gIH0gY2F0Y2ggKGUpIHtcbiAgICBjb25zb2xlLmxvZyhlKTtcbiAgICBhd2FpdCBjdXN0b21SZXNvdXJjZVJlc3BvbmQoZXZlbnQsICdGQUlMRUQnLCAoZSBhcyBFcnJvcikubWVzc2FnZSB8fCAnSW50ZXJuYWwgRXJyb3InLCBjb250ZXh0LmxvZ1N0cmVhbU5hbWUsIHt9KTtcbiAgfVxufVxuIl19
|
|
@@ -12,7 +12,7 @@ class BuildImageFunction extends lambda.Function {
|
|
|
12
12
|
super(scope, id, {
|
|
13
13
|
description: 'src/lambdas/build-image.lambda.ts',
|
|
14
14
|
...props,
|
|
15
|
-
runtime: new lambda.Runtime('
|
|
15
|
+
runtime: new lambda.Runtime('nodejs16.x', lambda.RuntimeFamily.NODEJS),
|
|
16
16
|
handler: 'index.handler',
|
|
17
17
|
code: lambda.Code.fromAsset(path.join(__dirname, '../../assets/lambdas/build-image.lambda')),
|
|
18
18
|
});
|
|
@@ -20,4 +20,4 @@ class BuildImageFunction extends lambda.Function {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
exports.BuildImageFunction = BuildImageFunction;
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQtaW1hZ2UtZnVuY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbGFtYmRhcy9idWlsZC1pbWFnZS1mdW5jdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2RUFBNkU7QUFDN0UsNkJBQTZCO0FBQzdCLGlEQUFpRDtBQVNqRDs7R0FFRztBQUNILE1BQWEsa0JBQW1CLFNBQVEsTUFBTSxDQUFDLFFBQVE7SUFDckQsWUFBWSxLQUFnQixFQUFFLEVBQVUsRUFBRSxLQUErQjtRQUN2RSxLQUFLLENBQUMsS0FBSyxFQUFFLEVBQUUsRUFBRTtZQUNmLFdBQVcsRUFBRSxtQ0FBbUM7WUFDaEQsR0FBRyxLQUFLO1lBQ1IsT0FBTyxFQUFFLElBQUksTUFBTSxDQUFDLE9BQU8sQ0FBQyxZQUFZLEVBQUUsTUFBTSxDQUFDLGFBQWEsQ0FBQyxNQUFNLENBQUM7WUFDdEUsT0FBTyxFQUFFLGVBQWU7WUFDeEIsSUFBSSxFQUFFLE1BQU0sQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxFQUFFLHlDQUF5QyxDQUFDLENBQUM7U0FDN0YsQ0FBQyxDQUFDO1FBQ0gsSUFBSSxDQUFDLGNBQWMsQ0FBQyxxQ0FBcUMsRUFBRSxHQUFHLEVBQUUsRUFBRSxZQUFZLEVBQUUsSUFBSSxFQUFFLENBQUMsQ0FBQztJQUMxRixDQUFDO0NBQ0Y7QUFYR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