Skip to content

chore: Release #2499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
22e7b51
chore: Bump @types/node from 18.7.18 to 18.8.0 in /modules/runners/la…
dependabot[bot] Oct 5, 2022
ca3ece0
chore: Bump @aws-sdk/client-ssm from 3.171.0 to 3.183.0 in /modules/r…
dependabot[bot] Oct 5, 2022
a737db6
chore: Bump @aws-sdk/client-ssm from 3.171.0 to 3.183.0 in /modules/w…
dependabot[bot] Oct 5, 2022
3c3ba1d
chore: Bump @types/node from 18.7.18 to 18.8.2 in /modules/webhook/la…
dependabot[bot] Oct 5, 2022
86c0c89
chore: Bump @octokit/webhooks from 10.1.5 to 10.2.0 in /modules/webho…
dependabot[bot] Oct 5, 2022
3f0146e
chore: Bump typescript from 4.8.3 to 4.8.4 in /modules/webhook/lambda…
dependabot[bot] Oct 5, 2022
bd28c7d
chore: Bump @types/node from 18.7.18 to 18.8.2 in /modules/runner-bin…
dependabot[bot] Oct 5, 2022
38642fc
chore: Bump jest-mock from 29.0.3 to 29.1.2 in /modules/webhook/lambd…
dependabot[bot] Oct 5, 2022
85d3a06
chore: Bump @octokit/auth-app from 4.0.5 to 4.0.6 in /modules/runners…
dependabot[bot] Oct 5, 2022
dbfa837
chore: Bump jest-mock from 29.0.3 to 29.1.2 in /modules/runners/lambd…
dependabot[bot] Oct 5, 2022
306ec6a
chore: Bump typescript from 4.8.3 to 4.8.4 in /modules/runners/lambda…
dependabot[bot] Oct 5, 2022
d0c46da
chore: Bump aws-sdk from 2.1221.0 to 2.1229.0 in /modules/runners/lam…
dependabot[bot] Oct 5, 2022
a970eeb
chore: Bump @octokit/types from 7.5.0 to 7.5.1 in /modules/runners/la…
dependabot[bot] Oct 5, 2022
8dc01f1
chore: Bump aws-sdk from 2.1220.0 to 2.1229.0 in /modules/webhook/lam…
dependabot[bot] Oct 5, 2022
56bc738
chore: Bump jest-mock from 29.0.3 to 29.1.2 in /modules/runner-binari…
dependabot[bot] Oct 5, 2022
c16e209
chore: Bump typescript from 4.8.3 to 4.8.4 in /modules/runner-binarie…
dependabot[bot] Oct 5, 2022
9c2fc3a
chore: Bump @types/aws-lambda from 8.10.104 to 8.10.106 in /modules/w…
dependabot[bot] Oct 5, 2022
7c6d4bd
chore: Bump aws-sdk from 2.1219.0 to 2.1230.0 in /modules/runner-bina…
dependabot[bot] Oct 5, 2022
9e146c1
chore: Bump @types/node from 18.8.0 to 18.8.2 in /modules/runners/lam…
dependabot[bot] Oct 5, 2022
f15d4f6
chore: Bump @types/aws-lambda from 8.10.104 to 8.10.106 in /modules/r…
dependabot[bot] Oct 6, 2022
5c0744e
chore: Bump actions/stale from 5 to 6 (#2461)
dependabot[bot] Oct 6, 2022
69578e0
feat: Support s3 bucket logging for distribution cache bucket (#2430)
AldinDuraki Oct 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5
- uses: actions/stale@v6
with:
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ In case the setup does not work as intended follow the trace of events:
| <a name="input_runner_architecture"></a> [runner\_architecture](#input\_runner\_architecture) | The platform architecture of the runner instance\_type. | `string` | `"x64"` | no |
| <a name="input_runner_as_root"></a> [runner\_as\_root](#input\_runner\_as\_root) | Run the action runner under the root user. Variable `runner_run_as` will be ignored. | `bool` | `false` | no |
| <a name="input_runner_binaries_s3_sse_configuration"></a> [runner\_binaries\_s3\_sse\_configuration](#input\_runner\_binaries\_s3\_sse\_configuration) | Map containing server-side encryption configuration for runner-binaries S3 bucket. | `any` | `{}` | no |
| <a name="input_runner_binaries_s3_logging_bucket"></a> [runner\_binaries\_s3\_logging\_bucket](#input\_runner\_binaries\_s3\_logging\_bucket) | Bucket for action runner distribution bucket access logging. | `string` | `null` | no |
| <a name="input_runner_binaries_s3_logging_bucket_prefix"></a> [runner\_binaries\_s3\_logging\_bucket\_prefix](#input\_runner\_binaries\_s3\logging\_bucket\_prefix) | Bucket prefix for action runner distribution bucket access logging. | `string` | `null` | no |
| <a name="input_runner_binaries_syncer_lambda_timeout"></a> [runner\_binaries\_syncer\_lambda\_timeout](#input\_runner\_binaries\_syncer\_lambda\_timeout) | Time out of the binaries sync lambda in seconds. | `number` | `300` | no |
| <a name="input_runner_binaries_syncer_lambda_zip"></a> [runner\_binaries\_syncer\_lambda\_zip](#input\_runner\_binaries\_syncer\_lambda\_zip) | File location of the binaries sync lambda zip file. | `string` | `null` | no |
| <a name="input_runner_boot_time_in_minutes"></a> [runner\_boot\_time\_in\_minutes](#input\_runner\_boot\_time\_in\_minutes) | The minimum time for an EC2 runner to boot and register as a runner. | `number` | `5` | no |
Expand Down
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ module "runner_binaries" {
tags = local.tags

distribution_bucket_name = "${var.prefix}-dist-${random_string.random.result}"
s3_logging_bucket = var.runner_binaries_s3_logging_bucket
s3_logging_bucket_prefix = var.runner_binaries_s3_logging_bucket_prefix

runner_os = var.runner_os
runner_architecture = var.runner_architecture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@
"@octokit/rest": "^19.0.4",
"@trivago/prettier-plugin-sort-imports": "^3.3.0",
"@types/jest": "^27.5.0",
"@types/node": "^18.7.18",
"@types/node": "^18.8.2",
"@types/request": "^2.48.8",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"@vercel/ncc": "^0.34.0",
"aws-sdk": "^2.1219.0",
"aws-sdk": "^2.1230.0",
"eslint": "^7.32.0",
"eslint-plugin-prettier": "4.2.1",
"jest": "^27.5.1",
"jest-mock": "^29.0.3",
"jest-mock": "^29.1.2",
"prettier": "2.7.1",
"ts-jest": "^27.1.4",
"ts-node-dev": "^2.0.0",
"typescript": "^4.8.3"
"typescript": "^4.8.4"
},
"dependencies": {
"axios": "^0.27.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -654,10 +654,10 @@
"@types/yargs" "^16.0.0"
chalk "^4.0.0"

"@jest/types@^29.0.3":
version "29.0.3"
resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.0.3.tgz#0be78fdddb1a35aeb2041074e55b860561c8ef63"
integrity sha512-coBJmOQvurXjN1Hh5PzF7cmsod0zLIOXpP8KD161mqNlroMhLcwpODiEzi7ZsRl5Z/AIuxpeNm8DCl43F4kz8A==
"@jest/types@^29.1.2":
version "29.1.2"
resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.1.2.tgz#7442d32b16bcd7592d9614173078b8c334ec730a"
integrity sha512-DcXGtoTykQB5jiwCmVr8H4vdg2OJhQex3qPkG+ISyDO7xQXbt/4R6dowcRyPemRnkH7JoHvZuxPBdlq+9JxFCg==
dependencies:
"@jest/schemas" "^29.0.0"
"@types/istanbul-lib-coverage" "^2.0.0"
Expand Down Expand Up @@ -994,10 +994,10 @@
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d"
integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==

"@types/node@*", "@types/node@^18.7.18":
version "18.7.18"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.18.tgz#633184f55c322e4fb08612307c274ee6d5ed3154"
integrity sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==
"@types/node@*", "@types/node@^18.8.2":
version "18.8.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.8.2.tgz#17d42c6322d917764dd3d2d3a10d7884925de067"
integrity sha512-cRMwIgdDN43GO4xMWAfJAecYn8wV4JbsOGHNfNUIDiuYkUYAR5ec4Rj7IO2SAhFPEfpPtLtUTbbny/TCT7aDwA==

"@types/prettier@^2.1.5":
version "2.4.2"
Expand Down Expand Up @@ -1274,10 +1274,10 @@ available-typed-arrays@^1.0.5:
resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7"
integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==

aws-sdk@^2.1219.0:
version "2.1219.0"
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1219.0.tgz#96d056fc4ebfd8417308f18a34f127dbaafc022e"
integrity sha512-KOGA0E3wZ/Zom1VDAd4ttsaq2LAVECXdHUs/i8OyJkuR3vSvmKQa/BOH4baIBNt4VMS062FhPA29UtT1YPTlwQ==
aws-sdk@^2.1230.0:
version "2.1230.0"
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1230.0.tgz#d7ebf384f2cb9b312325c537d38bec47e5ba8087"
integrity sha512-7Y260dvzr7b8/lZhg6A7h5WyHvfCgdFL0NiBgCuT3/xlw9rvq9b08JNYErEpaJSmo+A5hW35n6wtzii4/FUSTA==
dependencies:
buffer "4.9.2"
events "1.1.1"
Expand Down Expand Up @@ -2796,13 +2796,14 @@ jest-mock@^27.5.1:
"@jest/types" "^27.5.1"
"@types/node" "*"

jest-mock@^29.0.3:
version "29.0.3"
resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.0.3.tgz#4f0093f6a9cb2ffdb9c44a07a3912f0c098c8de9"
integrity sha512-ort9pYowltbcrCVR43wdlqfAiFJXBx8l4uJDsD8U72LgBcetvEp+Qxj1W9ZYgMRoeAo+ov5cnAGF2B6+Oth+ww==
jest-mock@^29.1.2:
version "29.1.2"
resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.1.2.tgz#de47807edbb9d4abf8423f1d8d308d670105678c"
integrity sha512-PFDAdjjWbjPUtQPkQufvniXIS3N9Tv7tbibePEjIIprzjgo0qQlyUiVMrT4vL8FaSJo1QXifQUOuPH3HQC/aMA==
dependencies:
"@jest/types" "^29.0.3"
"@jest/types" "^29.1.2"
"@types/node" "*"
jest-util "^29.1.2"

jest-pnp-resolver@^1.2.2:
version "1.2.2"
Expand Down Expand Up @@ -2942,6 +2943,18 @@ jest-util@^27.0.0, jest-util@^27.5.1:
graceful-fs "^4.2.9"
picomatch "^2.2.3"

jest-util@^29.1.2:
version "29.1.2"
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.1.2.tgz#ac5798e93cb6a6703084e194cfa0898d66126df1"
integrity sha512-vPCk9F353i0Ymx3WQq3+a4lZ07NXu9Ca8wya6o4Fe4/aO1e1awMMprZ3woPFpKwghEOW+UXgd15vVotuNN9ONQ==
dependencies:
"@jest/types" "^29.1.2"
"@types/node" "*"
chalk "^4.0.0"
ci-info "^3.2.0"
graceful-fs "^4.2.9"
picomatch "^2.2.3"

jest-validate@^27.5.1:
version "27.5.1"
resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.5.1.tgz#9197d54dc0bdb52260b8db40b46ae668e04df067"
Expand Down Expand Up @@ -3975,10 +3988,10 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"

typescript@^4.8.3:
version "4.8.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.3.tgz#d59344522c4bc464a65a730ac695007fdb66dd88"
integrity sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==
typescript@^4.8.4:
version "4.8.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6"
integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==

unbox-primitive@^1.0.2:
version "1.0.2"
Expand Down
8 changes: 6 additions & 2 deletions modules/runner-binaries-syncer/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ resource "aws_s3_bucket_lifecycle_configuration" "bucket-config" {
days = 35
storage_class = "INTELLIGENT_TIERING"
}


}
}

Expand Down Expand Up @@ -64,7 +62,13 @@ resource "aws_s3_bucket_public_access_block" "action_dist" {
restrict_public_buckets = true
}

resource "aws_s3_bucket_logging" "action_dist_logging" {
count = var.s3_logging_bucket != null ? 1 : 0

bucket = aws_s3_bucket.action_dist.id
target_bucket = var.s3_logging_bucket
target_prefix = var.s3_logging_bucket_prefix != null ? var.s3_logging_bucket_prefix : var.distribution_bucket_name
}

data "aws_iam_policy_document" "action_dist_sse_policy" {
count = try(var.server_side_encryption_configuration.rule.apply_server_side_encryption_by_default, null) != null ? 1 : 0
Expand Down
25 changes: 25 additions & 0 deletions modules/runner-binaries-syncer/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,31 @@ variable "distribution_bucket_name" {
condition = can(regex("^[a-z0-9-]*$", var.distribution_bucket_name))
}
}

variable "s3_logging_bucket" {
description = "Bucket for action runner distribution bucket access logging."
type = string
default = null

# Make sure the bucket name only contains legal characters
validation {
error_message = "Only lowercase alphanumeric characters and hyphens allowed in the bucket name."
condition = var.s3_logging_bucket == null || can(regex("^[a-z0-9-]*$", var.s3_logging_bucket))
}
}

variable "s3_logging_bucket_prefix" {
description = "Bucket prefix for action runner distribution bucket access logging."
type = string
default = null

# Make sure the bucket name only contains legal characters
validation {
error_message = "Only lowercase alphanumeric characters and hyphens allowed in the bucket name."
condition = var.s3_logging_bucket_prefix == null || can(regex("^[a-z0-9-]*$", var.s3_logging_bucket_prefix))
}
}

variable "lambda_schedule_expression" {
description = "Scheduler expression for action runner binary syncer."
type = string
Expand Down
18 changes: 9 additions & 9 deletions modules/runners/lambdas/runners/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^3.3.0",
"@types/aws-lambda": "^8.10.104",
"@types/aws-lambda": "^8.10.106",
"@types/express": "^4.17.14",
"@types/jest": "^27.5.0",
"@typescript-eslint/eslint-plugin": "^4.33.0",
Expand All @@ -26,7 +26,7 @@
"eslint": "^7.32.0",
"eslint-plugin-prettier": "4.2.1",
"jest": "27.5.1",
"jest-mock": "^29.0.3",
"jest-mock": "^29.1.2",
"jest-mock-extended": "^3.0.1",
"moment-timezone": "^0.5.37",
"nock": "^13.2.9",
Expand All @@ -36,16 +36,16 @@
"ts-node-dev": "^2.0.0"
},
"dependencies": {
"@aws-sdk/client-ssm": "^3.171.0",
"@octokit/auth-app": "4.0.5",
"@aws-sdk/client-ssm": "^3.183.0",
"@octokit/auth-app": "4.0.6",
"@octokit/rest": "^19.0.4",
"@octokit/types": "^7.5.0",
"@types/aws-lambda": "^8.10.104",
"@octokit/types": "^7.5.1",
"@types/aws-lambda": "^8.10.106",
"@types/express": "^4.17.14",
"@types/node": "^18.7.18",
"aws-sdk": "^2.1221.0",
"@types/node": "^18.8.2",
"aws-sdk": "^2.1229.0",
"cron-parser": "^4.6.0",
"tslog": "^3.3.4",
"typescript": "^4.8.3"
"typescript": "^4.8.4"
}
}
Loading