From 65952f4527d57af299c2d107f8528b939f377a00 Mon Sep 17 00:00:00 2001 From: Thomas Schuetz Date: Tue, 20 Sep 2022 12:03:29 +0200 Subject: [PATCH] feat: initial version of function runtime Signed-off-by: Thomas Schuetz --- functions-runtime/Dockerfile | 7 +++++++ functions-runtime/README.md | 14 ++++++++++++++ functions-runtime/entrypoint.sh | 5 +++++ 3 files changed, 26 insertions(+) create mode 100644 functions-runtime/Dockerfile create mode 100644 functions-runtime/README.md create mode 100755 functions-runtime/entrypoint.sh diff --git a/functions-runtime/Dockerfile b/functions-runtime/Dockerfile new file mode 100644 index 0000000000..ce854f3190 --- /dev/null +++ b/functions-runtime/Dockerfile @@ -0,0 +1,7 @@ +FROM denoland/deno:1.25.3 + +COPY entrypoint.sh /entrypoint.sh + +USER deno + +ENTRYPOINT /entrypoint.sh diff --git a/functions-runtime/README.md b/functions-runtime/README.md new file mode 100644 index 0000000000..05e922e57d --- /dev/null +++ b/functions-runtime/README.md @@ -0,0 +1,14 @@ +# Keptn Lifecycle Controller - Function Runtime + +## Build +``` +docker build -t keptnsandbox/klc-runtime:${VERSION} . +``` + +## Usage + +### Docker +``` +docker run -e SCRIPT=https://deno.land/std/examples/welcome.ts -it keptnsandbox/klc-runtime:${VERSION} +``` + diff --git a/functions-runtime/entrypoint.sh b/functions-runtime/entrypoint.sh new file mode 100755 index 0000000000..894005a045 --- /dev/null +++ b/functions-runtime/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -eu + +deno run --allow-net $SCRIPT