diff --git a/docs/config/_default/config.yaml b/docs/config/_default/config.yaml index f0697e4b77..7ff67e2040 100644 --- a/docs/config/_default/config.yaml +++ b/docs/config/_default/config.yaml @@ -4,9 +4,6 @@ title: Keptn module: hugoVersion: extended: true - mounts: - source: content/en - target: content imports: - path: github.com/keptn/docs-tooling ignoreConfig: false @@ -31,12 +28,12 @@ module: - source: "README.md" target: "./content/community/_index.md" - path: github.com/keptn/lifecycle-toolkit/operator - ignoreConfig: true - ignoreImports: true - noVendor: true mounts: - - source: ./config/samples - target: ./content/yaml + - source: "./config/samples/python_execution" + target: ./content/yaml_py + includeFiles: "**/*.yaml" + - source: "./config/samples/function_execution" + target: ./content/yaml_deno includeFiles: "**/*.yaml" proxy: direct diff --git a/docs/content/en/docs/implementing/tasks/python.md b/docs/content/en/docs/implementing/tasks/python.md index b6f0ff28eb..1605beede8 100644 --- a/docs/content/en/docs/implementing/tasks/python.md +++ b/docs/content/en/docs/implementing/tasks/python.md @@ -1,6 +1,6 @@ --- -title: Working with python runtime for Keptn tasks -description: Learn how to work with Keptn tasks using python +title: Working with Python runtime for Keptn tasks +description: Learn how to work with Keptn tasks using Python weight: 90 hidechildren: false # this flag hides all sub-pages in the sidebar-multicard.html @@ -19,34 +19,37 @@ The Python code can be specified as: ## Inline -You can embed python code directly in the task definition. +You can embed Python code directly in the task definition. Consider the following example, where we print data stored in the parameters map: -{{< readfile file="/yaml/python_execution/taskdefinition_pyfunction_inline.yaml" code="true" lang="yaml" >}} +{{< readfile file="/yaml_py/taskdefinition_pyfunction_inline.yaml" code="true" lang="yaml" >}} + +## HTTP reference -## Http reference You can refer to a code stored online, for instance we have a few examples available [here](https://github.com/keptn/lifecycle-toolkit/tree/main/python-runtime/samples). Consider the following: -{{< readfile file="/yaml/python_ execution/taskdefinition_pyfunction_configmap.yaml" code="true" lang="yaml" >}} +{{< readfile file="/yaml_py/taskdefinition_pyfunction_configmap.yaml" code="true" lang="yaml" >}} ## Refer to another TaskDefinition -You can refer to an existing taskDefinition. -Consider the following example, this will call the inline example but will override the data printed with what is specified in the task: -{{< readfile file="/yaml/python_ execution/taskdefinition_pyfunction_recursive.yaml" code="true" lang="yaml" >}} +You can refer to an existing `KeptnTaskDefinition`. +Consider the following example, this will call the inline example but will override the data printed with +what is specified in the task: +{{< readfile file="/yaml_py/taskdefinition_pyfunction_recursive.yaml" code="true" lang="yaml" >}} ## Config Map Consider the following example: -{{< readfile file="/yaml/python_ execution/taskdefinition_pyfunction_configmap.yaml" code="true" lang="yaml" >}} +{{< readfile file="/yaml_py/taskdefinition_pyfunction_configmap.yaml" code="true" lang="yaml" >}} ## Allowed libraries for the Python runtime The following example shows how to use few of the allowed packages, namely: requests, json, git, yaml -{{< readfile file="/yaml/python_ execution/taskdefinition_pyfunction_inline_printargs_py.yaml" code="true" lang="yaml" >}} +{{< readfile file="/yaml_py/taskdefinition_pyfunction_inline_printargs_py.yaml" code="true" lang="yaml" >}} -## Passing secrets, env vars and modifying the python command +## Passing secrets, environment variables and modifying the Python command -In the following examples you can see how to pass data inside the parameter map, how to load a secret in your code and finally how to modify the python command. -In this case the container will run with the option -h which will print the help of the python3 command. +In the following examples you can see how to pass data inside the parameter map, how to load a secret in your code, +and finally how to modify the Python command. +In this case the container will run with the option -h which will print the help of the Python3 command. -{{< readfile file="/yaml/python_ execution/taskdefinition_pyfunction_use_envvars.yaml" code="true" lang="yaml" >}} +{{< readfile file="/yaml_py/taskdefinition_pyfunction_use_envvars.yaml" code="true" lang="yaml" >}} diff --git a/docs/go.mod b/docs/go.mod index cdc21e2c31..361b547e6c 100644 --- a/docs/go.mod +++ b/docs/go.mod @@ -2,6 +2,8 @@ module github.com/keptn/keptn-lifecycle-toolkit/docs go 1.20 +replace github.com/keptn/lifecycle-toolkit/operator => github.com/keptn/lifecycle-toolkit/operator v0.0.0-20230613082428-2d588dbfd240 + require ( github.com/argoproj/argo-rollouts v1.5.1 // indirect github.com/benbjohnson/clock v1.3.5 // indirect @@ -31,12 +33,12 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kelseyhightower/envconfig v1.4.0 // indirect - github.com/keptn/community v0.0.0-20230429154843-72d65a6e2b39 // indirect + github.com/keptn/community v0.0.0-20230612175546-3da2fa53a0c5 // indirect github.com/keptn/docs-tooling v0.1.1 // indirect github.com/keptn/lifecycle-toolkit v0.7.1 // indirect github.com/keptn/lifecycle-toolkit/klt-cert-manager v0.0.0-20230601122212-9eafb78b51d6 // indirect github.com/keptn/lifecycle-toolkit/metrics-operator v0.0.0-20230601125711-bb916f3e3875 // indirect - github.com/keptn/lifecycle-toolkit/operator v0.0.0-20230612132640-751552cb7d5c // indirect + github.com/keptn/lifecycle-toolkit/operator v0.0.0-20230613082428-2d588dbfd240 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect diff --git a/docs/go.sum b/docs/go.sum index 8fcea972fd..c19bfb0838 100644 --- a/docs/go.sum +++ b/docs/go.sum @@ -39,6 +39,7 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/FortAwesome/Font-Awesome v0.0.0-20220831210243-d3a7818c253f/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= +github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/argoproj/argo-rollouts v1.5.1 h1:P1C6oIWn6fwtPvB3u04NQlUGIv8cq/aJvUkbwciuWYo= @@ -145,9 +146,10 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/docsy v0.6.0 h1:43bVF18t2JihAamelQjjGzx1vO2ljCilVrBgetCA8oI= github.com/google/docsy/dependencies v0.6.0 h1:BFXDCINbp8ZuUGl/mrHjMfhCg+b1YX+hVLAA5fGW7Pc= github.com/google/docsy/dependencies v0.6.0/go.mod h1:EDGc2znMbGUw0RW5kWwy2oGgLt0iVXBmoq4UOqstuNE= +github.com/google/docsy/dependencies v0.7.0 h1:/xUlWCZOSMDubHfrhIz1YtaRn2Oc/swfJ7OUfglXE8U= +github.com/google/docsy/dependencies v0.7.0/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4= github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -204,8 +206,8 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= -github.com/keptn/community v0.0.0-20230429154843-72d65a6e2b39 h1:cexkJyNwTSwU+XgNKbu3ttr71rK/W9AwuyqUdefzPfc= -github.com/keptn/community v0.0.0-20230429154843-72d65a6e2b39/go.mod h1:0G5nUhSv7ch9BgIFXiY7+U+cV5SbVmneysNGQwQkH8s= +github.com/keptn/community v0.0.0-20230612175546-3da2fa53a0c5 h1:FYO6bZboEtJZj36Rrsb3hwdHK0wY6W5/JneBxbb6CYQ= +github.com/keptn/community v0.0.0-20230612175546-3da2fa53a0c5/go.mod h1:0G5nUhSv7ch9BgIFXiY7+U+cV5SbVmneysNGQwQkH8s= github.com/keptn/docs-tooling v0.1.1 h1:IuI0Fgs0JrtffLN05iaRZVkRMbPu6h9bxR4C8q1ApGU= github.com/keptn/docs-tooling v0.1.1/go.mod h1:x0iT5YsJosz6wzjQke/YaLgiXF6PV+N8QzxSAc2MY/4= github.com/keptn/lifecycle-toolkit v0.7.1 h1:vBFT9BkQOy23f/+QQhA+n18vtuRgFcZlk3E8mihabww= @@ -214,8 +216,8 @@ github.com/keptn/lifecycle-toolkit/klt-cert-manager v0.0.0-20230601122212-9eafb7 github.com/keptn/lifecycle-toolkit/klt-cert-manager v0.0.0-20230601122212-9eafb78b51d6/go.mod h1:KVv7ImFCBfxN6ocWUeciS31FCHDg7IZD6nfCnuT3mxQ= github.com/keptn/lifecycle-toolkit/metrics-operator v0.0.0-20230601125711-bb916f3e3875 h1:YYzXE9wA9UJikjhq9oBaUdDjZ6JmUDR+7+Sa1a/YT7E= github.com/keptn/lifecycle-toolkit/metrics-operator v0.0.0-20230601125711-bb916f3e3875/go.mod h1:gqIbzhBpk4F6OmDDF25G4L5A9MXJNfd7UP6ATLFFLi0= -github.com/keptn/lifecycle-toolkit/operator v0.0.0-20230612132640-751552cb7d5c h1:PGq42pGUDV8IU/QsmGInWI/LTGIBQG37VIeqlAwftZI= -github.com/keptn/lifecycle-toolkit/operator v0.0.0-20230612132640-751552cb7d5c/go.mod h1:kvAsPNqbcQrPT8/uqmY/Mt3PWhz3WMZi8eJODai1e3U= +github.com/keptn/lifecycle-toolkit/operator v0.0.0-20230613082428-2d588dbfd240 h1:qbOhwFM08KLQxxlvmkHKiQQoWMLni86GVabWwKPXPYA= +github.com/keptn/lifecycle-toolkit/operator v0.0.0-20230613082428-2d588dbfd240/go.mod h1:kvAsPNqbcQrPT8/uqmY/Mt3PWhz3WMZi8eJODai1e3U= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -264,6 +266,7 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/twbs/bootstrap v4.6.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= +github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=