Skip to content

Commit 503543c

Browse files
committed
Merge branch 'feature/runners-lambdas' of github.com:philips-labs/terraform-aws-github-runner into feature/runners-lambdas
# Conflicts: # main.tf # modules/runners/lambdas/scale-runners/package.json # modules/runners/lambdas/scale-runners/src/local.ts # modules/runners/lambdas/scale-runners/yarn.lock
2 parents a1e0479 + f8d939d commit 503543c

File tree

14 files changed

+483
-811
lines changed

14 files changed

+483
-811
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Lambda Scale Down Runners
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
paths:
8+
- .github/workflows/lambda-scale-down.yml
9+
- "modules/runners/lambdas/scale-down/**"
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
container: node:12
15+
defaults:
16+
run:
17+
working-directory: modules/runners/lambdas/scale-down
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Install dependencies
22+
run: yarn install
23+
- name: Build distribution
24+
run: yarn build

modules/runners/lambdas/cleanup-runners/src/cleanup-runners/handler.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

modules/runners/lambdas/cleanup-runners/src/local.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

modules/runners/lambdas/cleanup-runners/package.json renamed to modules/runners/lambdas/scale-down/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@
88
"test": "NODE_ENV=test jest",
99
"watch": "ts-node-dev --respawn --exit-child src/local.ts",
1010
"build": "ncc build src/lambda.ts -o dist",
11-
"dist": "yarn build && cd dist && zip ../cleanup-runners.zip index.js"
11+
"dist": "yarn build && cd dist && zip ../scale-down.zip index.js"
1212
},
1313
"devDependencies": {
1414
"@types/express": "^4.17.3",
1515
"@types/jest": "^25.2.1",
1616
"@types/node": "^13.13.4",
1717
"@zeit/ncc": "^0.22.1",
1818
"aws-sdk": "^2.645.0",
19-
"body-parser": "^1.19.0",
20-
"express": "^4.17.1",
2119
"jest": "^25.4.0",
2220
"ts-jest": "^25.4.0",
2321
"ts-node-dev": "^1.0.0-pre.44",
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { handle } from './cleanup-runners/handler';
22

33
module.exports.handler = async (event: any, context: any, callback: any) => {
4-
const statusCode = await handle(event.headers, event.body);
5-
return callback(null, {
6-
statusCode: statusCode,
7-
});
4+
const statusCode = await handle();
5+
return callback();
86
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { handle } from './cleanup-runners/handler';
2+
3+
handle().catch((e) => {
4+
console.log(e);
5+
});
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const handle = async (): Promise<void> => {};

0 commit comments

Comments
 (0)