Files
my-rook-config/tests/scripts/deploy_admission_controller_test.sh
T
subhamkrai ebe21c8f68 ci: add action for shellcheck linter
we are adding new linter for shellcheck.
As we are writing more shell scripts this
will help maintain quality.

Also, doing all the changes required in
bash files to pass this shellcheck.

Closes: https://github.com/rook/rook/issues/8431
Signed-off-by: subhamkrai <srai@redhat.com>
2021-08-26 10:03:32 +05:30

20 lines
521 B
Bash
Executable File

#!/usr/bin/env bash
BASE_DIR=$(cd "$(dirname "$0")" && pwd)
if [ -z "$KUBECONFIG" ];then
if [ -f "$HOME/.kube/config" ]; then
export KUBECONFIG="$HOME/.kube/config"
else
sudo cp /etc/kubernetes/admin.conf "$HOME"/
sudo chown "$(id -u)":"$(id -g)" "$HOME"/admin.conf
export KUBECONFIG=$HOME/admin.conf
fi
fi
if [ -f "${BASE_DIR}"/deploy_admission_controller.sh ];then
bash "${BASE_DIR}"/deploy_admission_controller.sh
else
echo "${BASE_DIR}/deploy_admission_controller.sh not found !"
fi