diff --git a/documentation/LICENSE.asciidoc b/documentation/LICENSE.asciidoc index 74b2f911f..1e8f1aaf3 100644 --- a/documentation/LICENSE.asciidoc +++ b/documentation/LICENSE.asciidoc @@ -57,6 +57,7 @@ The following table shows the components that may be used. The column `inclusion |http://www.jasypt.org/[jasypt] |Optional|http://www.jasypt.org/license.html[ASL 2.0] |https://www.docker.com/[docker]|Optional|https://docs.docker.com/engine/#licensing[ASL 2.0] and https://www.docker.com/legal/docker-software-end-user-license-agreement[EULA] |https://kubernetes.io/[kubernetes]|Optional|https://github.com/kubernetes/kubernetes/blob/master/LICENSE[ASL 2.0] +|https://helm.sh/[helm]|Optional|https://github.com/devonfw/ide/blob/master/LICENSE[ASL 2.0] |https://terraform.io/[terraform]|Optional|https://github.com/hashicorp/terraform/blob/main/LICENSE[Mozilla Public License 2.0] |https://www.graalvm.org/[GraalVM] |Optional|https://github.com/oracle/graal/blob/master/LICENSE[GPLv2] (with the “Classpath” Exception) |======================= diff --git a/documentation/cli.asciidoc b/documentation/cli.asciidoc index b8bfdee8b..19da92104 100644 --- a/documentation/cli.asciidoc +++ b/documentation/cli.asciidoc @@ -56,6 +56,7 @@ The following commandlets are currently available: * link:eclipse.asciidoc[eclipse] * link:graalvm.asciidoc[graalvm] * link:gradle.asciidoc[gradle] +* link:helm.asciidoc[helm] * link:help.asciidoc[help] * link:ide.asciidoc[ide] * link:intellij.asciidoc[intellij] diff --git a/documentation/devonfw-ide-usage.asciidoc b/documentation/devonfw-ide-usage.asciidoc index 8842e928f..756f2a39e 100644 --- a/documentation/devonfw-ide-usage.asciidoc +++ b/documentation/devonfw-ide-usage.asciidoc @@ -22,6 +22,8 @@ include::eclipse.asciidoc[leveloffset=3] include::gradle.asciidoc[leveloffset=3] +include::helm.asciidoc[leveloffset=3] + include::help.asciidoc[leveloffset=3] include::ide.asciidoc[leveloffset=3] diff --git a/documentation/helm.asciidoc b/documentation/helm.asciidoc new file mode 100644 index 000000000..f2f5d4aa0 --- /dev/null +++ b/documentation/helm.asciidoc @@ -0,0 +1,23 @@ +:toc: +toc::[] + += Helm + +The helm commandlet allows to install and use https://www.helm.sh/[Helm]. + +*ATTENTION:* +Currently this feature is new and therefore experimental. +It may change in incompatible ways in the next releases until we reach a stable state. +We hope that all is working fine for you. +However, do not expect everything to work out of the box. +In case you are facing issues (e.g. network problems with Cisco AnyConnect, etc.) please give us feedback so we can improve. + +The arguments (`devon helm «args»`) are explained by the following table: + +.Usage of `devon helm` +[options="header"] +|======================= +|*Argument(s)* |*Meaning* +|`setup` |install helm on your machine. +|`«args»` |call helm with the specified arguments. Call `helm --help` for details or use helm directly as preferred." +|======================= \ No newline at end of file diff --git a/documentation/scripts.asciidoc b/documentation/scripts.asciidoc index 52ce11f7f..5bbbe7a2e 100644 --- a/documentation/scripts.asciidoc +++ b/documentation/scripts.asciidoc @@ -14,6 +14,7 @@ This directory is the heart of the `devonfw-ide` and contains the required link: │ ├── link:eclipse.asciidoc[eclipse] │ ├── link:graalvm.asciidoc[graalvm] │ ├── link:gradle.asciidoc[gradle] +| ├── link:helm.asciidoc[helm] │ ├── link:help.asciidoc[help] │ ├── link:ide.asciidoc[ide] │ ├── link:intellij.asciidoc[intellij] diff --git a/scripts/src/main/resources/scripts/command/helm b/scripts/src/main/resources/scripts/command/helm new file mode 100644 index 000000000..72d1e8fc0 --- /dev/null +++ b/scripts/src/main/resources/scripts/command/helm @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +# autocompletion list +if [ "${1}" = "shortlist" ] +then + if [ -z "${2}" ] + then + echo "setup help" + fi + exit +fi + +if [ -n "${DEVON_IDE_TRACE}" ]; then set -vx; fi +# shellcheck source=scripts/functions +source "$(dirname "${0}")"/../functions + +# Call helm with specified arguments. +function doRun() { + doSetup silent + doRunCommand "${HELM_HOME}/helm" "${@}" +} + +function doSetup() { + if [ ! -d "${HELM_HOME}" ] || [ "${1}" != "silent" ] + then + # Get leatest release + if [ -z "${HELM_VERSION}" ] + then + doEcho "Getting latest release..." + HELM_VERSION=$(curl -LsH "Accept: application/vnd.github.v3+json" https://api.github.com/repos/helm/helm/releases/latest | awk -F':' '/tag_name/ {print $2}' | awk -F'"' '{print $2}') + fi + + doInstall "-" "${HELM_HOME}" "helm" "${HELM_VERSION}" + fi + + if [ "${1}" != "silent" ] && ! doIsQuiet + then + doRunCommand "helm version" + fi + +} + +HELM_HOME="${DEVON_IDE_HOME}/software/helm" + +# CLI +case ${1} in +"help" | "-h") + echo "Install helm." + echo + echo "Arguments:" + echo " setup install helm on your machine." + echo " <> call helm with the specified arguments. Call helm --help for details or use helm directly as preferred." + echo +;; +"setup" | "s" | "") + doEcho "Installating helm..." + doSetup +;; +*) + doRun "${@}" +;; +esac