Skip to content

Commit bc8ff14

Browse files
authored
Merge pull request #1626 from philips-labs/develop
Release
2 parents 09a1d93 + 56c1ece commit bc8ff14

File tree

26 files changed

+703
-459
lines changed

26 files changed

+703
-459
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- master
77
- develop
8+
workflow_dispatch:
89

910
jobs:
1011
prepare:

.release/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
},
77
"author": "Niek Palm",
88
"devDependencies": {
9-
"@semantic-release/changelog": "^5.0.1",
10-
"@semantic-release/commit-analyzer": "^8.0.1",
11-
"@semantic-release/exec": "^5.0.0",
12-
"@semantic-release/git": "^9.0.0",
13-
"@semantic-release/github": "^7.2.0",
14-
"@semantic-release/release-notes-generator": "^9.0.1",
15-
"conventional-changelog-conventionalcommits": "^4.5.0",
16-
"semantic-release": "^17.3.9"
9+
"@semantic-release/changelog": "^6.0.1",
10+
"@semantic-release/commit-analyzer": "^9.0.2",
11+
"@semantic-release/exec": "^6.0.3",
12+
"@semantic-release/git": "^10.0.1",
13+
"@semantic-release/github": "^8.0.2",
14+
"@semantic-release/release-notes-generator": "^10.0.3",
15+
"conventional-changelog-conventionalcommits": "^4.6.3",
16+
"semantic-release": "^18.0.1"
1717
}
1818
}

.release/yarn.lock

Lines changed: 257 additions & 242 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,6 @@ This module is part of the Philips Forest.
509509
510510
```
511511
512-
Talk to the forestkeepers in the `forest`-channel on Slack.
512+
Talk to the forestkeepers in the `runners`-channel on Slack.
513513
514514
[![Slack](https://img.shields.io/badge/Slack-4A154B?style=for-the-badge&logo=slack&logoColor=white)](https://join.slack.com/t/philips-software/shared_invite/zt-xecw65v5-i1531hGP~mdVwgxLFx7ckg)

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

Lines changed: 63 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ packer {
77
}
88
}
99

10-
variable "action_runner_url" {
11-
description = "The URL to the tarball of the action runner"
10+
variable "runner_version" {
11+
description = "The version (no v prefix) of the runner software to install https://github.com/actions/runner/releases"
1212
type = string
13-
default = "https://github.com/actions/runner/releases/download/v2.284.0/actions-runner-linux-x64-2.284.0.tar.gz"
13+
default = "2.286.0"
1414
}
1515

1616
variable "region" {
@@ -19,10 +19,41 @@ variable "region" {
1919
default = "eu-west-1"
2020
}
2121

22+
variable "security_group_id" {
23+
description = "The ID of the security group Packer will associate with the builder to enable access"
24+
type = string
25+
default = null
26+
}
27+
28+
variable "subnet_id" {
29+
description = "If using VPC, the ID of the subnet, such as subnet-12345def, where Packer will launch the EC2 instance. This field is required if you are using an non-default VPC"
30+
type = string
31+
default = null
32+
}
33+
34+
variable "instance_type" {
35+
description = "The instance type Packer will use for the builder"
36+
type = string
37+
default = "m3.medium"
38+
}
39+
40+
variable "root_volume_size_gb" {
41+
type = number
42+
default = 8
43+
}
44+
45+
variable "tags" {
46+
description = "Additional tags to add globally"
47+
type = map(string)
48+
default = {}
49+
}
50+
2251
source "amazon-ebs" "githubrunner" {
23-
ami_name = "github-runner-amzn2-x86_64-${formatdate("YYYYMMDDhhmm", timestamp())}"
24-
instance_type = "m3.medium"
25-
region = var.region
52+
ami_name = "github-runner-amzn2-x86_64-${formatdate("YYYYMMDDhhmm", timestamp())}"
53+
instance_type = var.instance_type
54+
region = var.region
55+
security_group_id = var.security_group_id
56+
subnet_id = var.subnet_id
2657
source_ami_filter {
2758
filters = {
2859
name = "amzn2-ami-hvm-2.*-x86_64-ebs"
@@ -33,10 +64,18 @@ source "amazon-ebs" "githubrunner" {
3364
owners = ["137112412989"]
3465
}
3566
ssh_username = "ec2-user"
36-
tags = {
37-
OS_Version = "amzn2"
38-
Release = "Latest"
39-
Base_AMI_Name = "{{ .SourceAMIName }}"
67+
tags = merge(
68+
var.tags,
69+
{
70+
OS_Version = "amzn2"
71+
Release = "Latest"
72+
Base_AMI_Name = "{{ .SourceAMIName }}"
73+
})
74+
75+
launch_block_device_mappings {
76+
device_name = "/dev/xvda"
77+
volume_size = "${var.root_volume_size_gb}"
78+
volume_type = "gp3"
4079
}
4180
}
4281

@@ -58,16 +97,24 @@ build {
5897
]
5998
}
6099

61-
provisioner "shell" {
62-
environment_vars = [
63-
"RUNNER_TARBALL_URL=${var.action_runner_url}"
64-
]
65-
inline = [templatefile("../install-runner.sh", {
100+
provisioner "file" {
101+
content = templatefile("../install-runner.sh", {
66102
install_runner = templatefile("../../modules/runners/templates/install-runner.sh", {
67103
ARM_PATCH = ""
68104
S3_LOCATION_RUNNER_DISTRIBUTION = ""
69105
})
70-
})]
106+
})
107+
destination = "/tmp/install-runner.sh"
108+
}
109+
110+
provisioner "shell" {
111+
environment_vars = [
112+
"RUNNER_TARBALL_URL=https://github.com/actions/runner/releases/download/v${var.runner_version}/actions-runner-linux-x64-${var.runner_version}.tar.gz"
113+
]
114+
inline = [
115+
"sudo chmod +x /tmp/install-runner.sh",
116+
"sudo RUNNER_TARBALL_URL=$RUNNER_TARBALL_URL /tmp/install-runner.sh"
117+
]
71118
}
72119

73120
provisioner "file" {

modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/.prettierrc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,10 @@
33
"singleQuote": true,
44
"trailingComma": "all",
55
"semi": true,
6-
}
7-
6+
"importOrderSeparation": true,
7+
"importOrderSortSpecifiers": true,
8+
"importOrder": [
9+
"<THIRD_PARTY_MODULES>",
10+
"^[./]"
11+
]
12+
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
},
1717
"devDependencies": {
1818
"@octokit/rest": "^18.12.0",
19+
"@trivago/prettier-plugin-sort-imports": "^3.1.1",
1920
"@types/jest": "^27.4.0",
2021
"@types/node": "^17.0.8",
2122
"@types/request": "^2.48.8",
@@ -36,4 +37,4 @@
3637
"axios": "^0.24.0",
3738
"tslog": "^3.3.1"
3839
}
39-
}
40+
}

modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/lambda.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { sync } from './syncer/syncer';
2-
import { handler } from './lambda';
31
import { mocked } from 'jest-mock';
42

3+
import { handler } from './lambda';
4+
import { sync } from './syncer/syncer';
5+
56
jest.mock('./syncer/syncer');
67

78
describe('Test download sync wrapper.', () => {

modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/lambda.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { sync } from './syncer/syncer';
21
import { logger } from './syncer/logger';
2+
import { sync } from './syncer/syncer';
33

44
// eslint-disable-next-line
55
export async function handler(event: any, context: any): Promise<void> {

modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/local.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { sync } from './syncer/syncer';
21
import { logger } from './syncer/logger';
2+
import { sync } from './syncer/syncer';
33

44
sync()
55
.then()

0 commit comments

Comments
 (0)