summaryrefslogtreecommitdiff
path: root/shell-scripts/compile
blob: fb96335f8f4e41f9ad2c8b4c412d79fe61d2b70e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
echo " Compiliiing ${@}"

error () {
    echo "$1"
    exit 1
}

case "${@}" in
    helm\ lint*)
        shift
        shift
        echo " \-> helm lint --set cluster=debug-cluster --strict --quiet --with-subcharts ${@}"
        helm lint --set cluster=debug-cluster --strict --quiet --with-subcharts ${@} | sed -u -E -e "s@$(basename ${PWD})/|error during tpl function execution for \".*\"@@g"
        ;;
    racket*)
        shift
        echo " \-> racket -l errortrace -t ${@}"
        racket -l errortrace -t ${@}
        ;;
    ansible-lint*)
        shift
        echo " \-> ansible-lint --profile production --write=all -qq --nocolor"
        ansible-lint --profile production --write=all -qq --nocolor ${@}
        ;;
    ansible-playbook*)
        shift
        echo " \-> ansible-playbook -e@<(pass)"
        ansible-playbook -b -e "{\"ansible_become_pass\":\"$PASSWORD\"}" ${@}
        ;;
    awx*)
        echo " \-> awx"
        awx "$@" | filter-ansi
        ;;
    *)
        echo "Nope. Not compiling that. ARGS: ${@}"
        ;;
esac