-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:install helm plugin command (#71)
* helm-plugin-install (#66) Co-authored-by: Brian Vu <[email protected]> * refactor: rename parameters to snake case * refactor: install script * ci: add testing for helm plugin installation * fix: parameter typo --------- Co-authored-by: akhon <[email protected]>
- Loading branch information
Showing
4 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
description: | | ||
Installs a helm plugin. | ||
Requirements: helm should be installed on the cluster | ||
parameters: | ||
helm_plugin_url: | ||
description: | | ||
absolute URL to helm plugin to install | ||
(e.g. https://example.com/helm-plugin/helm-plugin-1.2.3.tgz) | ||
type: string | ||
helm_version: | ||
type: string | ||
default: "v3.8.2" | ||
description: the helm client version to install. e.g. v3.0.0 | ||
no_output_timeout: | ||
description: | | ||
Elapsed time that the helm command can run on CircleCI without output. | ||
The string is a decimal with unit suffix, such as “20m”, “1.25h”, “5s” | ||
type: string | ||
default: "30m" | ||
|
||
steps: | ||
- install_helm_client: | ||
version: << parameters.helm_version >> | ||
- run: | ||
name: Install helm plugin | ||
environment: | ||
HELM_STR_PLUGIN_URL: << parameters.helm_plugin_url >> | ||
command: <<include(scripts/install_helm_plugin.sh)>> | ||
no_output_timeout: << parameters.no_output_timeout >> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
HELM_STR_PLUGIN_URL="$(echo "${HELM_STR_PLUGIN_URL}" | circleci env subst)" | ||
|
||
STATUS="$(helm plugin install "${HELM_STR_PLUGIN_URL}")" | ||
|
||
if echo "${STATUS}" | grep "Installed plugin:"; then | ||
echo "Installation successful" | ||
exit 0 | ||
else | ||
echo "Installation failed. Please check the Helm plugin URL" | ||
exit 1 | ||
fi |