From 670639e0c2cbb4877c894e3b12efaec3cb0e0698 Mon Sep 17 00:00:00 2001 From: realanna Date: Mon, 12 Jun 2023 14:15:52 +0200 Subject: [PATCH 1/2] remove conflicting file Signed-off-by: realanna fix yaml Signed-off-by: realanna Update python-runtime/README.md Co-authored-by: Meg McRoberts Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com> Update python-runtime/README.md Co-authored-by: Meg McRoberts Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com> fix yaml Signed-off-by: realanna chore: website edit links should point to page Signed-off-by: realanna chore: website edit links should point to page Signed-off-by: realanna feat: add linkable github Signed-off-by: realanna feat: add linkable github Signed-off-by: realanna chore: add example for pyhton taskdef Signed-off-by: realanna chore: add example for pyhton taskdef Signed-off-by: realanna chore: add example for pyhton taskdef Signed-off-by: realanna fix: remove space Signed-off-by: realanna fix: remove space Signed-off-by: realanna Apply suggestions from code review Co-authored-by: Moritz Wiesinger Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com> Update docs/content/en/docs/implementing/tasks/python.md Co-authored-by: Moritz Wiesinger Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com> Update docs/content/en/docs/implementing/tasks/python.md Co-authored-by: Moritz Wiesinger Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com> fix: remove space Signed-off-by: realanna fix: remove space Signed-off-by: realanna fix: remove space Signed-off-by: realanna fix: remove space Signed-off-by: realanna fix: remove space Signed-off-by: realanna fix: remove space Signed-off-by: realanna fix: remove space Signed-off-by: realanna fix: remove space Signed-off-by: realanna docs: adds python runtime doc Signed-off-by: realanna docs: adds python runtime doc Signed-off-by: realanna docs: adds python runtime doc Signed-off-by: realanna docs: adds python runtime doc Signed-off-by: realanna docs: adds python runtime doc Signed-off-by: realanna docs: adds python runtime doc Signed-off-by: realanna docs: adds python runtime doc Signed-off-by: realanna docs: adds python runtime doc Signed-off-by: realanna docs: adds python runtime doc Signed-off-by: realanna docs: adds python runtime doc Signed-off-by: realanna docs: adds python runtime doc Signed-off-by: realanna docs: adds python runtime doc Signed-off-by: realanna docs: adds python runtime doc Signed-off-by: realanna docs: adds python runtime doc Signed-off-by: realanna --- docs/config/_default/config.yaml | 4 ++++ docs/config/_default/params.yaml | 2 ++ docs/content/en/docs/_index.md | 1 + docs/layouts/shortcodes/injectYaml.html | 11 +++++++++++ netlify.toml | 4 ++-- .../taskdefinition_pyfunction_inline.yaml | 2 +- python-runtime/README.md | 7 +++++-- 7 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 docs/layouts/shortcodes/injectYaml.html diff --git a/docs/config/_default/config.yaml b/docs/config/_default/config.yaml index ec5a5616f8..f35b4b0e37 100644 --- a/docs/config/_default/config.yaml +++ b/docs/config/_default/config.yaml @@ -27,6 +27,7 @@ module: - "mentorship" - source: "README.md" target: "./content/community/_index.md" + proxy: direct languages: en: @@ -40,3 +41,6 @@ menu: rel: external url: https://v1.keptn.sh/ weight: 1 + +ignoreErrors: + - "error-remote-getjson" diff --git a/docs/config/_default/params.yaml b/docs/config/_default/params.yaml index a495c4d8da..21fa219dfd 100644 --- a/docs/config/_default/params.yaml +++ b/docs/config/_default/params.yaml @@ -14,6 +14,8 @@ versions: mermaid: enable: true +currentversion: main + links: developer: - desc: Development takes place here! diff --git a/docs/content/en/docs/_index.md b/docs/content/en/docs/_index.md index fecb7357d6..1f05b57db6 100644 --- a/docs/content/en/docs/_index.md +++ b/docs/content/en/docs/_index.md @@ -4,4 +4,5 @@ linktitle: Docs description: Learn how to use Keptn. cascade: type: docs + currentversion: main --- \ No newline at end of file diff --git a/docs/layouts/shortcodes/injectYaml.html b/docs/layouts/shortcodes/injectYaml.html new file mode 100644 index 0000000000..507005c0e3 --- /dev/null +++ b/docs/layouts/shortcodes/injectYaml.html @@ -0,0 +1,11 @@ + +{{ $u := printf "%s%s%s" "https://raw.githubusercontent.com/keptn/lifecycle-toolkit/" (.Page.Params.currentversion) (.Get "path") }} +{{ with resources.GetRemote $u }} +{{ with .Err }} +{{ errorf "%s" . }} +{{ else }} +{{- highlight (.Content | htmlUnescape | safeHTML ) "yaml" -}} +{{ end }} +{{ else }} +{{ errorf "Unable to get remote resource." }} +{{ end }} \ No newline at end of file diff --git a/netlify.toml b/netlify.toml index 67673b1c72..6cc00f9b77 100644 --- a/netlify.toml +++ b/netlify.toml @@ -5,7 +5,7 @@ publish = "public/" # On netlify our branch will always be the one we are currently building for # important information regarding naming # https://gohugo.io/getting-started/configuration/#configure-with-environment-variables -command = "HUGOxPARAMSxGITHUB_BRANCH=$BRANCH hugo -b $DEPLOY_PRIME_URL" +command = "HUGOxPARAMSxGITHUB_BRANCH=$BRANCH HUGOxPARAMSxCURRENTVERSION=$BRANCH hugo -b $DEPLOY_PRIME_URL" ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../netlify.toml" [build.environment] @@ -27,4 +27,4 @@ HUGO_ENV = "production" # On netlify our branch will always be the one we are currently building for # important information regarding naming # https://gohugo.io/getting-started/configuration/#configure-with-environment-variables -command = "HUGOxPARAMSxGITHUB_BRANCH=$BRANCH hugo -b $URL" +command = "HUGOxPARAMSxGITHUB_BRANCH=$BRANCH HUGOxPARAMSxCURRENTVERSION=$BRANCH hugo -b $URL" diff --git a/operator/config/samples/python_execution/taskdefinition_pyfunction_inline.yaml b/operator/config/samples/python_execution/taskdefinition_pyfunction_inline.yaml index b82560f852..652b7b1b9d 100644 --- a/operator/config/samples/python_execution/taskdefinition_pyfunction_inline.yaml +++ b/operator/config/samples/python_execution/taskdefinition_pyfunction_inline.yaml @@ -1,7 +1,7 @@ apiVersion: lifecycle.keptn.sh/v1alpha3 kind: KeptnTaskDefinition metadata: - name: scheduled-deployment + name: scheduled-deployment-inline spec: python: parameters: diff --git a/python-runtime/README.md b/python-runtime/README.md index 207d426869..bf7cab3cbd 100644 --- a/python-runtime/README.md +++ b/python-runtime/README.md @@ -8,9 +8,12 @@ docker build -t lifecycle-toolkit/python-runtime:${VERSION} . ## Usage -The Keptn python runtime uses python3, and enables the follwing packages: requests, json, git, yaml +The Keptn `python-runtime` runner uses python3 +and enables the following packages: requests, json, git, yaml -The Keptn Lifecycle Toolkit uses this runtime to run [KeptnTask](https://lifecycle.keptn.sh/docs/tasks/write-tasks/) +The Keptn Lifecycle Toolkit uses this runner to execute tasks defined as +[KeptnTaskDefinition](https://lifecycle.keptn.sh/docs/yaml-crd-ref/taskdefinition/) +resources. for pre- and post-checks. `KeptnTask`s can be tested locally with the runtime using the following commands. From 76968a34cc31ecf9d05cd9be828fd41c62fefd16 Mon Sep 17 00:00:00 2001 From: realanna Date: Tue, 20 Jun 2023 10:44:25 +0200 Subject: [PATCH 2/2] remove conflicting file Signed-off-by: realanna --- docs/layouts/shortcodes/injectYaml.html | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 docs/layouts/shortcodes/injectYaml.html diff --git a/docs/layouts/shortcodes/injectYaml.html b/docs/layouts/shortcodes/injectYaml.html deleted file mode 100644 index 507005c0e3..0000000000 --- a/docs/layouts/shortcodes/injectYaml.html +++ /dev/null @@ -1,11 +0,0 @@ - -{{ $u := printf "%s%s%s" "https://raw.githubusercontent.com/keptn/lifecycle-toolkit/" (.Page.Params.currentversion) (.Get "path") }} -{{ with resources.GetRemote $u }} -{{ with .Err }} -{{ errorf "%s" . }} -{{ else }} -{{- highlight (.Content | htmlUnescape | safeHTML ) "yaml" -}} -{{ end }} -{{ else }} -{{ errorf "Unable to get remote resource." }} -{{ end }} \ No newline at end of file