diff --git a/.eslintrc.json b/.eslintrc.json index f6df56e7..7535edf1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -147,16 +147,16 @@ "devDependencies": [ "**/test/**", "**/build-tools/**", - "src/lambdas/aws-image-builder-versioner.lambda.ts", - "src/lambdas/build-image.lambda.ts", - "src/lambdas/delete-ami.lambda.ts", - "src/lambdas/delete-runner.lambda.ts", - "src/lambdas/setup.lambda.ts", - "src/lambdas/status.lambda.ts", - "src/lambdas/token-retriever.lambda.ts", - "src/lambdas/update-lambda.lambda.ts", - "src/lambdas/webhook-handler.lambda.ts", - "src/providers/image-builders/aws-image-builder/filter-failed-builds.lambda.ts" + "src/delete-runner.lambda.ts", + "src/providers/build-image.lambda.ts", + "src/providers/image-builders/aws-image-builder/delete-ami.lambda.ts", + "src/providers/image-builders/aws-image-builder/filter-failed-builds.lambda.ts", + "src/providers/image-builders/aws-image-builder/versioner.lambda.ts", + "src/providers/update-lambda.lambda.ts", + "src/setup.lambda.ts", + "src/status.lambda.ts", + "src/token-retriever.lambda.ts", + "src/webhook-handler.lambda.ts" ], "optionalDependencies": false, "peerDependencies": true diff --git a/.gitattributes b/.gitattributes index bf040b33..580897f1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -24,16 +24,16 @@ /API.md linguist-generated /LICENSE linguist-generated /package.json linguist-generated -/src/lambdas/aws-image-builder-versioner-function.ts linguist-generated -/src/lambdas/build-image-function.ts linguist-generated -/src/lambdas/delete-ami-function.ts linguist-generated -/src/lambdas/delete-runner-function.ts linguist-generated -/src/lambdas/setup-function.ts linguist-generated -/src/lambdas/status-function.ts linguist-generated -/src/lambdas/token-retriever-function.ts linguist-generated -/src/lambdas/update-lambda-function.ts linguist-generated -/src/lambdas/webhook-handler-function.ts linguist-generated +/src/delete-runner-function.ts linguist-generated +/src/providers/build-image-function.ts linguist-generated +/src/providers/image-builders/aws-image-builder/delete-ami-function.ts linguist-generated /src/providers/image-builders/aws-image-builder/filter-failed-builds-function.ts linguist-generated +/src/providers/image-builders/aws-image-builder/versioner-function.ts linguist-generated +/src/providers/update-lambda-function.ts linguist-generated +/src/setup-function.ts linguist-generated +/src/status-function.ts linguist-generated +/src/token-retriever-function.ts linguist-generated +/src/webhook-handler-function.ts linguist-generated /tsconfig.dev.json linguist-generated /yarn.lock linguist-generated Dockerfile eol=lf \ No newline at end of file diff --git a/.gitignore b/.gitignore index 140400c9..efb46acd 100644 --- a/.gitignore +++ b/.gitignore @@ -55,16 +55,16 @@ junit.xml tsconfig.json !/API.md /assets/ -!/src/lambdas/aws-image-builder-versioner-function.ts -!/src/lambdas/build-image-function.ts -!/src/lambdas/delete-ami-function.ts -!/src/lambdas/delete-runner-function.ts -!/src/lambdas/setup-function.ts -!/src/lambdas/status-function.ts -!/src/lambdas/token-retriever-function.ts -!/src/lambdas/update-lambda-function.ts -!/src/lambdas/webhook-handler-function.ts +!/src/delete-runner-function.ts +!/src/providers/build-image-function.ts +!/src/providers/image-builders/aws-image-builder/delete-ami-function.ts !/src/providers/image-builders/aws-image-builder/filter-failed-builds-function.ts +!/src/providers/image-builders/aws-image-builder/versioner-function.ts +!/src/providers/update-lambda-function.ts +!/src/setup-function.ts +!/src/status-function.ts +!/src/token-retriever-function.ts +!/src/webhook-handler-function.ts test/.tmp test/default.integ.snapshot/asset.* test/default.integ.snapshot/**/asset.* diff --git a/.projen/files.json b/.projen/files.json index 30ad6529..aefa266b 100644 --- a/.projen/files.json +++ b/.projen/files.json @@ -13,16 +13,16 @@ ".projen/files.json", ".projen/tasks.json", "LICENSE", - "src/lambdas/aws-image-builder-versioner-function.ts", - "src/lambdas/build-image-function.ts", - "src/lambdas/delete-ami-function.ts", - "src/lambdas/delete-runner-function.ts", - "src/lambdas/setup-function.ts", - "src/lambdas/status-function.ts", - "src/lambdas/token-retriever-function.ts", - "src/lambdas/update-lambda-function.ts", - "src/lambdas/webhook-handler-function.ts", + "src/delete-runner-function.ts", + "src/providers/build-image-function.ts", + "src/providers/image-builders/aws-image-builder/delete-ami-function.ts", "src/providers/image-builders/aws-image-builder/filter-failed-builds-function.ts", + "src/providers/image-builders/aws-image-builder/versioner-function.ts", + "src/providers/update-lambda-function.ts", + "src/setup-function.ts", + "src/status-function.ts", + "src/token-retriever-function.ts", + "src/webhook-handler-function.ts", "tsconfig.dev.json" ], "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." diff --git a/.projen/tasks.json b/.projen/tasks.json index 069f6906..8212a5d6 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -46,34 +46,34 @@ "description": "Prepare assets", "steps": [ { - "spawn": "bundle:lambdas/aws-image-builder-versioner.lambda" + "spawn": "bundle:delete-runner.lambda" }, { - "spawn": "bundle:lambdas/build-image.lambda" + "spawn": "bundle:providers/build-image.lambda" }, { - "spawn": "bundle:lambdas/delete-ami.lambda" + "spawn": "bundle:providers/image-builders/aws-image-builder/delete-ami.lambda" }, { - "spawn": "bundle:lambdas/delete-runner.lambda" + "spawn": "bundle:providers/image-builders/aws-image-builder/filter-failed-builds.lambda" }, { - "spawn": "bundle:lambdas/setup.lambda" + "spawn": "bundle:providers/image-builders/aws-image-builder/versioner.lambda" }, { - "spawn": "bundle:lambdas/status.lambda" + "spawn": "bundle:providers/update-lambda.lambda" }, { - "spawn": "bundle:lambdas/token-retriever.lambda" + "spawn": "bundle:setup.lambda" }, { - "spawn": "bundle:lambdas/update-lambda.lambda" + "spawn": "bundle:status.lambda" }, { - "spawn": "bundle:lambdas/webhook-handler.lambda" + "spawn": "bundle:token-retriever.lambda" }, { - "spawn": "bundle:providers/image-builders/aws-image-builder/filter-failed-builds.lambda" + "spawn": "bundle:webhook-handler.lambda" }, { "exec": "cp -r src/providers/docker-images assets" @@ -82,187 +82,187 @@ "exec": "vite build setup" }, { - "exec": "cp -r setup/dist/index.html assets/lambdas/setup.lambda/index.html" + "exec": "cp -r setup/dist/index.html assets/setup.lambda/index.html" } ] }, - "bundle:lambdas/aws-image-builder-versioner.lambda": { - "name": "bundle:lambdas/aws-image-builder-versioner.lambda", - "description": "Create a JavaScript bundle from src/lambdas/aws-image-builder-versioner.lambda.ts", + "bundle:delete-runner.lambda": { + "name": "bundle:delete-runner.lambda", + "description": "Create a JavaScript bundle from src/delete-runner.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/aws-image-builder-versioner.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/aws-image-builder-versioner.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" + "exec": "esbuild --bundle src/delete-runner.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/delete-runner.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" } ] }, - "bundle:lambdas/aws-image-builder-versioner.lambda:watch": { - "name": "bundle:lambdas/aws-image-builder-versioner.lambda:watch", - "description": "Continuously update the JavaScript bundle from src/lambdas/aws-image-builder-versioner.lambda.ts", + "bundle:delete-runner.lambda:watch": { + "name": "bundle:delete-runner.lambda:watch", + "description": "Continuously update the JavaScript bundle from src/delete-runner.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/aws-image-builder-versioner.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/aws-image-builder-versioner.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" + "exec": "esbuild --bundle src/delete-runner.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/delete-runner.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" } ] }, - "bundle:lambdas/build-image.lambda": { - "name": "bundle:lambdas/build-image.lambda", - "description": "Create a JavaScript bundle from src/lambdas/build-image.lambda.ts", + "bundle:providers/build-image.lambda": { + "name": "bundle:providers/build-image.lambda", + "description": "Create a JavaScript bundle from src/providers/build-image.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/build-image.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/build-image.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" + "exec": "esbuild --bundle src/providers/build-image.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/providers/build-image.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" } ] }, - "bundle:lambdas/build-image.lambda:watch": { - "name": "bundle:lambdas/build-image.lambda:watch", - "description": "Continuously update the JavaScript bundle from src/lambdas/build-image.lambda.ts", + "bundle:providers/build-image.lambda:watch": { + "name": "bundle:providers/build-image.lambda:watch", + "description": "Continuously update the JavaScript bundle from src/providers/build-image.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/build-image.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/build-image.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" + "exec": "esbuild --bundle src/providers/build-image.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/providers/build-image.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" } ] }, - "bundle:lambdas/delete-ami.lambda": { - "name": "bundle:lambdas/delete-ami.lambda", - "description": "Create a JavaScript bundle from src/lambdas/delete-ami.lambda.ts", + "bundle:providers/image-builders/aws-image-builder/delete-ami.lambda": { + "name": "bundle:providers/image-builders/aws-image-builder/delete-ami.lambda", + "description": "Create a JavaScript bundle from src/providers/image-builders/aws-image-builder/delete-ami.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/delete-ami.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/delete-ami.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" + "exec": "esbuild --bundle src/providers/image-builders/aws-image-builder/delete-ami.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/providers/image-builders/aws-image-builder/delete-ami.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" } ] }, - "bundle:lambdas/delete-ami.lambda:watch": { - "name": "bundle:lambdas/delete-ami.lambda:watch", - "description": "Continuously update the JavaScript bundle from src/lambdas/delete-ami.lambda.ts", + "bundle:providers/image-builders/aws-image-builder/delete-ami.lambda:watch": { + "name": "bundle:providers/image-builders/aws-image-builder/delete-ami.lambda:watch", + "description": "Continuously update the JavaScript bundle from src/providers/image-builders/aws-image-builder/delete-ami.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/delete-ami.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/delete-ami.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" + "exec": "esbuild --bundle src/providers/image-builders/aws-image-builder/delete-ami.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/providers/image-builders/aws-image-builder/delete-ami.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" } ] }, - "bundle:lambdas/delete-runner.lambda": { - "name": "bundle:lambdas/delete-runner.lambda", - "description": "Create a JavaScript bundle from src/lambdas/delete-runner.lambda.ts", + "bundle:providers/image-builders/aws-image-builder/filter-failed-builds.lambda": { + "name": "bundle:providers/image-builders/aws-image-builder/filter-failed-builds.lambda", + "description": "Create a JavaScript bundle from src/providers/image-builders/aws-image-builder/filter-failed-builds.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/delete-runner.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/delete-runner.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" + "exec": "esbuild --bundle src/providers/image-builders/aws-image-builder/filter-failed-builds.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/providers/image-builders/aws-image-builder/filter-failed-builds.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" } ] }, - "bundle:lambdas/delete-runner.lambda:watch": { - "name": "bundle:lambdas/delete-runner.lambda:watch", - "description": "Continuously update the JavaScript bundle from src/lambdas/delete-runner.lambda.ts", + "bundle:providers/image-builders/aws-image-builder/filter-failed-builds.lambda:watch": { + "name": "bundle:providers/image-builders/aws-image-builder/filter-failed-builds.lambda:watch", + "description": "Continuously update the JavaScript bundle from src/providers/image-builders/aws-image-builder/filter-failed-builds.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/delete-runner.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/delete-runner.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" + "exec": "esbuild --bundle src/providers/image-builders/aws-image-builder/filter-failed-builds.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/providers/image-builders/aws-image-builder/filter-failed-builds.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" } ] }, - "bundle:lambdas/setup.lambda": { - "name": "bundle:lambdas/setup.lambda", - "description": "Create a JavaScript bundle from src/lambdas/setup.lambda.ts", + "bundle:providers/image-builders/aws-image-builder/versioner.lambda": { + "name": "bundle:providers/image-builders/aws-image-builder/versioner.lambda", + "description": "Create a JavaScript bundle from src/providers/image-builders/aws-image-builder/versioner.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/setup.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/setup.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" + "exec": "esbuild --bundle src/providers/image-builders/aws-image-builder/versioner.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/providers/image-builders/aws-image-builder/versioner.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" } ] }, - "bundle:lambdas/setup.lambda:watch": { - "name": "bundle:lambdas/setup.lambda:watch", - "description": "Continuously update the JavaScript bundle from src/lambdas/setup.lambda.ts", + "bundle:providers/image-builders/aws-image-builder/versioner.lambda:watch": { + "name": "bundle:providers/image-builders/aws-image-builder/versioner.lambda:watch", + "description": "Continuously update the JavaScript bundle from src/providers/image-builders/aws-image-builder/versioner.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/setup.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/setup.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" + "exec": "esbuild --bundle src/providers/image-builders/aws-image-builder/versioner.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/providers/image-builders/aws-image-builder/versioner.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" } ] }, - "bundle:lambdas/status.lambda": { - "name": "bundle:lambdas/status.lambda", - "description": "Create a JavaScript bundle from src/lambdas/status.lambda.ts", + "bundle:providers/update-lambda.lambda": { + "name": "bundle:providers/update-lambda.lambda", + "description": "Create a JavaScript bundle from src/providers/update-lambda.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/status.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/status.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" + "exec": "esbuild --bundle src/providers/update-lambda.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/providers/update-lambda.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" } ] }, - "bundle:lambdas/status.lambda:watch": { - "name": "bundle:lambdas/status.lambda:watch", - "description": "Continuously update the JavaScript bundle from src/lambdas/status.lambda.ts", + "bundle:providers/update-lambda.lambda:watch": { + "name": "bundle:providers/update-lambda.lambda:watch", + "description": "Continuously update the JavaScript bundle from src/providers/update-lambda.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/status.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/status.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" + "exec": "esbuild --bundle src/providers/update-lambda.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/providers/update-lambda.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" } ] }, - "bundle:lambdas/token-retriever.lambda": { - "name": "bundle:lambdas/token-retriever.lambda", - "description": "Create a JavaScript bundle from src/lambdas/token-retriever.lambda.ts", + "bundle:setup.lambda": { + "name": "bundle:setup.lambda", + "description": "Create a JavaScript bundle from src/setup.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/token-retriever.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/token-retriever.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" + "exec": "esbuild --bundle src/setup.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/setup.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" } ] }, - "bundle:lambdas/token-retriever.lambda:watch": { - "name": "bundle:lambdas/token-retriever.lambda:watch", - "description": "Continuously update the JavaScript bundle from src/lambdas/token-retriever.lambda.ts", + "bundle:setup.lambda:watch": { + "name": "bundle:setup.lambda:watch", + "description": "Continuously update the JavaScript bundle from src/setup.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/token-retriever.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/token-retriever.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" + "exec": "esbuild --bundle src/setup.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/setup.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" } ] }, - "bundle:lambdas/update-lambda.lambda": { - "name": "bundle:lambdas/update-lambda.lambda", - "description": "Create a JavaScript bundle from src/lambdas/update-lambda.lambda.ts", + "bundle:status.lambda": { + "name": "bundle:status.lambda", + "description": "Create a JavaScript bundle from src/status.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/update-lambda.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/update-lambda.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" + "exec": "esbuild --bundle src/status.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/status.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" } ] }, - "bundle:lambdas/update-lambda.lambda:watch": { - "name": "bundle:lambdas/update-lambda.lambda:watch", - "description": "Continuously update the JavaScript bundle from src/lambdas/update-lambda.lambda.ts", + "bundle:status.lambda:watch": { + "name": "bundle:status.lambda:watch", + "description": "Continuously update the JavaScript bundle from src/status.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/update-lambda.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/update-lambda.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" + "exec": "esbuild --bundle src/status.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/status.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" } ] }, - "bundle:lambdas/webhook-handler.lambda": { - "name": "bundle:lambdas/webhook-handler.lambda", - "description": "Create a JavaScript bundle from src/lambdas/webhook-handler.lambda.ts", + "bundle:token-retriever.lambda": { + "name": "bundle:token-retriever.lambda", + "description": "Create a JavaScript bundle from src/token-retriever.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/webhook-handler.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/webhook-handler.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" + "exec": "esbuild --bundle src/token-retriever.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/token-retriever.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" } ] }, - "bundle:lambdas/webhook-handler.lambda:watch": { - "name": "bundle:lambdas/webhook-handler.lambda:watch", - "description": "Continuously update the JavaScript bundle from src/lambdas/webhook-handler.lambda.ts", + "bundle:token-retriever.lambda:watch": { + "name": "bundle:token-retriever.lambda:watch", + "description": "Continuously update the JavaScript bundle from src/token-retriever.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/lambdas/webhook-handler.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/lambdas/webhook-handler.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" + "exec": "esbuild --bundle src/token-retriever.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/token-retriever.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" } ] }, - "bundle:providers/image-builders/aws-image-builder/filter-failed-builds.lambda": { - "name": "bundle:providers/image-builders/aws-image-builder/filter-failed-builds.lambda", - "description": "Create a JavaScript bundle from src/providers/image-builders/aws-image-builder/filter-failed-builds.lambda.ts", + "bundle:webhook-handler.lambda": { + "name": "bundle:webhook-handler.lambda", + "description": "Create a JavaScript bundle from src/webhook-handler.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/providers/image-builders/aws-image-builder/filter-failed-builds.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/providers/image-builders/aws-image-builder/filter-failed-builds.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" + "exec": "esbuild --bundle src/webhook-handler.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/webhook-handler.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk" } ] }, - "bundle:providers/image-builders/aws-image-builder/filter-failed-builds.lambda:watch": { - "name": "bundle:providers/image-builders/aws-image-builder/filter-failed-builds.lambda:watch", - "description": "Continuously update the JavaScript bundle from src/providers/image-builders/aws-image-builder/filter-failed-builds.lambda.ts", + "bundle:webhook-handler.lambda:watch": { + "name": "bundle:webhook-handler.lambda:watch", + "description": "Continuously update the JavaScript bundle from src/webhook-handler.lambda.ts", "steps": [ { - "exec": "esbuild --bundle src/providers/image-builders/aws-image-builder/filter-failed-builds.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/providers/image-builders/aws-image-builder/filter-failed-builds.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" + "exec": "esbuild --bundle src/webhook-handler.lambda.ts --target=\"node16\" --platform=\"node\" --outfile=\"assets/webhook-handler.lambda/index.js\" --tsconfig=\"tsconfig.dev.json\" --external:aws-sdk --watch" } ] }, diff --git a/.projenrc.js b/.projenrc.js index 21a5b9a3..3e674a16 100644 --- a/.projenrc.js +++ b/.projenrc.js @@ -124,6 +124,6 @@ project.gitattributes.addAttributes('Dockerfile', 'eol=lf'); project.gitignore.addPatterns('/setup/dist'); project.addPackageIgnore('/setup'); project.bundler.bundleTask.exec('vite build setup'); -project.bundler.bundleTask.exec('cp -r setup/dist/index.html assets/lambdas/setup.lambda/index.html'); +project.bundler.bundleTask.exec('cp -r setup/dist/index.html assets/setup.lambda/index.html'); project.synth(); diff --git a/package.json b/package.json index 899b3d0e..ff75d579 100644 --- a/package.json +++ b/package.json @@ -9,26 +9,26 @@ "build": "npx projen build", "bump": "npx projen bump", "bundle": "npx projen bundle", - "bundle:lambdas/aws-image-builder-versioner.lambda": "npx projen bundle:lambdas/aws-image-builder-versioner.lambda", - "bundle:lambdas/aws-image-builder-versioner.lambda:watch": "npx projen bundle:lambdas/aws-image-builder-versioner.lambda:watch", - "bundle:lambdas/build-image.lambda": "npx projen bundle:lambdas/build-image.lambda", - "bundle:lambdas/build-image.lambda:watch": "npx projen bundle:lambdas/build-image.lambda:watch", - "bundle:lambdas/delete-ami.lambda": "npx projen bundle:lambdas/delete-ami.lambda", - "bundle:lambdas/delete-ami.lambda:watch": "npx projen bundle:lambdas/delete-ami.lambda:watch", - "bundle:lambdas/delete-runner.lambda": "npx projen bundle:lambdas/delete-runner.lambda", - "bundle:lambdas/delete-runner.lambda:watch": "npx projen bundle:lambdas/delete-runner.lambda:watch", - "bundle:lambdas/setup.lambda": "npx projen bundle:lambdas/setup.lambda", - "bundle:lambdas/setup.lambda:watch": "npx projen bundle:lambdas/setup.lambda:watch", - "bundle:lambdas/status.lambda": "npx projen bundle:lambdas/status.lambda", - "bundle:lambdas/status.lambda:watch": "npx projen bundle:lambdas/status.lambda:watch", - "bundle:lambdas/token-retriever.lambda": "npx projen bundle:lambdas/token-retriever.lambda", - "bundle:lambdas/token-retriever.lambda:watch": "npx projen bundle:lambdas/token-retriever.lambda:watch", - "bundle:lambdas/update-lambda.lambda": "npx projen bundle:lambdas/update-lambda.lambda", - "bundle:lambdas/update-lambda.lambda:watch": "npx projen bundle:lambdas/update-lambda.lambda:watch", - "bundle:lambdas/webhook-handler.lambda": "npx projen bundle:lambdas/webhook-handler.lambda", - "bundle:lambdas/webhook-handler.lambda:watch": "npx projen bundle:lambdas/webhook-handler.lambda:watch", + "bundle:delete-runner.lambda": "npx projen bundle:delete-runner.lambda", + "bundle:delete-runner.lambda:watch": "npx projen bundle:delete-runner.lambda:watch", + "bundle:providers/build-image.lambda": "npx projen bundle:providers/build-image.lambda", + "bundle:providers/build-image.lambda:watch": "npx projen bundle:providers/build-image.lambda:watch", + "bundle:providers/image-builders/aws-image-builder/delete-ami.lambda": "npx projen bundle:providers/image-builders/aws-image-builder/delete-ami.lambda", + "bundle:providers/image-builders/aws-image-builder/delete-ami.lambda:watch": "npx projen bundle:providers/image-builders/aws-image-builder/delete-ami.lambda:watch", "bundle:providers/image-builders/aws-image-builder/filter-failed-builds.lambda": "npx projen bundle:providers/image-builders/aws-image-builder/filter-failed-builds.lambda", "bundle:providers/image-builders/aws-image-builder/filter-failed-builds.lambda:watch": "npx projen bundle:providers/image-builders/aws-image-builder/filter-failed-builds.lambda:watch", + "bundle:providers/image-builders/aws-image-builder/versioner.lambda": "npx projen bundle:providers/image-builders/aws-image-builder/versioner.lambda", + "bundle:providers/image-builders/aws-image-builder/versioner.lambda:watch": "npx projen bundle:providers/image-builders/aws-image-builder/versioner.lambda:watch", + "bundle:providers/update-lambda.lambda": "npx projen bundle:providers/update-lambda.lambda", + "bundle:providers/update-lambda.lambda:watch": "npx projen bundle:providers/update-lambda.lambda:watch", + "bundle:setup.lambda": "npx projen bundle:setup.lambda", + "bundle:setup.lambda:watch": "npx projen bundle:setup.lambda:watch", + "bundle:status.lambda": "npx projen bundle:status.lambda", + "bundle:status.lambda:watch": "npx projen bundle:status.lambda:watch", + "bundle:token-retriever.lambda": "npx projen bundle:token-retriever.lambda", + "bundle:token-retriever.lambda:watch": "npx projen bundle:token-retriever.lambda:watch", + "bundle:webhook-handler.lambda": "npx projen bundle:webhook-handler.lambda", + "bundle:webhook-handler.lambda:watch": "npx projen bundle:webhook-handler.lambda:watch", "clobber": "npx projen clobber", "compat": "npx projen compat", "compile": "npx projen compile", diff --git a/src/lambdas/delete-runner-function.ts b/src/delete-runner-function.ts similarity index 76% rename from src/lambdas/delete-runner-function.ts rename to src/delete-runner-function.ts index 3ed89b46..4ffd6e8d 100644 --- a/src/lambdas/delete-runner-function.ts +++ b/src/delete-runner-function.ts @@ -10,16 +10,16 @@ export interface DeleteRunnerFunctionProps extends lambda.FunctionOptions { } /** - * An AWS Lambda function which executes src/lambdas/delete-runner. + * An AWS Lambda function which executes src/delete-runner. */ export class DeleteRunnerFunction extends lambda.Function { constructor(scope: Construct, id: string, props?: DeleteRunnerFunctionProps) { super(scope, id, { - description: 'src/lambdas/delete-runner.lambda.ts', + description: 'src/delete-runner.lambda.ts', ...props, runtime: new lambda.Runtime('nodejs16.x', lambda.RuntimeFamily.NODEJS), handler: 'index.handler', - code: lambda.Code.fromAsset(path.join(__dirname, '../../assets/lambdas/delete-runner.lambda')), + code: lambda.Code.fromAsset(path.join(__dirname, '../assets/delete-runner.lambda')), }); this.addEnvironment('AWS_NODEJS_CONNECTION_REUSE_ENABLED', '1', { removeInEdge: true }); } diff --git a/src/lambdas/delete-runner.lambda.ts b/src/delete-runner.lambda.ts similarity index 97% rename from src/lambdas/delete-runner.lambda.ts rename to src/delete-runner.lambda.ts index 1ac10567..84978b14 100644 --- a/src/lambdas/delete-runner.lambda.ts +++ b/src/delete-runner.lambda.ts @@ -1,7 +1,7 @@ // eslint-disable-next-line import/no-extraneous-dependencies import { RequestError } from '@octokit/request-error'; import { getOctokit } from './github'; -import { StepFunctionLambdaInput } from './helpers'; +import { StepFunctionLambdaInput } from './lambda-helpers'; interface DeleteRunnerInput extends StepFunctionLambdaInput { readonly idleOnly: boolean; diff --git a/src/lambdas/github.ts b/src/github.ts similarity index 94% rename from src/lambdas/github.ts rename to src/github.ts index 01a37485..d07a0cb4 100644 --- a/src/lambdas/github.ts +++ b/src/github.ts @@ -1,7 +1,7 @@ /* eslint-disable import/no-extraneous-dependencies */ import { createAppAuth } from '@octokit/auth-app'; import { Octokit } from '@octokit/rest'; -import { getSecretValue, getSecretJsonValue } from './helpers'; +import { getSecretValue, getSecretJsonValue } from './lambda-helpers'; export function baseUrlFromDomain(domain: string): string { if (domain == 'github.com') { diff --git a/src/lambdas/helpers.ts b/src/lambda-helpers.ts similarity index 100% rename from src/lambdas/helpers.ts rename to src/lambda-helpers.ts diff --git a/src/lambdas/aws-image-builder-versioner-function.ts b/src/lambdas/aws-image-builder-versioner-function.ts deleted file mode 100644 index abd41cf7..00000000 --- a/src/lambdas/aws-image-builder-versioner-function.ts +++ /dev/null @@ -1,26 +0,0 @@ -// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". -import * as path from 'path'; -import * as lambda from 'aws-cdk-lib/aws-lambda'; -import { Construct } from 'constructs'; - -/** - * Props for AwsImageBuilderVersionerFunction - */ -export interface AwsImageBuilderVersionerFunctionProps extends lambda.FunctionOptions { -} - -/** - * An AWS Lambda function which executes src/lambdas/aws-image-builder-versioner. - */ -export class AwsImageBuilderVersionerFunction extends lambda.Function { - constructor(scope: Construct, id: string, props?: AwsImageBuilderVersionerFunctionProps) { - super(scope, id, { - description: 'src/lambdas/aws-image-builder-versioner.lambda.ts', - ...props, - runtime: new lambda.Runtime('nodejs16.x', lambda.RuntimeFamily.NODEJS), - handler: 'index.handler', - code: lambda.Code.fromAsset(path.join(__dirname, '../../assets/lambdas/aws-image-builder-versioner.lambda')), - }); - this.addEnvironment('AWS_NODEJS_CONNECTION_REUSE_ENABLED', '1', { removeInEdge: true }); - } -} \ No newline at end of file diff --git a/src/lambdas/build-image-function.ts b/src/providers/build-image-function.ts similarity index 82% rename from src/lambdas/build-image-function.ts rename to src/providers/build-image-function.ts index fc235543..d4301989 100644 --- a/src/lambdas/build-image-function.ts +++ b/src/providers/build-image-function.ts @@ -10,16 +10,16 @@ export interface BuildImageFunctionProps extends lambda.FunctionOptions { } /** - * An AWS Lambda function which executes src/lambdas/build-image. + * An AWS Lambda function which executes src/providers/build-image. */ export class BuildImageFunction extends lambda.Function { constructor(scope: Construct, id: string, props?: BuildImageFunctionProps) { super(scope, id, { - description: 'src/lambdas/build-image.lambda.ts', + description: 'src/providers/build-image.lambda.ts', ...props, runtime: new lambda.Runtime('nodejs16.x', lambda.RuntimeFamily.NODEJS), handler: 'index.handler', - code: lambda.Code.fromAsset(path.join(__dirname, '../../assets/lambdas/build-image.lambda')), + code: lambda.Code.fromAsset(path.join(__dirname, '../../assets/providers/build-image.lambda')), }); this.addEnvironment('AWS_NODEJS_CONNECTION_REUSE_ENABLED', '1', { removeInEdge: true }); } diff --git a/src/lambdas/build-image.lambda.ts b/src/providers/build-image.lambda.ts similarity index 98% rename from src/lambdas/build-image.lambda.ts rename to src/providers/build-image.lambda.ts index 49c77e14..0ebc0e27 100644 --- a/src/lambdas/build-image.lambda.ts +++ b/src/providers/build-image.lambda.ts @@ -2,7 +2,7 @@ import * as AWSLambda from 'aws-lambda'; /* eslint-disable-next-line import/no-extraneous-dependencies */ import * as AWS from 'aws-sdk'; -import { customResourceRespond } from './helpers'; +import { customResourceRespond } from '../lambda-helpers'; const codebuild = new AWS.CodeBuild(); const ecr = new AWS.ECR(); diff --git a/src/providers/image-builders/aws-image-builder/builder.ts b/src/providers/image-builders/aws-image-builder/builder.ts index 3452069c..400b5881 100644 --- a/src/providers/image-builders/aws-image-builder/builder.ts +++ b/src/providers/image-builders/aws-image-builder/builder.ts @@ -22,10 +22,10 @@ import { Construct, IConstruct } from 'constructs'; import { AmiRecipe, defaultBaseAmi } from './ami'; import { ImageBuilderObjectBase } from './common'; import { ContainerRecipe, defaultBaseDockerImage } from './container'; +import { DeleteAmiFunction } from './delete-ami-function'; import { FilterFailedBuildsFunction } from './filter-failed-builds-function'; -import { BuildImageFunction } from '../../../lambdas/build-image-function'; -import { DeleteAmiFunction } from '../../../lambdas/delete-ami-function'; import { singletonLambda } from '../../../utils'; +import { BuildImageFunction } from '../../build-image-function'; import { Architecture, Os, RunnerAmi, RunnerImage, RunnerVersion } from '../../common'; import { RunnerImageBuilderBase, RunnerImageBuilderProps, uniqueImageBuilderName } from '../common'; diff --git a/src/providers/image-builders/aws-image-builder/common.ts b/src/providers/image-builders/aws-image-builder/common.ts index 655aea2e..2d2eb485 100644 --- a/src/providers/image-builders/aws-image-builder/common.ts +++ b/src/providers/image-builders/aws-image-builder/common.ts @@ -1,7 +1,7 @@ import * as cdk from 'aws-cdk-lib'; import { aws_iam as iam, aws_logs as logs, CustomResource } from 'aws-cdk-lib'; import { Construct } from 'constructs'; -import { AwsImageBuilderVersionerFunction } from '../../../lambdas/aws-image-builder-versioner-function'; +import { VersionerFunction } from './versioner-function'; import { singletonLambda } from '../../../utils'; /** @@ -25,8 +25,8 @@ export abstract class ImageBuilderObjectBase extends cdk.Resource { }).ref; } - private versionFunction(): AwsImageBuilderVersionerFunction { - return singletonLambda(AwsImageBuilderVersionerFunction, this, 'aws-image-builder-versioner', { + private versionFunction(): VersionerFunction { + return singletonLambda(VersionerFunction, this, 'aws-image-builder-versioner', { description: 'Custom resource handler that bumps up Image Builder versions', initialPolicy: [ new iam.PolicyStatement({ diff --git a/src/lambdas/delete-ami-function.ts b/src/providers/image-builders/aws-image-builder/delete-ami-function.ts similarity index 68% rename from src/lambdas/delete-ami-function.ts rename to src/providers/image-builders/aws-image-builder/delete-ami-function.ts index b58002d3..b1d21d7d 100644 --- a/src/lambdas/delete-ami-function.ts +++ b/src/providers/image-builders/aws-image-builder/delete-ami-function.ts @@ -10,16 +10,16 @@ export interface DeleteAmiFunctionProps extends lambda.FunctionOptions { } /** - * An AWS Lambda function which executes src/lambdas/delete-ami. + * An AWS Lambda function which executes src/providers/image-builders/aws-image-builder/delete-ami. */ export class DeleteAmiFunction extends lambda.Function { constructor(scope: Construct, id: string, props?: DeleteAmiFunctionProps) { super(scope, id, { - description: 'src/lambdas/delete-ami.lambda.ts', + description: 'src/providers/image-builders/aws-image-builder/delete-ami.lambda.ts', ...props, runtime: new lambda.Runtime('nodejs16.x', lambda.RuntimeFamily.NODEJS), handler: 'index.handler', - code: lambda.Code.fromAsset(path.join(__dirname, '../../assets/lambdas/delete-ami.lambda')), + code: lambda.Code.fromAsset(path.join(__dirname, '../../../../assets/providers/image-builders/aws-image-builder/delete-ami.lambda')), }); this.addEnvironment('AWS_NODEJS_CONNECTION_REUSE_ENABLED', '1', { removeInEdge: true }); } diff --git a/src/lambdas/delete-ami.lambda.ts b/src/providers/image-builders/aws-image-builder/delete-ami.lambda.ts similarity index 98% rename from src/lambdas/delete-ami.lambda.ts rename to src/providers/image-builders/aws-image-builder/delete-ami.lambda.ts index efe7ab15..a91913e3 100644 --- a/src/lambdas/delete-ami.lambda.ts +++ b/src/providers/image-builders/aws-image-builder/delete-ami.lambda.ts @@ -2,7 +2,8 @@ import * as AWSLambda from 'aws-lambda'; /* eslint-disable-next-line import/no-extraneous-dependencies */ import * as AWS from 'aws-sdk'; -import { customResourceRespond } from './helpers'; +import { customResourceRespond } from '../../../lambda-helpers'; + const ec2 = new AWS.EC2(); diff --git a/src/providers/image-builders/aws-image-builder/deprecated/ami.ts b/src/providers/image-builders/aws-image-builder/deprecated/ami.ts index 371496dd..0512ad45 100644 --- a/src/providers/image-builders/aws-image-builder/deprecated/ami.ts +++ b/src/providers/image-builders/aws-image-builder/deprecated/ami.ts @@ -15,12 +15,12 @@ import { Construct } from 'constructs'; import { ImageBuilderBase } from './common'; import { LinuxUbuntuComponents } from './linux-components'; import { WindowsComponents } from './windows-components'; -import { DeleteAmiFunction } from '../../../../lambdas/delete-ami-function'; import { singletonLambda } from '../../../../utils'; import { Architecture, Os, RunnerAmi, RunnerImage, RunnerVersion } from '../../../common'; import { uniqueImageBuilderName } from '../../common'; import { AmiRecipe, defaultBaseAmi } from '../ami'; import { ImageBuilderComponent } from '../builder'; +import { DeleteAmiFunction } from '../delete-ami-function'; /** * Properties for {@link AmiBuilder} construct. diff --git a/src/providers/image-builders/aws-image-builder/deprecated/container.ts b/src/providers/image-builders/aws-image-builder/deprecated/container.ts index 34b3e551..15667d55 100644 --- a/src/providers/image-builders/aws-image-builder/deprecated/container.ts +++ b/src/providers/image-builders/aws-image-builder/deprecated/container.ts @@ -15,8 +15,8 @@ import { Construct } from 'constructs'; import { ImageBuilderBase } from './common'; import { LinuxUbuntuComponents } from './linux-components'; import { WindowsComponents } from './windows-components'; -import { BuildImageFunction } from '../../../../lambdas/build-image-function'; import { singletonLambda } from '../../../../utils'; +import { BuildImageFunction } from '../../../build-image-function'; import { Architecture, Os, RunnerAmi, RunnerImage, RunnerVersion } from '../../../common'; import { uniqueImageBuilderName } from '../../common'; import { ImageBuilderComponent } from '../builder'; diff --git a/src/providers/image-builders/aws-image-builder/versioner-function.ts b/src/providers/image-builders/aws-image-builder/versioner-function.ts new file mode 100644 index 00000000..9d70ee0d --- /dev/null +++ b/src/providers/image-builders/aws-image-builder/versioner-function.ts @@ -0,0 +1,26 @@ +// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +import * as path from 'path'; +import * as lambda from 'aws-cdk-lib/aws-lambda'; +import { Construct } from 'constructs'; + +/** + * Props for VersionerFunction + */ +export interface VersionerFunctionProps extends lambda.FunctionOptions { +} + +/** + * An AWS Lambda function which executes src/providers/image-builders/aws-image-builder/versioner. + */ +export class VersionerFunction extends lambda.Function { + constructor(scope: Construct, id: string, props?: VersionerFunctionProps) { + super(scope, id, { + description: 'src/providers/image-builders/aws-image-builder/versioner.lambda.ts', + ...props, + runtime: new lambda.Runtime('nodejs16.x', lambda.RuntimeFamily.NODEJS), + handler: 'index.handler', + code: lambda.Code.fromAsset(path.join(__dirname, '../../../../assets/providers/image-builders/aws-image-builder/versioner.lambda')), + }); + this.addEnvironment('AWS_NODEJS_CONNECTION_REUSE_ENABLED', '1', { removeInEdge: true }); + } +} \ No newline at end of file diff --git a/src/lambdas/aws-image-builder-versioner.lambda.ts b/src/providers/image-builders/aws-image-builder/versioner.lambda.ts similarity index 98% rename from src/lambdas/aws-image-builder-versioner.lambda.ts rename to src/providers/image-builders/aws-image-builder/versioner.lambda.ts index ef1656fa..85bff4e6 100644 --- a/src/lambdas/aws-image-builder-versioner.lambda.ts +++ b/src/providers/image-builders/aws-image-builder/versioner.lambda.ts @@ -3,7 +3,7 @@ import * as AWSLambda from 'aws-lambda'; /* eslint-disable import/no-extraneous-dependencies */ import * as AWS from 'aws-sdk'; import { inc, maxSatisfying } from 'semver'; -import { customResourceRespond } from './helpers'; +import { customResourceRespond } from '../../../lambda-helpers'; const ib = new AWS.Imagebuilder(); diff --git a/src/providers/image-builders/codebuild-deprecated.ts b/src/providers/image-builders/codebuild-deprecated.ts index d1f83800..4b22d359 100644 --- a/src/providers/image-builders/codebuild-deprecated.ts +++ b/src/providers/image-builders/codebuild-deprecated.ts @@ -19,8 +19,8 @@ import { TagMutability, TagStatus } from 'aws-cdk-lib/aws-ecr'; import { RetentionDays } from 'aws-cdk-lib/aws-logs'; import { Construct } from 'constructs'; import { IRunnerImageBuilder } from './common'; -import { BuildImageFunction } from '../../lambdas/build-image-function'; import { singletonLambda } from '../../utils'; +import { BuildImageFunction } from '../build-image-function'; import { Architecture, Os, RunnerAmi, RunnerImage, RunnerVersion } from '../common'; /* diff --git a/src/providers/image-builders/codebuild.ts b/src/providers/image-builders/codebuild.ts index 54d850c2..266cbea8 100644 --- a/src/providers/image-builders/codebuild.ts +++ b/src/providers/image-builders/codebuild.ts @@ -20,8 +20,8 @@ import { RetentionDays } from 'aws-cdk-lib/aws-logs'; import { Construct, IConstruct } from 'constructs'; import { defaultBaseDockerImage } from './aws-image-builder'; import { RunnerImageBuilderBase, RunnerImageBuilderProps } from './common'; -import { BuildImageFunction } from '../../lambdas/build-image-function'; import { singletonLambda } from '../../utils'; +import { BuildImageFunction } from '../build-image-function'; import { Architecture, Os, RunnerAmi, RunnerImage, RunnerVersion } from '../common'; diff --git a/src/providers/lambda.ts b/src/providers/lambda.ts index 88c942a8..3ca7aac9 100644 --- a/src/providers/lambda.ts +++ b/src/providers/lambda.ts @@ -25,7 +25,7 @@ import { RunnerVersion, } from './common'; import { IRunnerImageBuilder, RunnerImageBuilder, RunnerImageBuilderProps, RunnerImageComponent } from './image-builders'; -import { UpdateLambdaFunction } from '../lambdas/update-lambda-function'; +import { UpdateLambdaFunction } from './update-lambda-function'; import { singletonLambda } from '../utils'; export interface LambdaRunnerProviderProps extends RunnerProviderProps { diff --git a/src/lambdas/update-lambda-function.ts b/src/providers/update-lambda-function.ts similarity index 82% rename from src/lambdas/update-lambda-function.ts rename to src/providers/update-lambda-function.ts index 18182417..93ae0e5d 100644 --- a/src/lambdas/update-lambda-function.ts +++ b/src/providers/update-lambda-function.ts @@ -10,16 +10,16 @@ export interface UpdateLambdaFunctionProps extends lambda.FunctionOptions { } /** - * An AWS Lambda function which executes src/lambdas/update-lambda. + * An AWS Lambda function which executes src/providers/update-lambda. */ export class UpdateLambdaFunction extends lambda.Function { constructor(scope: Construct, id: string, props?: UpdateLambdaFunctionProps) { super(scope, id, { - description: 'src/lambdas/update-lambda.lambda.ts', + description: 'src/providers/update-lambda.lambda.ts', ...props, runtime: new lambda.Runtime('nodejs16.x', lambda.RuntimeFamily.NODEJS), handler: 'index.handler', - code: lambda.Code.fromAsset(path.join(__dirname, '../../assets/lambdas/update-lambda.lambda')), + code: lambda.Code.fromAsset(path.join(__dirname, '../../assets/providers/update-lambda.lambda')), }); this.addEnvironment('AWS_NODEJS_CONNECTION_REUSE_ENABLED', '1', { removeInEdge: true }); } diff --git a/src/lambdas/update-lambda.lambda.ts b/src/providers/update-lambda.lambda.ts similarity index 100% rename from src/lambdas/update-lambda.lambda.ts rename to src/providers/update-lambda.lambda.ts diff --git a/src/runner.ts b/src/runner.ts index af59576c..737212af 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -13,16 +13,19 @@ import { } from 'aws-cdk-lib'; import { Construct } from 'constructs'; import { LambdaAccess } from './access'; -import { DeleteRunnerFunction } from './lambdas/delete-runner-function'; -import { SetupFunction } from './lambdas/setup-function'; -import { StatusFunction } from './lambdas/status-function'; -import { TokenRetrieverFunction } from './lambdas/token-retriever-function'; -import { AwsImageBuilderFailedBuildNotifier, CodeBuildImageBuilderFailedBuildNotifier } from './providers'; -import { CodeBuildRunnerProvider } from './providers/codebuild'; -import { IRunnerProvider } from './providers/common'; -import { FargateRunnerProvider } from './providers/fargate'; -import { LambdaRunnerProvider } from './providers/lambda'; +import { DeleteRunnerFunction } from './delete-runner-function'; +import { + AwsImageBuilderFailedBuildNotifier, + CodeBuildImageBuilderFailedBuildNotifier, + CodeBuildRunnerProvider, + FargateRunnerProvider, + IRunnerProvider, + LambdaRunnerProvider, +} from './providers'; import { Secrets } from './secrets'; +import { SetupFunction } from './setup-function'; +import { StatusFunction } from './status-function'; +import { TokenRetrieverFunction } from './token-retriever-function'; import { GithubWebhookHandler } from './webhook'; diff --git a/src/lambdas/setup-function.ts b/src/setup-function.ts similarity index 77% rename from src/lambdas/setup-function.ts rename to src/setup-function.ts index b95b3888..d32fcbd6 100644 --- a/src/lambdas/setup-function.ts +++ b/src/setup-function.ts @@ -10,16 +10,16 @@ export interface SetupFunctionProps extends lambda.FunctionOptions { } /** - * An AWS Lambda function which executes src/lambdas/setup. + * An AWS Lambda function which executes src/setup. */ export class SetupFunction extends lambda.Function { constructor(scope: Construct, id: string, props?: SetupFunctionProps) { super(scope, id, { - description: 'src/lambdas/setup.lambda.ts', + description: 'src/setup.lambda.ts', ...props, runtime: new lambda.Runtime('nodejs16.x', lambda.RuntimeFamily.NODEJS), handler: 'index.handler', - code: lambda.Code.fromAsset(path.join(__dirname, '../../assets/lambdas/setup.lambda')), + code: lambda.Code.fromAsset(path.join(__dirname, '../assets/setup.lambda')), }); this.addEnvironment('AWS_NODEJS_CONNECTION_REUSE_ENABLED', '1', { removeInEdge: true }); } diff --git a/src/lambdas/setup.lambda.ts b/src/setup.lambda.ts similarity index 98% rename from src/lambdas/setup.lambda.ts rename to src/setup.lambda.ts index 49ec190a..ba7b450b 100644 --- a/src/lambdas/setup.lambda.ts +++ b/src/setup.lambda.ts @@ -5,7 +5,7 @@ import { Octokit } from '@octokit/rest'; /* eslint-disable-next-line import/no-extraneous-dependencies,import/no-unresolved */ import * as AWSLambda from 'aws-lambda'; import { baseUrlFromDomain } from './github'; -import { getSecretJsonValue, updateSecretValue } from './helpers'; +import { getSecretJsonValue, updateSecretValue } from './lambda-helpers'; type ApiGatewayEvent = AWSLambda.APIGatewayProxyEvent | AWSLambda.APIGatewayProxyEventV2; diff --git a/src/lambdas/status-function.ts b/src/status-function.ts similarity index 77% rename from src/lambdas/status-function.ts rename to src/status-function.ts index 6113552b..bdf60408 100644 --- a/src/lambdas/status-function.ts +++ b/src/status-function.ts @@ -10,16 +10,16 @@ export interface StatusFunctionProps extends lambda.FunctionOptions { } /** - * An AWS Lambda function which executes src/lambdas/status. + * An AWS Lambda function which executes src/status. */ export class StatusFunction extends lambda.Function { constructor(scope: Construct, id: string, props?: StatusFunctionProps) { super(scope, id, { - description: 'src/lambdas/status.lambda.ts', + description: 'src/status.lambda.ts', ...props, runtime: new lambda.Runtime('nodejs16.x', lambda.RuntimeFamily.NODEJS), handler: 'index.handler', - code: lambda.Code.fromAsset(path.join(__dirname, '../../assets/lambdas/status.lambda')), + code: lambda.Code.fromAsset(path.join(__dirname, '../assets/status.lambda')), }); this.addEnvironment('AWS_NODEJS_CONNECTION_REUSE_ENABLED', '1', { removeInEdge: true }); } diff --git a/src/lambdas/status.lambda.ts b/src/status.lambda.ts similarity index 99% rename from src/lambdas/status.lambda.ts rename to src/status.lambda.ts index 5d7784a8..55863651 100644 --- a/src/lambdas/status.lambda.ts +++ b/src/status.lambda.ts @@ -2,10 +2,10 @@ import { createAppAuth } from '@octokit/auth-app'; import { Octokit } from '@octokit/core'; import * as AWSLambda from 'aws-lambda'; +/* eslint-disable-next-line import/no-extraneous-dependencies,import/no-unresolved */ import * as AWS from 'aws-sdk'; import { baseUrlFromDomain } from './github'; -import { getSecretJsonValue, getSecretValue } from './helpers'; -/* eslint-disable-next-line import/no-extraneous-dependencies,import/no-unresolved */ +import { getSecretJsonValue, getSecretValue } from './lambda-helpers'; const cfn = new AWS.CloudFormation(); const ec2 = new AWS.EC2(); diff --git a/src/lambdas/token-retriever-function.ts b/src/token-retriever-function.ts similarity index 75% rename from src/lambdas/token-retriever-function.ts rename to src/token-retriever-function.ts index f346794b..ec7eb4b7 100644 --- a/src/lambdas/token-retriever-function.ts +++ b/src/token-retriever-function.ts @@ -10,16 +10,16 @@ export interface TokenRetrieverFunctionProps extends lambda.FunctionOptions { } /** - * An AWS Lambda function which executes src/lambdas/token-retriever. + * An AWS Lambda function which executes src/token-retriever. */ export class TokenRetrieverFunction extends lambda.Function { constructor(scope: Construct, id: string, props?: TokenRetrieverFunctionProps) { super(scope, id, { - description: 'src/lambdas/token-retriever.lambda.ts', + description: 'src/token-retriever.lambda.ts', ...props, runtime: new lambda.Runtime('nodejs16.x', lambda.RuntimeFamily.NODEJS), handler: 'index.handler', - code: lambda.Code.fromAsset(path.join(__dirname, '../../assets/lambdas/token-retriever.lambda')), + code: lambda.Code.fromAsset(path.join(__dirname, '../assets/token-retriever.lambda')), }); this.addEnvironment('AWS_NODEJS_CONNECTION_REUSE_ENABLED', '1', { removeInEdge: true }); } diff --git a/src/lambdas/token-retriever.lambda.ts b/src/token-retriever.lambda.ts similarity index 87% rename from src/lambdas/token-retriever.lambda.ts rename to src/token-retriever.lambda.ts index d0ee0356..922f5010 100644 --- a/src/lambdas/token-retriever.lambda.ts +++ b/src/token-retriever.lambda.ts @@ -1,5 +1,5 @@ import { getOctokit } from './github'; -import { StepFunctionLambdaInput } from './helpers'; +import { StepFunctionLambdaInput } from './lambda-helpers'; exports.handler = async function (event: StepFunctionLambdaInput) { const { githubSecrets, octokit } = await getOctokit(event.installationId); diff --git a/src/lambdas/webhook-handler-function.ts b/src/webhook-handler-function.ts similarity index 75% rename from src/lambdas/webhook-handler-function.ts rename to src/webhook-handler-function.ts index 2ffd092e..0a8d3a5e 100644 --- a/src/lambdas/webhook-handler-function.ts +++ b/src/webhook-handler-function.ts @@ -10,16 +10,16 @@ export interface WebhookHandlerFunctionProps extends lambda.FunctionOptions { } /** - * An AWS Lambda function which executes src/lambdas/webhook-handler. + * An AWS Lambda function which executes src/webhook-handler. */ export class WebhookHandlerFunction extends lambda.Function { constructor(scope: Construct, id: string, props?: WebhookHandlerFunctionProps) { super(scope, id, { - description: 'src/lambdas/webhook-handler.lambda.ts', + description: 'src/webhook-handler.lambda.ts', ...props, runtime: new lambda.Runtime('nodejs16.x', lambda.RuntimeFamily.NODEJS), handler: 'index.handler', - code: lambda.Code.fromAsset(path.join(__dirname, '../../assets/lambdas/webhook-handler.lambda')), + code: lambda.Code.fromAsset(path.join(__dirname, '../assets/webhook-handler.lambda')), }); this.addEnvironment('AWS_NODEJS_CONNECTION_REUSE_ENABLED', '1', { removeInEdge: true }); } diff --git a/src/lambdas/webhook-handler.lambda.ts b/src/webhook-handler.lambda.ts similarity index 98% rename from src/lambdas/webhook-handler.lambda.ts rename to src/webhook-handler.lambda.ts index c09fe451..88053d3c 100644 --- a/src/lambdas/webhook-handler.lambda.ts +++ b/src/webhook-handler.lambda.ts @@ -3,7 +3,7 @@ import * as crypto from 'crypto'; /* eslint-disable-next-line import/no-extraneous-dependencies,import/no-unresolved */ import * as AWSLambda from 'aws-lambda'; import * as AWS from 'aws-sdk'; -import { getSecretJsonValue } from './helpers'; +import { getSecretJsonValue } from './lambda-helpers'; const sf = new AWS.StepFunctions(); diff --git a/src/webhook.ts b/src/webhook.ts index 7ce9b351..07e17a37 100644 --- a/src/webhook.ts +++ b/src/webhook.ts @@ -2,8 +2,8 @@ import * as cdk from 'aws-cdk-lib'; import { aws_logs as logs, aws_stepfunctions as stepfunctions } from 'aws-cdk-lib'; import { Construct } from 'constructs'; import { LambdaAccess } from './access'; -import { WebhookHandlerFunction } from './lambdas/webhook-handler-function'; import { Secrets } from './secrets'; +import { WebhookHandlerFunction } from './webhook-handler-function'; /** * Properties for GithubWebhookHandler diff --git a/test/default.integ.snapshot/github-runners-test.assets.json b/test/default.integ.snapshot/github-runners-test.assets.json index e457e0a2..9ec557d0 100644 --- a/test/default.integ.snapshot/github-runners-test.assets.json +++ b/test/default.integ.snapshot/github-runners-test.assets.json @@ -14,15 +14,15 @@ } } }, - "cce9d43a5bc86408a6dc113c7884bf669a70b8871afdaa5a58e980b2fdc2f690": { + "c9749e09be6e3c3035293f90674e1e9bd7c4c1b6a29e8376ac43f26c773d2cba": { "source": { - "path": "asset.cce9d43a5bc86408a6dc113c7884bf669a70b8871afdaa5a58e980b2fdc2f690.lambda", + "path": "asset.c9749e09be6e3c3035293f90674e1e9bd7c4c1b6a29e8376ac43f26c773d2cba.lambda", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "cce9d43a5bc86408a6dc113c7884bf669a70b8871afdaa5a58e980b2fdc2f690.zip", + "objectKey": "c9749e09be6e3c3035293f90674e1e9bd7c4c1b6a29e8376ac43f26c773d2cba.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -40,15 +40,15 @@ } } }, - "ed9d70b884c710671d2f38d3c07b5be67ed5f512b92922bf21a4ccdf61c3c8b9": { + "5bb0b8ee7f8f2889b388551e9b2890bf770a00aee05b0fbdab87f71125cabe9b": { "source": { - "path": "asset.ed9d70b884c710671d2f38d3c07b5be67ed5f512b92922bf21a4ccdf61c3c8b9.lambda", + "path": "asset.5bb0b8ee7f8f2889b388551e9b2890bf770a00aee05b0fbdab87f71125cabe9b.lambda", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ed9d70b884c710671d2f38d3c07b5be67ed5f512b92922bf21a4ccdf61c3c8b9.zip", + "objectKey": "5bb0b8ee7f8f2889b388551e9b2890bf770a00aee05b0fbdab87f71125cabe9b.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -92,93 +92,93 @@ } } }, - "538485fcd4f67ef943ca40cf1a41902101af04990c1c3b36c0be33c386526f80": { + "76f1588e07dd22a1d1f6c19fd56c39b7c3b3311c906f11049f85dcc3665d2145": { "source": { - "path": "asset.538485fcd4f67ef943ca40cf1a41902101af04990c1c3b36c0be33c386526f80.lambda", + "path": "asset.76f1588e07dd22a1d1f6c19fd56c39b7c3b3311c906f11049f85dcc3665d2145.lambda", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "538485fcd4f67ef943ca40cf1a41902101af04990c1c3b36c0be33c386526f80.zip", + "objectKey": "76f1588e07dd22a1d1f6c19fd56c39b7c3b3311c906f11049f85dcc3665d2145.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "24a14dec593eff4936f53f00700f130442d79e7147c93aaeb9508811f2154332": { + "1b8785b241813be3d78ce9ec612bde747895238f442ee47261a296bcc05b4582": { "source": { - "path": "asset.24a14dec593eff4936f53f00700f130442d79e7147c93aaeb9508811f2154332.lambda", + "path": "asset.1b8785b241813be3d78ce9ec612bde747895238f442ee47261a296bcc05b4582.lambda", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "24a14dec593eff4936f53f00700f130442d79e7147c93aaeb9508811f2154332.zip", + "objectKey": "1b8785b241813be3d78ce9ec612bde747895238f442ee47261a296bcc05b4582.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "e8539313156d300fd2cb24fb660fee40d6cd5bbe94208f469dc63b59483756a8": { + "5aaafd7007b24bcb09ea9b5ac2c61637f70481bffcc18fe6c09c55573d6b8f1a": { "source": { - "path": "asset.e8539313156d300fd2cb24fb660fee40d6cd5bbe94208f469dc63b59483756a8.lambda", + "path": "asset.5aaafd7007b24bcb09ea9b5ac2c61637f70481bffcc18fe6c09c55573d6b8f1a.lambda", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e8539313156d300fd2cb24fb660fee40d6cd5bbe94208f469dc63b59483756a8.zip", + "objectKey": "5aaafd7007b24bcb09ea9b5ac2c61637f70481bffcc18fe6c09c55573d6b8f1a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "58f7728341641b8e03781eebbcb5edda2feadf18747a28c9b5e50f4856670e9e": { + "b18d626f1bd45040245f285d51a25165f6c4a86c21cf24c8ce966d4c77e260e0": { "source": { - "path": "asset.58f7728341641b8e03781eebbcb5edda2feadf18747a28c9b5e50f4856670e9e.lambda", + "path": "asset.b18d626f1bd45040245f285d51a25165f6c4a86c21cf24c8ce966d4c77e260e0.lambda", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "58f7728341641b8e03781eebbcb5edda2feadf18747a28c9b5e50f4856670e9e.zip", + "objectKey": "b18d626f1bd45040245f285d51a25165f6c4a86c21cf24c8ce966d4c77e260e0.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "333be5867c6aea394588bbc0a6997629baf770b41b8022d25bb9d97cd256b878": { + "d74a3d886e6a038a7db2c9fa8ca2c8f44267a58a594c9f361aeedf969ac70a31": { "source": { - "path": "asset.333be5867c6aea394588bbc0a6997629baf770b41b8022d25bb9d97cd256b878.lambda", + "path": "asset.d74a3d886e6a038a7db2c9fa8ca2c8f44267a58a594c9f361aeedf969ac70a31.lambda", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "333be5867c6aea394588bbc0a6997629baf770b41b8022d25bb9d97cd256b878.zip", + "objectKey": "d74a3d886e6a038a7db2c9fa8ca2c8f44267a58a594c9f361aeedf969ac70a31.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "de4281ec80d54dac5d4bbfdb159dc27a80e80d4b36e0a037a0b1ddfd1f96558d": { + "384d7936c7595ec1f1462ed4cb4f4a7c2b8788af1b76a91e6d1d38c8a57ce387": { "source": { - "path": "asset.de4281ec80d54dac5d4bbfdb159dc27a80e80d4b36e0a037a0b1ddfd1f96558d.lambda", + "path": "asset.384d7936c7595ec1f1462ed4cb4f4a7c2b8788af1b76a91e6d1d38c8a57ce387.lambda", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "de4281ec80d54dac5d4bbfdb159dc27a80e80d4b36e0a037a0b1ddfd1f96558d.zip", + "objectKey": "384d7936c7595ec1f1462ed4cb4f4a7c2b8788af1b76a91e6d1d38c8a57ce387.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "67f187cae4cb153f8f04c7596631bc96043b73ad54ba5edb7af4dca3e7a0ed2b": { + "7d2f695fc1ce2618a089a9f0927884bae42decf94c389ff77c321bcecf2d76ec": { "source": { - "path": "asset.67f187cae4cb153f8f04c7596631bc96043b73ad54ba5edb7af4dca3e7a0ed2b.lambda", + "path": "asset.7d2f695fc1ce2618a089a9f0927884bae42decf94c389ff77c321bcecf2d76ec.lambda", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "67f187cae4cb153f8f04c7596631bc96043b73ad54ba5edb7af4dca3e7a0ed2b.zip", + "objectKey": "7d2f695fc1ce2618a089a9f0927884bae42decf94c389ff77c321bcecf2d76ec.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -196,7 +196,7 @@ } } }, - "3eae1c989c4929e82fc388bb698cb8ef1310f800f06fee5e92b0ed0824cc1245": { + "9fa2827020b9ee33e0fd0cf3d0a32f02dd9410d6ded99e56a3ece8594ba49ecb": { "source": { "path": "github-runners-test.template.json", "packaging": "file" @@ -204,7 +204,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3eae1c989c4929e82fc388bb698cb8ef1310f800f06fee5e92b0ed0824cc1245.json", + "objectKey": "9fa2827020b9ee33e0fd0cf3d0a32f02dd9410d6ded99e56a3ece8594ba49ecb.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/test/default.integ.snapshot/github-runners-test.template.json b/test/default.integ.snapshot/github-runners-test.template.json index 9a25d3ba..6ddadb5f 100644 --- a/test/default.integ.snapshot/github-runners-test.template.json +++ b/test/default.integ.snapshot/github-runners-test.template.json @@ -8446,7 +8446,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "cce9d43a5bc86408a6dc113c7884bf669a70b8871afdaa5a58e980b2fdc2f690.zip" + "S3Key": "c9749e09be6e3c3035293f90674e1e9bd7c4c1b6a29e8376ac43f26c773d2cba.zip" }, "Role": { "Fn::GetAtt": [ @@ -9219,7 +9219,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "ed9d70b884c710671d2f38d3c07b5be67ed5f512b92922bf21a4ccdf61c3c8b9.zip" + "S3Key": "5bb0b8ee7f8f2889b388551e9b2890bf770a00aee05b0fbdab87f71125cabe9b.zip" }, "Role": { "Fn::GetAtt": [ @@ -11398,7 +11398,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "538485fcd4f67ef943ca40cf1a41902101af04990c1c3b36c0be33c386526f80.zip" + "S3Key": "76f1588e07dd22a1d1f6c19fd56c39b7c3b3311c906f11049f85dcc3665d2145.zip" }, "Role": { "Fn::GetAtt": [ @@ -13092,7 +13092,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "24a14dec593eff4936f53f00700f130442d79e7147c93aaeb9508811f2154332.zip" + "S3Key": "1b8785b241813be3d78ce9ec612bde747895238f442ee47261a296bcc05b4582.zip" }, "Role": { "Fn::GetAtt": [ @@ -13679,7 +13679,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "e8539313156d300fd2cb24fb660fee40d6cd5bbe94208f469dc63b59483756a8.zip" + "S3Key": "5aaafd7007b24bcb09ea9b5ac2c61637f70481bffcc18fe6c09c55573d6b8f1a.zip" }, "Role": { "Fn::GetAtt": [ @@ -13805,7 +13805,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "58f7728341641b8e03781eebbcb5edda2feadf18747a28c9b5e50f4856670e9e.zip" + "S3Key": "b18d626f1bd45040245f285d51a25165f6c4a86c21cf24c8ce966d4c77e260e0.zip" }, "Role": { "Fn::GetAtt": [ @@ -15882,7 +15882,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "333be5867c6aea394588bbc0a6997629baf770b41b8022d25bb9d97cd256b878.zip" + "S3Key": "d74a3d886e6a038a7db2c9fa8ca2c8f44267a58a594c9f361aeedf969ac70a31.zip" }, "Role": { "Fn::GetAtt": [ @@ -16074,7 +16074,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "de4281ec80d54dac5d4bbfdb159dc27a80e80d4b36e0a037a0b1ddfd1f96558d.zip" + "S3Key": "384d7936c7595ec1f1462ed4cb4f4a7c2b8788af1b76a91e6d1d38c8a57ce387.zip" }, "Role": { "Fn::GetAtt": [ @@ -16423,7 +16423,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "67f187cae4cb153f8f04c7596631bc96043b73ad54ba5edb7af4dca3e7a0ed2b.zip" + "S3Key": "7d2f695fc1ce2618a089a9f0927884bae42decf94c389ff77c321bcecf2d76ec.zip" }, "Role": { "Fn::GetAtt": [ diff --git a/test/default.integ.snapshot/manifest.json b/test/default.integ.snapshot/manifest.json index b6279f8d..9f4be726 100644 --- a/test/default.integ.snapshot/manifest.json +++ b/test/default.integ.snapshot/manifest.json @@ -23,7 +23,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3eae1c989c4929e82fc388bb698cb8ef1310f800f06fee5e92b0ed0824cc1245.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9fa2827020b9ee33e0fd0cf3d0a32f02dd9410d6ded99e56a3ece8594ba49ecb.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/test/default.integ.snapshot/tree.json b/test/default.integ.snapshot/tree.json index 880d3e72..ec315e96 100644 --- a/test/default.integ.snapshot/tree.json +++ b/test/default.integ.snapshot/tree.json @@ -9932,7 +9932,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "cce9d43a5bc86408a6dc113c7884bf669a70b8871afdaa5a58e980b2fdc2f690.zip" + "s3Key": "c9749e09be6e3c3035293f90674e1e9bd7c4c1b6a29e8376ac43f26c773d2cba.zip" }, "role": { "Fn::GetAtt": [ @@ -11052,7 +11052,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "ed9d70b884c710671d2f38d3c07b5be67ed5f512b92922bf21a4ccdf61c3c8b9.zip" + "s3Key": "5bb0b8ee7f8f2889b388551e9b2890bf770a00aee05b0fbdab87f71125cabe9b.zip" }, "role": { "Fn::GetAtt": [ @@ -14318,7 +14318,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "538485fcd4f67ef943ca40cf1a41902101af04990c1c3b36c0be33c386526f80.zip" + "s3Key": "76f1588e07dd22a1d1f6c19fd56c39b7c3b3311c906f11049f85dcc3665d2145.zip" }, "role": { "Fn::GetAtt": [ @@ -17052,7 +17052,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "24a14dec593eff4936f53f00700f130442d79e7147c93aaeb9508811f2154332.zip" + "s3Key": "1b8785b241813be3d78ce9ec612bde747895238f442ee47261a296bcc05b4582.zip" }, "role": { "Fn::GetAtt": [ @@ -18207,7 +18207,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "e8539313156d300fd2cb24fb660fee40d6cd5bbe94208f469dc63b59483756a8.zip" + "s3Key": "5aaafd7007b24bcb09ea9b5ac2c61637f70481bffcc18fe6c09c55573d6b8f1a.zip" }, "role": { "Fn::GetAtt": [ @@ -18420,7 +18420,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "58f7728341641b8e03781eebbcb5edda2feadf18747a28c9b5e50f4856670e9e.zip" + "s3Key": "b18d626f1bd45040245f285d51a25165f6c4a86c21cf24c8ce966d4c77e260e0.zip" }, "role": { "Fn::GetAtt": [ @@ -20686,7 +20686,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "333be5867c6aea394588bbc0a6997629baf770b41b8022d25bb9d97cd256b878.zip" + "s3Key": "d74a3d886e6a038a7db2c9fa8ca2c8f44267a58a594c9f361aeedf969ac70a31.zip" }, "role": { "Fn::GetAtt": [ @@ -20997,7 +20997,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "de4281ec80d54dac5d4bbfdb159dc27a80e80d4b36e0a037a0b1ddfd1f96558d.zip" + "s3Key": "384d7936c7595ec1f1462ed4cb4f4a7c2b8788af1b76a91e6d1d38c8a57ce387.zip" }, "role": { "Fn::GetAtt": [ @@ -21451,7 +21451,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "67f187cae4cb153f8f04c7596631bc96043b73ad54ba5edb7af4dca3e7a0ed2b.zip" + "s3Key": "7d2f695fc1ce2618a089a9f0927884bae42decf94c389ff77c321bcecf2d76ec.zip" }, "role": { "Fn::GetAtt": [