v3.7.0
=====================================================================
--- New Features -------------------------
- Github Actions integration from 3.7.0 and up!
```yaml
# try it out in gh actions
- uses: wrynegade/scwrypts@main
with:
version: v3.7.0
scwrypt: --name hello-world --group scwrypts --type py
args: --message "hello from github actions ci <3"
```
--- New Scripts --------------------------
zsh/helm )
smart helm template functions (simply pass a filename)
- get-template
- update-dependencies
--- Changes ------------------------------
- CHECK_ENVIRONMENT now uses proper argument parsing
- scwrypts/plugins loaded by setting in config or environment:
SCWRYPTS_PLUGIN_ENABLED__plugin=1
- SCWRYPTS__GET_PATH_TO_RELATIVE_ARGUMENT was missed in the v2->v3
refactor and has now been reincluded as SCWRYPTS__GET_REALPATH
This commit is contained in:
42
zsh/lib/helm/dependency.module.zsh
Normal file
42
zsh/lib/helm/dependency.module.zsh
Normal file
@@ -0,0 +1,42 @@
|
||||
#####################################################################
|
||||
|
||||
DEPENDENCIES+=(helm kubeval)
|
||||
REQUIRED_ENV+=()
|
||||
|
||||
use helm/validate
|
||||
|
||||
#####################################################################
|
||||
|
||||
HELM__DEPENDENCY__UPDATE() {
|
||||
[ ! $USAGE ] && local USAGE="
|
||||
usage: [...options...]
|
||||
|
||||
options
|
||||
-t, --template-filename path to a template/*.yaml file of a helm chart
|
||||
|
||||
Auto-detect chart and build dependencies for any file within a helm chart.
|
||||
"
|
||||
local TEMPLATE_FILENAME CHART_ROOT VALUES_FILES=()
|
||||
local COLORIZE=0 RAW=0 DEBUG=0
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
case $1 in
|
||||
-t | --template-filename ) TEMPLATE_FILENAME="$(SCWRYPTS__GET_REALPATH "$2")"; shift 1 ;;
|
||||
|
||||
* ) ERROR "unexpected argument '$1'" ;;
|
||||
esac
|
||||
shift 1
|
||||
done
|
||||
|
||||
HELM__VALIDATE
|
||||
CHECK_ERRORS || return 1
|
||||
|
||||
##########################################
|
||||
|
||||
STATUS "updating helm dependencies for '$CHART_ROOT'" \
|
||||
&& cd $CHART_ROOT \
|
||||
&& helm dependency update \
|
||||
&& SUCCESS "helm chart dependencies updated" \
|
||||
|| { ERROR "unable to update helm chart dependencies (see above)"; return 1; }
|
||||
}
|
||||
Reference in New Issue
Block a user