From c8800ee352b5d0d5eccd7338cd4fa6a3ae7d2efa Mon Sep 17 00:00:00 2001 From: Thomas Schuetz <38893055+thschue@users.noreply.github.com> Date: Tue, 20 Sep 2022 13:12:43 +0200 Subject: [PATCH] feat: initial version of function runtime (#26) Signed-off-by: Thomas Schuetz 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