Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
npalm authored Jan 9, 2025
2 parents ccfb39a + 2622589 commit 70c0a2a
Show file tree
Hide file tree
Showing 17 changed files with 299 additions and 482 deletions.
4 changes: 2 additions & 2 deletions examples/multi-runner/templates/user-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ ${post_install}
cd /opt/actions-runner

%{ if hook_job_started != "" }
cat > /opt/actions-runner/hook_job_started.sh << EOF
cat > /opt/actions-runner/hook_job_started.sh <<'EOF'
${hook_job_started}
EOF
echo ACTIONS_RUNNER_HOOK_JOB_STARTED=/opt/actions-runner/hook_job_started.sh | tee -a /opt/actions-runner/.env
%{ endif }

%{ if hook_job_completed != "" }
cat > /opt/actions-runner/hook_job_completed.sh << EOF
cat > /opt/actions-runner/hook_job_completed.sh <<'EOF'
${hook_job_completed}
EOF
echo ACTIONS_RUNNER_HOOK_JOB_COMPLETED=/opt/actions-runner/hook_job_completed.sh | tee -a /opt/actions-runner/.env
Expand Down
7 changes: 7 additions & 0 deletions images/linux-al2023/github_agent.linux.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ variable "instance_type" {
default = "m3.medium"
}

variable "iam_instance_profile" {
description = "IAM instance profile Packer will use for the builder. An empty string (default) means no profile will be assigned."
type = string
default = ""
}

variable "root_volume_size_gb" {
type = number
default = 8
Expand Down Expand Up @@ -98,6 +104,7 @@ locals {
source "amazon-ebs" "githubrunner" {
ami_name = "github-runner-al2023-x86_64-${formatdate("YYYYMMDDhhmm", timestamp())}"
instance_type = var.instance_type
iam_instance_profile = var.iam_instance_profile
region = var.region
security_group_id = var.security_group_id
subnet_id = var.subnet_id
Expand Down
8 changes: 8 additions & 0 deletions images/ubuntu-focal/github_agent.ubuntu.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ variable "instance_type" {
default = "t3.medium"
}

variable "iam_instance_profile" {
description = "IAM instance profile Packer will use for the builder. An empty string (default) means no profile will be assigned."
type = string
default = ""
}

variable "root_volume_size_gb" {
type = number
default = 8
Expand Down Expand Up @@ -98,6 +104,7 @@ locals {
source "amazon-ebs" "githubrunner" {
ami_name = "github-runner-ubuntu-focal-amd64-${formatdate("YYYYMMDDhhmm", timestamp())}"
instance_type = var.instance_type
iam_instance_profile = var.iam_instance_profile
region = var.region
security_group_id = var.security_group_id
subnet_id = var.subnet_id
Expand Down Expand Up @@ -200,6 +207,7 @@ build {
"sudo chmod +x /var/lib/cloud/scripts/per-boot/start-runner.sh",
]
}

post-processor "manifest" {
output = "manifest.json"
strip_path = true
Expand Down
8 changes: 8 additions & 0 deletions images/ubuntu-jammy-arm64/github_agent.ubuntu.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ variable "instance_type" {
default = "t4g.small"
}

variable "iam_instance_profile" {
description = "IAM instance profile Packer will use for the builder. An empty string (default) means no profile will be assigned."
type = string
default = ""
}

variable "root_volume_size_gb" {
type = number
default = 8
Expand Down Expand Up @@ -98,6 +104,7 @@ locals {
source "amazon-ebs" "githubrunner" {
ami_name = "github-runner-ubuntu-jammy-arm64-${formatdate("YYYYMMDDhhmm", timestamp())}"
instance_type = var.instance_type
iam_instance_profile = var.iam_instance_profile
region = var.region
security_group_id = var.security_group_id
subnet_id = var.subnet_id
Expand Down Expand Up @@ -200,6 +207,7 @@ build {
"sudo chmod +x /var/lib/cloud/scripts/per-boot/start-runner.sh",
]
}

post-processor "manifest" {
output = "manifest.json"
strip_path = true
Expand Down
8 changes: 8 additions & 0 deletions images/ubuntu-jammy/github_agent.ubuntu.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ variable "instance_type" {
default = "t3.medium"
}

variable "iam_instance_profile" {
description = "IAM instance profile Packer will use for the builder. An empty string (default) means no profile will be assigned."
type = string
default = ""
}

variable "root_volume_size_gb" {
type = number
default = 8
Expand Down Expand Up @@ -98,6 +104,7 @@ locals {
source "amazon-ebs" "githubrunner" {
ami_name = "github-runner-ubuntu-jammy-amd64-${formatdate("YYYYMMDDhhmm", timestamp())}"
instance_type = var.instance_type
iam_instance_profile = var.iam_instance_profile
region = var.region
security_group_id = var.security_group_id
subnet_id = var.subnet_id
Expand Down Expand Up @@ -200,6 +207,7 @@ build {
"sudo chmod +x /var/lib/cloud/scripts/per-boot/start-runner.sh",
]
}

post-processor "manifest" {
output = "manifest.json"
strip_path = true
Expand Down
8 changes: 8 additions & 0 deletions images/windows-core-2019/github_agent.windows.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ variable "instance_type" {
default = "t3a.medium"
}

variable "iam_instance_profile" {
description = "IAM instance profile Packer will use for the builder. An empty string (default) means no profile will be assigned."
type = string
default = ""
}

variable "ebs_delete_on_termination" {
description = "Indicates whether the EBS volume is deleted on instance termination."
type = bool
Expand Down Expand Up @@ -64,6 +70,7 @@ source "amazon-ebs" "githubrunner" {
ami_name = "github-runner-windows-core-2019-${formatdate("YYYYMMDDhhmm", timestamp())}"
communicator = "winrm"
instance_type = var.instance_type
iam_instance_profile = var.iam_instance_profile
region = var.region
associate_public_ip_address = var.associate_public_ip_address
temporary_security_group_source_public_ip = var.temporary_security_group_source_public_ip
Expand Down Expand Up @@ -114,6 +121,7 @@ build {
})
], var.custom_shell_commands)
}

post-processor "manifest" {
output = "manifest.json"
strip_path = true
Expand Down
15 changes: 14 additions & 1 deletion images/windows-core-2022/github_agent.windows.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ variable "region" {
default = "eu-west-1"
}

variable "instance_type" {
description = "The instance type Packer will use for the builder"
type = string
default = "m4.xlarge"
}

variable "iam_instance_profile" {
description = "IAM instance profile Packer will use for the builder. An empty string (default) means no profile will be assigned."
type = string
default = ""
}

variable "security_group_id" {
description = "The ID of the security group Packer will associate with the builder to enable access"
type = string
Expand Down Expand Up @@ -74,7 +86,8 @@ locals {
source "amazon-ebs" "githubrunner" {
ami_name = "github-runner-windows-core-2022-${formatdate("YYYYMMDDhhmm", timestamp())}"
communicator = "winrm"
instance_type = "m4.xlarge"
instance_type = var.instance_type
iam_instance_profile = var.iam_instance_profile
region = var.region
security_group_id = var.security_group_id
subnet_id = var.subnet_id
Expand Down
8 changes: 4 additions & 4 deletions lambdas/functions/ami-housekeeper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/aws-lambda": "^8.10.146",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.2",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/eslint-plugin": "^8.19.1",
"@typescript-eslint/parser": "^8.16.0",
"@vercel/ncc": "^0.38.3",
"aws-sdk-client-mock": "^4.1.0",
Expand All @@ -31,16 +31,16 @@
"jest-mock": "^29.7.0",
"jest-mock-extended": "^3.0.7",
"nock": "^13.5.6",
"prettier": "3.3.3",
"prettier": "3.4.2",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"ts-node-dev": "^2.0.0"
},
"dependencies": {
"@aws-github-runner/aws-powertools-util": "*",
"@aws-github-runner/aws-ssm-util": "*",
"@aws-sdk/client-ec2": "^3.716.0",
"@aws-sdk/client-ssm": "^3.716.0",
"@aws-sdk/client-ec2": "^3.721.0",
"@aws-sdk/client-ssm": "^3.721.0",
"@aws-sdk/types": "^3.714.0",
"cron-parser": "^4.9.0",
"typescript": "^5.7.2"
Expand Down
8 changes: 4 additions & 4 deletions lambdas/functions/control-plane/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/aws-lambda": "^8.10.146",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.2",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/eslint-plugin": "^8.19.1",
"@typescript-eslint/parser": "^8.16.0",
"@vercel/ncc": "^0.38.3",
"aws-sdk-client-mock": "^4.1.0",
Expand All @@ -32,7 +32,7 @@
"jest-mock-extended": "^3.0.7",
"moment-timezone": "^0.5.46",
"nock": "^13.5.6",
"prettier": "3.3.3",
"prettier": "3.4.2",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"ts-node-dev": "^2.0.0"
Expand All @@ -41,8 +41,8 @@
"@aws-github-runner/aws-powertools-util": "*",
"@aws-github-runner/aws-ssm-util": "*",
"@aws-lambda-powertools/parameters": "^2.12.0",
"@aws-sdk/client-ec2": "^3.716.0",
"@aws-sdk/client-sqs": "^3.716.0",
"@aws-sdk/client-ec2": "^3.721.0",
"@aws-sdk/client-sqs": "^3.721.0",
"@aws-sdk/types": "^3.714.0",
"@middy/core": "^4.7.0",
"@octokit/auth-app": "6.1.3",
Expand Down
8 changes: 4 additions & 4 deletions lambdas/functions/gh-agent-syncer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@types/jest": "^29.5.14",
"@types/node": "^22.10.2",
"@types/request": "^2.48.12",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/eslint-plugin": "^8.19.1",
"@typescript-eslint/parser": "^8.16.0",
"@vercel/ncc": "^0.38.3",
"aws-sdk-client-mock": "^4.1.0",
Expand All @@ -30,15 +30,15 @@
"eslint-plugin-prettier": "5.2.1",
"jest": "^29.7.0",
"jest-mock": "^29.7.0",
"prettier": "3.3.3",
"prettier": "3.4.2",
"ts-jest": "^29.2.5",
"ts-node-dev": "^2.0.0",
"typescript": "^5.7.2"
},
"dependencies": {
"@aws-github-runner/aws-powertools-util": "*",
"@aws-sdk/client-s3": "^3.717.0",
"@aws-sdk/lib-storage": "^3.717.0",
"@aws-sdk/client-s3": "^3.722.0",
"@aws-sdk/lib-storage": "^3.722.0",
"@aws-sdk/types": "^3.714.0",
"@middy/core": "^4.7.0",
"@octokit/rest": "20.1.1",
Expand Down
6 changes: 3 additions & 3 deletions lambdas/functions/termination-watcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@types/aws-lambda": "^8.10.146",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.2",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/eslint-plugin": "^8.19.1",
"@typescript-eslint/parser": "^8.16.0",
"@vercel/ncc": "^0.38.3",
"aws-sdk-client-mock": "^4.1.0",
Expand All @@ -29,14 +29,14 @@
"jest-mock": "^29.7.0",
"jest-mock-extended": "^3.0.7",
"nock": "^13.5.6",
"prettier": "3.3.3",
"prettier": "3.4.2",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"ts-node-dev": "^2.0.0"
},
"dependencies": {
"@aws-github-runner/aws-powertools-util": "*",
"@aws-sdk/client-ec2": "^3.716.0",
"@aws-sdk/client-ec2": "^3.721.0",
"@aws-sdk/types": "^3.714.0",
"@middy/core": "^4.7.0",
"typescript": "^5.7.2"
Expand Down
10 changes: 5 additions & 5 deletions lambdas/functions/webhook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@
"all": "yarn build && yarn format && yarn lint && yarn test"
},
"devDependencies": {
"@aws-sdk/client-eventbridge": "^3.716.0",
"@aws-sdk/client-eventbridge": "^3.721.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/aws-lambda": "^8.10.146",
"@types/express": "^4.17.21",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.2",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/eslint-plugin": "^8.19.1",
"@typescript-eslint/parser": "^8.16.0",
"@vercel/ncc": "0.38.3",
"body-parser": "^1.20.3",
"eslint": "^8.57.0",
"eslint-plugin-prettier": "5.2.1",
"express": "^4.21.1",
"express": "^4.21.2",
"jest": "^29.7.0",
"jest-mock": "^29.7.0",
"nock": "^13.5.6",
"prettier": "3.3.3",
"prettier": "3.4.2",
"ts-jest": "^29.2.5",
"ts-node-dev": "^2.0.0",
"typescript": "^5.7.2"
},
"dependencies": {
"@aws-github-runner/aws-powertools-util": "*",
"@aws-github-runner/aws-ssm-util": "*",
"@aws-sdk/client-sqs": "^3.716.0",
"@aws-sdk/client-sqs": "^3.721.0",
"@middy/core": "^4.7.0",
"@octokit/rest": "20.1.1",
"@octokit/types": "^13.6.2",
Expand Down
6 changes: 3 additions & 3 deletions lambdas/libs/aws-powertools-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
"@types/express": "^4.17.21",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.2",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/eslint-plugin": "^8.19.1",
"@typescript-eslint/parser": "^8.16.0",
"@vercel/ncc": "0.38.3",
"body-parser": "^1.20.3",
"eslint": "^8.57.0",
"eslint-plugin-prettier": "5.2.1",
"express": "^4.21.1",
"express": "^4.21.2",
"jest": "^29.7.0",
"jest-mock": "^29.7.0",
"nock": "^13.5.6",
"prettier": "3.3.3",
"prettier": "3.4.2",
"ts-jest": "^29.2.5",
"ts-node-dev": "^2.0.0",
"typescript": "^5.7.2"
Expand Down
8 changes: 4 additions & 4 deletions lambdas/libs/aws-ssm-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@
"@types/express": "^4.17.21",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.2",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/eslint-plugin": "^8.19.1",
"@typescript-eslint/parser": "^8.16.0",
"@vercel/ncc": "0.38.3",
"body-parser": "^1.20.3",
"eslint": "^8.57.0",
"eslint-plugin-prettier": "5.2.1",
"express": "^4.21.1",
"express": "^4.21.2",
"jest": "^29.7.0",
"jest-mock": "^29.7.0",
"nock": "^13.5.6",
"prettier": "3.3.3",
"prettier": "3.4.2",
"ts-jest": "^29.2.5",
"ts-node-dev": "^2.0.0",
"typescript": "^5.7.2"
},
"dependencies": {
"@aws-github-runner/aws-powertools-util": "*",
"@aws-sdk/client-ssm": "^3.716.0",
"@aws-sdk/client-ssm": "^3.721.0",
"@aws-sdk/types": "^3.714.0"
},
"nx": {
Expand Down
4 changes: 2 additions & 2 deletions lambdas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
},
"devDependencies": {
"@nx/eslint": "20.3.0",
"@nx/jest": "20.0.1",
"@nx/jest": "20.3.0",
"@nx/js": "^20.0.1",
"@swc-node/register": "~1.10.9",
"@swc/core": "~1.10.1",
"@swc/helpers": "~0.5.15",
"eslint": "^8.57.0",
"jest": "^29.7.0",
"nx": "20.1.3",
"prettier": "^3.3.3",
"prettier": "^3.4.2",
"typescript": "^5.7.2"
},
"packageManager": "[email protected]"
Expand Down
Loading

0 comments on commit 70c0a2a

Please sign in to comment.