Skip to content

Commit 4cac7ff

Browse files
committed
Merge branch 'release/0.4.0'
2 parents 74533c8 + 3c611d1 commit 4cac7ff

File tree

24 files changed

+560
-198
lines changed

24 files changed

+560
-198
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.4.0] - 2020-08-10
11+
12+
### Added
13+
14+
- feat: idle runners #113
15+
1016
## [0.3.0] - 2020-08-06
1117

1218
### Added
@@ -44,7 +50,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4450

4551
- First release.
4652

47-
[unreleased]: https://github.com/philips-labs/terraform-aws-github-runner/compare/v0.3.0..HEAD
53+
[unreleased]: https://github.com/philips-labs/terraform-aws-github-runner/compare/v0.4.0..HEAD
54+
[0.4.0]: https://github.com/philips-labs/terraform-aws-github-runner/releases/tag/v0.3.0..v0.4.0
4855
[0.3.0]: https://github.com/philips-labs/terraform-aws-github-runner/releases/tag/v0.2.0..v0.3.0
4956
[0.2.0]: https://github.com/philips-labs/terraform-aws-github-runner/releases/tag/v0.1.0..v0.2.0
5057
[0.1.0]: https://github.com/philips-labs/terraform-aws-github-runner/releases/tag/v0.0.1..v0.1.0

README.md

Lines changed: 93 additions & 44 deletions
Large diffs are not rendered by default.

examples/default/lambdas-download/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ module "lambdas" {
33
lambdas = [
44
{
55
name = "webhook"
6-
tag = "v0.2.0"
6+
tag = "v0.3.0"
77
},
88
{
99
name = "runners"
10-
tag = "v0.2.0"
10+
tag = "v0.3.0"
1111
},
1212
{
1313
name = "runner-binaries-syncer"
14-
tag = "v0.2.0"
14+
tag = "v0.3.0"
1515
}
1616
]
1717
}

examples/default/main.tf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@ module "runners" {
3333
enable_organization_runners = false
3434
runner_extra_labels = "default,example"
3535

36-
# instance_type = "a1.large"
36+
# Uncommet idle config to have idle runners from 9 to 5 in time zone Amsterdam
37+
# idle_config = [{
38+
# cron = "* * 9-17 * * *"
39+
# timeZone = "Europe/Amsterdam"
40+
# idleCount = 1
41+
# }]
3742

3843
# disable KMS and encryption
39-
# encrypt_secrets = true
44+
# encrypt_secrets = false
4045
}

examples/permissions-boundary/lambdas-download/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ module "lambdas" {
33
lambdas = [
44
{
55
name = "webhook"
6-
tag = "v0.2.0"
6+
tag = "v0.3.0"
77
},
88
{
99
name = "runners"
10-
tag = "v0.2.0"
10+
tag = "v0.3.0"
1111
},
1212
{
1313
name = "runner-binaries-syncer"
14-
tag = "v0.2.0"
14+
tag = "v0.3.0"
1515
}
1616
]
1717
}

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ module "runners" {
7474
runner_extra_labels = var.runner_extra_labels
7575
runner_as_root = var.runner_as_root
7676
runners_maximum_count = var.runners_maximum_count
77+
idle_config = var.idle_config
7778

7879
lambda_zip = var.runners_lambda_zip
7980
lambda_timeout_scale_up = var.runners_scale_up_lambda_timeout
@@ -101,7 +102,6 @@ module "runner_binaries" {
101102
lambda_zip = var.runner_binaries_syncer_lambda_zip
102103
lambda_timeout = var.runner_binaries_syncer_lambda_timeout
103104

104-
105105
role_path = var.role_path
106106
role_permissions_boundary = var.role_permissions_boundary
107107
}

modules/download-lambda/README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,33 @@ module "lambdas" {
1010
lambdas = [
1111
{
1212
name = "webhook"
13-
tag = "v0.2.0"
13+
tag = "v0.3.0"
1414
},
1515
{
1616
name = "runners"
17-
tag = "v0.2.0"
17+
tag = "v0.3.0"
1818
},
1919
{
2020
name = "runner-binaries-syncer"
21-
tag = "v0.2.0"
21+
tag = "v0.3.0"
2222
}
2323
]
2424
}
2525
```
2626

2727
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
28+
2829
## Inputs
2930

30-
| Name | Description | Type | Default | Required |
31-
|------|-------------|:----:|:-----:|:-----:|
32-
| lambdas | Name and tag for lambdas to download. | object | n/a | yes |
31+
| Name | Description | Type | Default | Required |
32+
| ------- | ------------------------------------- | :----: | :-----: | :------: |
33+
| lambdas | Name and tag for lambdas to download. | object | n/a | yes |
3334

3435
## Outputs
3536

36-
| Name | Description |
37-
|------|-------------|
38-
| files | |
37+
| Name | Description |
38+
| ----- | ----------- |
39+
| files | |
3940

4041
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
4142

modules/runner-binaries-syncer/README.md

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,39 @@ yarn run dist
3434
```
3535

3636
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
37+
## Requirements
38+
39+
No requirements.
40+
41+
## Providers
42+
43+
| Name | Version |
44+
|------|---------|
45+
| aws | n/a |
46+
3747
## Inputs
3848

3949
| Name | Description | Type | Default | Required |
40-
|------|-------------|:----:|:-----:|:-----:|
41-
| aws\_region | AWS region. | string | n/a | yes |
42-
| distribution\_bucket\_name | Bucket for storing the action runner distribution. | string | n/a | yes |
43-
| environment | A name that identifies the environment, used as prefix and for tagging. | string | n/a | yes |
44-
| lambda\_schedule\_expression | Scheduler expression for action runner binary syncer. | string | `"cron(27 * * * ? *)"` | no |
45-
| lambda\_timeout | Time out of the lambda in seconds. | number | `"300"` | no |
46-
| lambda\_zip | File location of the lambda zip file. | string | `"null"` | no |
47-
| role\_path | The path that will be added to the role, if not set the environment name will be used. | string | `"null"` | no |
48-
| role\_permissions\_boundary | Permissions boundary that will be added to the created role for the lambda. | string | `"null"` | no |
49-
| runner\_architecture | The platform architecture for the runner instance \(x64, arm64\), defaults to 'x64' | string | `"x64"` | no |
50-
| tags | Map of tags that will be added to created resources. By default resources will be tagged with name and environment. | map(string) | `{}` | no |
50+
|------|-------------|------|---------|:--------:|
51+
| aws\_region | AWS region. | `string` | n/a | yes |
52+
| distribution\_bucket\_name | Bucket for storing the action runner distribution. | `string` | n/a | yes |
53+
| environment | A name that identifies the environment, used as prefix and for tagging. | `string` | n/a | yes |
54+
| lambda\_schedule\_expression | Scheduler expression for action runner binary syncer. | `string` | `"cron(27 * * * ? *)"` | no |
55+
| lambda\_timeout | Time out of the lambda in seconds. | `number` | `300` | no |
56+
| lambda\_zip | File location of the lambda zip file. | `string` | `null` | no |
57+
| role\_path | The path that will be added to the role, if not set the environment name will be used. | `string` | `null` | no |
58+
| role\_permissions\_boundary | Permissions boundary that will be added to the created role for the lambda. | `string` | `null` | no |
59+
| runner\_architecture | The platform architecture for the runner instance (x64, arm64), defaults to 'x64' | `string` | `"x64"` | no |
60+
| tags | Map of tags that will be added to created resources. By default resources will be tagged with name and environment. | `map(string)` | `{}` | no |
5161

5262
## Outputs
5363

5464
| Name | Description |
5565
|------|-------------|
56-
| bucket | |
57-
| lambda | |
58-
| lambda\_role | |
59-
| runner\_distribution\_object\_key | |
66+
| bucket | n/a |
67+
| lambda | n/a |
68+
| lambda\_role | n/a |
69+
| runner\_distribution\_object\_key | n/a |
6070

6171
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
6272

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
},
1515
"devDependencies": {
1616
"@octokit/rest": "^18.0.3",
17-
"@types/jest": "^26.0.4",
17+
"@types/jest": "^26.0.9",
1818
"@types/node": "^14.0.27",
1919
"@types/request": "^2.48.4",
2020
"@typescript-eslint/eslint-plugin": "^2.30.0",
2121
"@typescript-eslint/parser": "^2.30.0",
2222
"@zeit/ncc": "^0.22.1",
23-
"aws-sdk": "^2.725.0",
23+
"aws-sdk": "^2.729.0",
2424
"eslint": "^6.8.0",
2525
"jest": "^26.1.0",
2626
"ts-jest": "^26.1.2",

modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -654,10 +654,10 @@
654654
"@types/istanbul-lib-coverage" "*"
655655
"@types/istanbul-lib-report" "*"
656656

657-
"@types/jest@^26.0.4":
658-
version "26.0.8"
659-
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.8.tgz#f5c5559cf25911ce227f7ce30f1f160f24966369"
660-
integrity sha512-eo3VX9jGASSuv680D4VQ89UmuLZneNxv2MCZjfwlInav05zXVJTzfc//lavdV0GPwSxsXJTy2jALscB7Acqg0g==
657+
"@types/jest@^26.0.9":
658+
version "26.0.9"
659+
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.9.tgz#0543b57da5f0cd949c5f423a00c56c492289c989"
660+
integrity sha512-k4qFfJ5AUKrWok5KYXp2EPm89b0P/KZpl7Vg4XuOTVVQEhLDBDBU3iBFrjjdgd8fLw96aAtmnwhXHl63bWeBQQ==
661661
dependencies:
662662
jest-diff "^25.2.1"
663663
pretty-format "^25.2.1"
@@ -927,10 +927,10 @@ atob@^2.1.2:
927927
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
928928
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
929929

930-
aws-sdk@^2.725.0:
931-
version "2.725.0"
932-
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.725.0.tgz#287ef3b55aa66f10c88671ec62300e96015aaf6a"
933-
integrity sha512-Qd/MlxfQC9NpTxFUQ7u2BdsjiwNtbn5oVp04NPfXEc0xyT216TtcIs+jNyiJ9WaH7AgkHouU1BbBcReO8byYzg==
930+
aws-sdk@^2.729.0:
931+
version "2.729.0"
932+
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.729.0.tgz#3d850f7825b94b5d8b2aca58ec096973bc4c7e34"
933+
integrity sha512-x5q/+9wM37tBYCmYNGMj+aU9qeXqhbUH0Dz3wlSpAW55+N4NwlBbpqhyCV3oF9bePEJtEnxLGWNXpb9BNWNhew==
934934
dependencies:
935935
buffer "4.9.2"
936936
events "1.1.1"

0 commit comments

Comments
 (0)