v5.0.0
===================================================================== Excited to bring V5 to life. This includes some BREAKING CHANGES to several aspects of ZSH-type scwrypts. Please refer to the readme for upgrade details (specifically docs/upgrade/v4-to-v5.md) --- New Features ------------------------- - ZSH testing library with basic mock capabilities - new scwrypts environment file format includes metadata and more advanced features like optional parent env overrides, selection inheritence, and improved structurual flexibility - speedup cache for non-CI runs of ZSH-type scwrypts - ${scwryptsmodule} syntax now allows a consistent unique-naming scheme for functions in ZSH-type scwrypts while providing better insight into origin of API calls in other modules - reusable, case-statement-driven argument parsers in ZSH-type scwrypts --- Changes ------------------------------ - several utility function renames in ZSH-type scwrypts to improve consistency - documentation comments included in ZSH libraries - ZSH-type scwrypts now allow library modules to live alongside executables (zsh/lib still supported; autodetection determines default) --- Bug Fixes ---------------------------- - hardened environment checking for REQUIRED_ENV variables; this removes the ability to overwrite variables in local function contexts
This commit is contained in:
1
plugins/ci/.config/env.yaml
Normal file
1
plugins/ci/.config/env.yaml
Normal file
@ -0,0 +1 @@
|
||||
---
|
@ -1,10 +1,3 @@
|
||||
# Kubernetes `kubectl` Helper Plugin
|
||||
# CI Helper
|
||||
|
||||
Leverages a local `redis` application to quickly and easily set an alias `k` for `kubectl --context <some-context> --namespace <some-namespace>`.
|
||||
Much like scwrypts environments, `k` aliases are *only* shared amongst session with the same `SCWRYPTS_ENV` to prevent accidental cross-contamination.
|
||||
|
||||
|
||||
## Getting Started
|
||||
|
||||
Enable the plugin in `~/.config/scwrypts/config.zsh` by adding `SCWRYPTS_PLUGIN_ENABLED__KUBECTL=1`.
|
||||
Use `k` as your new `kubectl` and checkout `k --help` and `k meta --help`.
|
||||
Disabled by default, this is used in CI contexts to try and identify missing requirements for the current workflow.
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/zsh
|
||||
#!/usr/bin/env zsh
|
||||
#####################################################################
|
||||
MAIN() {
|
||||
cd "$SCWRYPTS_ROOT__scwrypts/"
|
||||
cd "$(scwrypts.config.group scwrypts root)"
|
||||
|
||||
DEPENDENCIES+=()
|
||||
for group in ${SCWRYPTS_GROUPS[@]}
|
||||
@ -11,7 +11,7 @@ MAIN() {
|
||||
GROUP_HOME="$(eval 'echo $SCWRYPTS_ROOT__'$group)"
|
||||
[ $GROUP_HOME ] && [ -d "$GROUP_HOME" ] || continue
|
||||
|
||||
STATUS "checking dependencies for $group"
|
||||
echo.status "checking dependencies for $group"
|
||||
DEPENDENCIES+=($(
|
||||
for file in $(
|
||||
{
|
||||
@ -21,13 +21,13 @@ MAIN() {
|
||||
} | grep -v '\.md$' | grep -v 'check-all-dependencies$')
|
||||
do
|
||||
sed -z 's/.*DEPENDENCIES+=(\([^)]*\)).*/\1\n/; s/#.*\n//g; s/\s\+/\n/g' "$GROUP_HOME/$file"
|
||||
done
|
||||
done
|
||||
))
|
||||
done
|
||||
|
||||
DEPENDENCIES=(zsh $(echo $DEPENDENCIES | sed 's/ /\n/g' | sort -u | grep '^[-_a-zA-Z]\+$'))
|
||||
|
||||
STATUS "discovered dependencies: ($DEPENDENCIES)"
|
||||
echo.status "discovered dependencies: ($DEPENDENCIES)"
|
||||
echo $DEPENDENCIES | sed 's/ /\n/g'
|
||||
CHECK_ENVIRONMENT && SUCCESS "all dependencies satisfied"
|
||||
utils.check-environment && echo.success "all dependencies satisfied"
|
||||
}
|
||||
|
@ -1,5 +1 @@
|
||||
SCWRYPTS_GROUPS+=(ci)
|
||||
|
||||
export SCWRYPTS_TYPE__ci=zsh
|
||||
export SCWRYPTS_ROOT__ci="$SCWRYPTS_ROOT__scwrypts/plugins/ci"
|
||||
export SCWRYPTS_COLOR__ci='\033[0m'
|
||||
export ${scwryptsgroup}__type=zsh
|
||||
|
Reference in New Issue
Block a user