Skip to content

Commit ef99e22

Browse files
authored
Merge pull request #2601 from philips-labs/develop
chore: Release
2 parents 99e4650 + 505adf3 commit ef99e22

File tree

19 files changed

+3516
-3813
lines changed

19 files changed

+3516
-3813
lines changed

.github/workflows/auto-approve-dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ jobs:
1414
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: hmarr/auto-approve-action@v2.4.0
17+
- uses: hmarr/auto-approve-action@v3.1.0
1818
with:
1919
github-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
id: lambda
2121
env:
2222
LAMBDA: ${{ matrix.lambda }}
23-
run: echo ::set-output name=name::${LAMBDA##*/}
23+
run: echo "name=${LAMBDA##*/}" >> $GITHUB_OUTPUT
2424
- uses: actions/checkout@v3
2525
- name: Add zip
2626
run: apt update && apt install zip

.github/workflows/semantic-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v3
2020

21-
- uses: amannn/action-semantic-pull-request@v4
21+
- uses: amannn/action-semantic-pull-request@v5
2222
name: Check PR for Semantic Commit Message
2323
env:
2424
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ export interface GithubWorkflowEvent {
329329
This extendible format allows to add more fields to be added if needed.
330330
You can configure the queue by setting properties to `workflow_job_events_queue_config`
331331

332+
NOTE: By default, a runner AMI update requires a re-apply of this terraform config (the runner AMI ID is looked up by a terraform data source). To avoid this, you can use `ami_id_ssm_parameter_name` to have the scale-up lambda dynamically lookup the runner AMI ID from an SSM parameter at instance launch time. Said SSM parameter is managed outside of this module (e.g. by a runner AMI build workflow).
333+
332334
## Examples
333335

334336
Examples are located in the [examples](./examples) directory. The following examples are provided:
@@ -419,6 +421,7 @@ We welcome any improvement to the standard module to make the default as secure
419421
|------|-------------|------|---------|:--------:|
420422
| <a name="input_ami_filter"></a> [ami\_filter](#input\_ami\_filter) | List of maps used to create the AMI filter for the action runner AMI. By default amazon linux 2 is used. | `map(list(string))` | `null` | no |
421423
| <a name="input_ami_owners"></a> [ami\_owners](#input\_ami\_owners) | The list of owners used to select the AMI of action runner instances. | `list(string)` | <pre>[<br> "amazon"<br>]</pre> | no |
424+
| <a name="input_ami_id_ssm_parameter_name"></a> [ami\_id\_ssm\_parameter\_name](#input\_ami\_id\_ssm\_parameter\_name) | Optional SSM parameter that contains the runner AMI ID to launch instances from. Overrides `ami_filter`. The parameter value is managed outside of this module (e.g. in a runner AMI build workflow). This allows for AMI updates without having to re-apply this terraform config. | `string` | `null` | no |
422425
| <a name="input_aws_partition"></a> [aws\_partition](#input\_aws\_partition) | (optiona) partition in the arn namespace to use if not 'aws' | `string` | `"aws"` | no |
423426
| <a name="input_aws_region"></a> [aws\_region](#input\_aws\_region) | AWS region. | `string` | n/a | yes |
424427
| <a name="input_block_device_mappings"></a> [block\_device\_mappings](#input\_block\_device\_mappings) | The EC2 instance block device configuration. Takes the following keys: `device_name`, `delete_on_termination`, `volume_type`, `volume_size`, `encrypted`, `iops`, `throughput`, `kms_key_id`, `snapshot_id`. | <pre>list(object({<br> delete_on_termination = bool<br> device_name = string<br> encrypted = bool<br> iops = number<br> kms_key_id = string<br> snapshot_id = string<br> throughput = number<br> volume_size = number<br> volume_type = string<br> }))</pre> | <pre>[<br> {<br> "delete_on_termination": true,<br> "device_name": "/dev/xvda",<br> "encrypted": true,<br> "iops": null,<br> "kms_key_id": null,<br> "snapshot_id": null,<br> "throughput": null,<br> "volume_size": 30,<br> "volume_type": "gp3"<br> }<br>]</pre> | no |

examples/prebuilt/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ module "runners" {
4545
ami_filter = { name = [var.ami_name_filter] }
4646
ami_owners = [data.aws_caller_identity.current.account_id]
4747

48+
# Look up runner AMI ID from an AWS SSM parameter (overrides ami_filter at instance launch time)
49+
# NOTE: the parameter must be managed outside of this module (e.g. in a runner AMI build workflow)
50+
# ami_id_ssm_parameter_name = "my-runner-ami-id"
51+
4852
# disable binary syncer since github agent is already installed in the AMI.
4953
enable_runner_binaries_syncer = false
5054

main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,10 @@ module "runners" {
178178
instance_max_spot_price = var.instance_max_spot_price
179179
block_device_mappings = var.block_device_mappings
180180

181-
runner_architecture = var.runner_architecture
182-
ami_filter = var.ami_filter
183-
ami_owners = var.ami_owners
181+
runner_architecture = var.runner_architecture
182+
ami_filter = var.ami_filter
183+
ami_owners = var.ami_owners
184+
ami_id_ssm_parameter_name = var.ami_id_ssm_parameter_name
184185

185186
sqs_build_queue = aws_sqs_queue.queued_builds
186187
github_app_parameters = local.github_app_parameters

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@
1515
"format-check": "prettier --check \"**/*.ts\""
1616
},
1717
"devDependencies": {
18-
"@octokit/rest": "^19.0.4",
19-
"@trivago/prettier-plugin-sort-imports": "^3.3.0",
20-
"@types/jest": "^27.5.0",
21-
"@types/node": "^18.8.4",
18+
"@octokit/rest": "^19.0.5",
19+
"@trivago/prettier-plugin-sort-imports": "^3.4.0",
20+
"@types/jest": "^29.1.2",
21+
"@types/node": "^18.11.8",
2222
"@types/request": "^2.48.8",
2323
"@typescript-eslint/eslint-plugin": "^4.33.0",
2424
"@typescript-eslint/parser": "^4.33.0",
2525
"@vercel/ncc": "^0.34.0",
26-
"aws-sdk": "^2.1231.0",
26+
"aws-sdk": "^2.1243.0",
2727
"eslint": "^7.32.0",
2828
"eslint-plugin-prettier": "4.2.1",
29-
"jest": "^29.1",
30-
"jest-mock": "^29.1.2",
29+
"jest": "^29.2",
30+
"jest-mock": "^29.2.1",
3131
"prettier": "2.7.1",
3232
"ts-jest": "^29.0.3",
3333
"ts-node-dev": "^2.0.0",
3434
"typescript": "^4.8.4"
3535
},
3636
"dependencies": {
37-
"axios": "^1.1.2",
37+
"axios": "^1.1.3",
3838
"tslog": "^3.3.4"
3939
}
4040
}

0 commit comments

Comments
 (0)