Skip to content

Commit 5160065

Browse files
authored
Merge pull request #1768 from philips-labs/develop
Release
2 parents a73ceb6 + 8f50ebc commit 5160065

File tree

16 files changed

+708
-633
lines changed

16 files changed

+708
-633
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292

9393
steps:
9494
- name: Generate provenance for release
95-
uses: philips-labs/slsa-provenance-action@v0.6.0
95+
uses: philips-labs/slsa-provenance-action@v0.7.0
9696
with:
9797
artifact_path: release-assets
9898
output_path: 'build.provenance'

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The moment a GitHub action workflow requiring a `self-hosted` runner is triggere
5353

5454
For receiving the `check_run` or `workflow_job` event by the webhook (lambda), a webhook needs to be created in GitHub. The `workflow_job` is the preferred option, and the `check_run` option will be maintained for backward compatibility. The advantage of the `workflow_job` event is that the runner checks if the received event can run on the configured runners by matching the labels, which avoid instances being scaled up and never used. The following options are available:
5555

56-
- `workflow_job`: **(preferred option)** create a webhook on enterprise, org or app level.
56+
- `workflow_job`: **(preferred option)** create a webhook on enterprise, org or app level. Select this option for ephemeral runners.
5757
- `check_run`: create a webhook on enterprise, org, repo or app level. When using the app option, the app needs to be installed to repo's are using the self-hosted runners.
5858
- a Webhook needs to be created. The webhook hook can be defined on enterprise, org, repo, or app level.
5959

@@ -402,6 +402,7 @@ In case the setup does not work as intended follow the trace of events:
402402
| <a name="input_delay_webhook_event"></a> [delay\_webhook\_event](#input\_delay\_webhook\_event) | The number of seconds the event accepted by the webhook is invisible on the queue before the scale up lambda will receive the event. | `number` | `30` | no |
403403
| <a name="input_enable_cloudwatch_agent"></a> [enable\_cloudwatch\_agent](#input\_enable\_cloudwatch\_agent) | Enabling the cloudwatch agent on the ec2 runner instances, the runner contains default config. Configuration can be overridden via `cloudwatch_config`. | `bool` | `true` | no |
404404
| <a name="input_enable_ephemeral_runners"></a> [enable\_ephemeral\_runners](#input\_enable\_ephemeral\_runners) | Enable ephemeral runners, runners will only be used once. | `bool` | `false` | no |
405+
| <a name="input_enable_managed_runner_security_group"></a> [enable\_managed\_runner\_security\_group](#inputenable\_managed\_runner\_security\_group) | Enabling the default managed security group creation. Unmanaged security groups can be specified via `runner_additional_security_group_ids`. | `bool` | `true` | no |
405406
| <a name="input_enable_organization_runners"></a> [enable\_organization\_runners](#input\_enable\_organization\_runners) | Register runners to organization, instead of repo level | `bool` | `false` | no |
406407
| <a name="input_enable_ssm_on_runners"></a> [enable\_ssm\_on\_runners](#input\_enable\_ssm\_on\_runners) | Enable to allow access the runner instances for debugging purposes via SSM. Note that this adds additional permissions to the runner instances. | `bool` | `false` | no |
407408
| <a name="input_enabled_userdata"></a> [enabled\_userdata](#input\_enabled\_userdata) | Should the userdata script be enabled for the runner. Set this to false if you are using your own prebuilt AMI | `bool` | `true` | no |

images/linux-amzn2/github_agent.linux.pkr.hcl

+11-4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ variable "root_volume_size_gb" {
4242
default = 8
4343
}
4444

45+
variable "ebs_delete_on_termination" {
46+
description = "Indicates whether the EBS volume is deleted on instance termination."
47+
type = bool
48+
default = true
49+
}
50+
4551
variable "global_tags" {
4652
description = "Tags to apply to everything"
4753
type = map(string)
@@ -91,9 +97,10 @@ source "amazon-ebs" "githubrunner" {
9197

9298

9399
launch_block_device_mappings {
94-
device_name = "/dev/xvda"
95-
volume_size = "${var.root_volume_size_gb}"
96-
volume_type = "gp3"
100+
device_name = "/dev/xvda"
101+
volume_size = "${var.root_volume_size_gb}"
102+
volume_type = "gp3"
103+
delete_on_termination = "${var.ebs_delete_on_termination}"
97104
}
98105
}
99106

@@ -151,4 +158,4 @@ build {
151158
]
152159
}
153160

154-
}
161+
}

images/ubuntu-focal/github_agent.ubuntu.pkr.hcl

+11-4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ variable "root_volume_size_gb" {
4242
default = 8
4343
}
4444

45+
variable "ebs_delete_on_termination" {
46+
description = "Indicates whether the EBS volume is deleted on instance termination."
47+
type = bool
48+
default = true
49+
}
50+
4551
variable "global_tags" {
4652
description = "Tags to apply to everything"
4753
type = map(string)
@@ -90,9 +96,10 @@ source "amazon-ebs" "githubrunner" {
9096
)
9197

9298
launch_block_device_mappings {
93-
device_name = "/dev/sda1"
94-
volume_size = "${var.root_volume_size_gb}"
95-
volume_type = "gp3"
99+
device_name = "/dev/sda1"
100+
volume_size = "${var.root_volume_size_gb}"
101+
volume_type = "gp3"
102+
delete_on_termination = "${var.ebs_delete_on_termination}"
96103
}
97104
}
98105

@@ -161,4 +168,4 @@ build {
161168
]
162169
}
163170

164-
}
171+
}

images/windows-core-2019/github_agent.windows.pkr.hcl

+12-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ variable "region" {
1919
default = "eu-west-1"
2020
}
2121

22+
variable "ebs_delete_on_termination" {
23+
description = "Indicates whether the EBS volume is deleted on instance termination."
24+
type = bool
25+
default = true
26+
}
27+
2228
source "amazon-ebs" "githubrunner" {
2329
ami_name = "github-runner-windows-core-2019-${formatdate("YYYYMMDDhhmm", timestamp())}"
2430
communicator = "winrm"
@@ -43,6 +49,11 @@ source "amazon-ebs" "githubrunner" {
4349
winrm_port = 5986
4450
winrm_use_ssl = true
4551
winrm_username = "Administrator"
52+
53+
launch_block_device_mappings {
54+
device_name = "/dev/sda1"
55+
delete_on_termination = "${var.ebs_delete_on_termination}"
56+
}
4657
}
4758

4859
build {
@@ -63,4 +74,4 @@ build {
6374
action_runner_url = var.action_runner_url
6475
})]
6576
}
66-
}
77+
}

main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ module "runners" {
107107
github_app_parameters = local.github_app_parameters
108108
enable_organization_runners = var.enable_organization_runners
109109
enable_ephemeral_runners = var.enable_ephemeral_runners
110+
enable_managed_runner_security_group = var.enable_managed_runner_security_group
110111
scale_down_schedule_expression = var.scale_down_schedule_expression
111112
minimum_running_time_in_minutes = var.minimum_running_time_in_minutes
112113
runner_boot_time_in_minutes = var.runner_boot_time_in_minutes

modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@
1818
"@octokit/rest": "^18.12.0",
1919
"@trivago/prettier-plugin-sort-imports": "^3.2.0",
2020
"@types/jest": "^27.4.0",
21-
"@types/node": "^17.0.17",
21+
"@types/node": "^17.0.18",
2222
"@types/request": "^2.48.8",
2323
"@typescript-eslint/eslint-plugin": "^4.33.0",
2424
"@typescript-eslint/parser": "^4.33.0",
25-
"@vercel/ncc": "^0.33.1",
26-
"aws-sdk": "^2.1072.0",
25+
"@vercel/ncc": "^0.33.3",
26+
"aws-sdk": "^2.1075.0",
2727
"eslint": "^7.32.0",
2828
"eslint-plugin-prettier": "4.0.0",
29-
"jest": "^27.5.0",
29+
"jest": "^27.5.1",
3030
"jest-mock": "^27.5.1",
3131
"prettier": "2.5.1",
3232
"ts-jest": "^27.1.3",
3333
"ts-node-dev": "^1.1.6",
3434
"typescript": "^4.5.5"
3535
},
3636
"dependencies": {
37-
"axios": "^0.25.0",
38-
"tslog": "^3.3.1"
37+
"axios": "^0.26.0",
38+
"tslog": "^3.3.2"
3939
}
4040
}

0 commit comments

Comments
 (0)