Skip to content

Commit

Permalink
Merge branch 'feature/runners-lambdas' of github.com:philips-labs/ter…
Browse files Browse the repository at this point in the history
…raform-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
  • Loading branch information
gertjanmaas committed May 7, 2020
2 parents a1e0479 + f8d939d commit 503543c
Show file tree
Hide file tree
Showing 14 changed files with 483 additions and 811 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/lambda-scale-down.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lambda Scale Down Runners
on:
push:
branches:
- master
pull_request:
paths:
- .github/workflows/lambda-scale-down.yml
- "modules/runners/lambdas/scale-down/**"

jobs:
build:
runs-on: ubuntu-latest
container: node:12
defaults:
run:
working-directory: modules/runners/lambdas/scale-down

steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: yarn install
- name: Build distribution
run: yarn build

This file was deleted.

20 changes: 0 additions & 20 deletions modules/runners/lambdas/cleanup-runners/src/local.ts

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@
"test": "NODE_ENV=test jest",
"watch": "ts-node-dev --respawn --exit-child src/local.ts",
"build": "ncc build src/lambda.ts -o dist",
"dist": "yarn build && cd dist && zip ../cleanup-runners.zip index.js"
"dist": "yarn build && cd dist && zip ../scale-down.zip index.js"
},
"devDependencies": {
"@types/express": "^4.17.3",
"@types/jest": "^25.2.1",
"@types/node": "^13.13.4",
"@zeit/ncc": "^0.22.1",
"aws-sdk": "^2.645.0",
"body-parser": "^1.19.0",
"express": "^4.17.1",
"jest": "^25.4.0",
"ts-jest": "^25.4.0",
"ts-node-dev": "^1.0.0-pre.44",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { handle } from './cleanup-runners/handler';

module.exports.handler = async (event: any, context: any, callback: any) => {
const statusCode = await handle(event.headers, event.body);
return callback(null, {
statusCode: statusCode,
});
const statusCode = await handle();
return callback();
};
5 changes: 5 additions & 0 deletions modules/runners/lambdas/scale-down/src/local.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { handle } from './cleanup-runners/handler';

handle().catch((e) => {
console.log(e);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const handle = async (): Promise<void> => {};
Loading

0 comments on commit 503543c

Please sign in to comment.