Skip to content

Commit

Permalink
feat(kubeval): Adding kubeval linting of manifests (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbovo authored Dec 16, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 9b851b6 commit 4ee20b3
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
version: '3'

vars:
GREETING: Hello, World!
GREETING: Hello, World!c

tasks:
default:
7 changes: 7 additions & 0 deletions common.sh
Original file line number Diff line number Diff line change
@@ -50,6 +50,13 @@ install_helm() {
fi
}

install_kubeval_plugin(){
print_title "Install kubeval plugin"
if ! (helm plugin list | grep -q kubeval); then
helm plugin install https://github.com/instrumenta/helm-kubeval
fi
}

install_artifactory_plugin(){
print_title "Install helm artifactory plugin"
if ! (helm plugin list | grep -q push-artifactory); then
4 changes: 4 additions & 0 deletions main.sh
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ export SCRIPT_DIR
source "$SCRIPT_DIR/common.sh"

install_helm
install_kubeval_plugin
install_artifactory_plugin
get_chart_version

@@ -25,6 +26,9 @@ case "${ACTION}" in
helm lint "${CHART_DIR}"
fi

print_title "Helm kubeval"
helm kubeval "${CHART_DIR}" --ignore-missing-schemas

print_title "Helm package"
helm package "${CHART_DIR}" --version v"${CHART_VERSION}" --app-version "${CHART_VERSION}" --destination "${RUNNER_WORKSPACE}"
;;

0 comments on commit 4ee20b3

Please sign in to comment.