-
-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathapp.py
More file actions
33 lines (25 loc) · 989 Bytes
/
app.py
File metadata and controls
33 lines (25 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env python3
"""
Simple example using CodeBuild provider for GitHub self-hosted runners.
This example creates a basic GitHub runners setup with just a CodeBuild provider.
It's the simplest way to get started with self-hosted runners.
"""
import aws_cdk as cdk
from aws_cdk import Stack
from cloudsnorkel.cdk_github_runners import GitHubRunners, CodeBuildRunnerProvider
class SimpleCodeBuildStack(Stack):
def __init__(self, scope, construct_id, **kwargs):
super().__init__(scope, construct_id, **kwargs)
# Create a CodeBuild provider with default settings
codebuild_provider = CodeBuildRunnerProvider(
self, "CodeBuildProvider",
labels=["codebuild", "linux", "x64"]
)
# Create the GitHub runners infrastructure
GitHubRunners(
self, "GitHubRunners",
providers=[codebuild_provider]
)
app = cdk.App()
SimpleCodeBuildStack(app, "simple-codebuild-example")
app.synth()