-
Notifications
You must be signed in to change notification settings - Fork 8
/
.envrc
66 lines (56 loc) · 2.76 KB
/
.envrc
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# export PATH="${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin:$PATH" # for those using aqua this will ensure it's in the path with all tools if loading from home
export DIRENV_WARN_TIMEOUT='10s'
export DIRENV_LOG_FORMAT=""
INFO_COLOR="\033[1;30;40m"
RESET_COLOR="\033[0m"
WARNING_COLOR="\033[33m"
END_WARNING_COLOR="\033[0m"
IMPORTANT_COLOR="\033[104;30m"
WORKING_COLOR="\033[94m"
BACKGROUND_GREEN="\033[94m"
RESET_BACKGROUND="\033[0;49m"
# variable for setting terminal output with blue background with black text
BACKGROUND_BLUE="\033[44;30m"
# variable for setting terminal output with light green background with black text and bold
BACKGROUND_LIGHT_GREEN="\033[1;102;30m"
# variable for setting terminal output with light yellow background and black text that is bold
BACKGROUND_LIGHT_YELLOW="\033[1;103;30m"
source_env "$HOME"
source_env_if_exists ./env/.envrc
export PATH="${GOPATH}/bin:${PATH}"
# This is set for local kind/minikube config to avoid touching the main kubeconfig
# Loaded by direnv, this should be pulled automatically by Mage tasks, if direnv is correctly setup.
export KUBECONFIG=.cache/config
# Default Testing configuration for local dev work
export DSV_CREDENTIALS_ANNOTATION_VALUE='app1'
export DSV_K8S_TEST_SECRET_PATH='secrets:ci:tests:dsv-k8s:sync-test'
# Without this codespaces might have an issues with loading with mage initially without gcc being installed
export CGO_ENABLED=0
export MAGEFILE_HASHFAST=1 # use mage -f to force recompile, this should make it faster if you aren't editing magefiles often
export GOTEST_DISABLE_RACE=1 # this requires CGO and not sure this app is compatible with race conditions checks, run this seperately manually if needed
# for tilt lsp
alias tilt="$(aqua which tilt)"
# easier for new folks to filter this way
alias mages="$(aqua which mage-select)"
eval $(minikube docker-env)
if [[ -f ".env" ]]; then
dotenv_if_exists ".env"
else
printf "${BACKGROUND_LIGHT_YELLOW}LOCAL ENVIRONMENT CONFIGURATION${RESET_COLOR}\n"
printf "${WARNING_COLOR}👉 .env not found\n"
printf "${WARNING_COLOR}\tSuggested fixes:\n"
printf "${WARNING_COLOR}\t\t1. create ${BACKGROUND_LIGHT_GREEN}.env${RESET_COLOR}\n"
printf "${WARNING_COLOR}\t\t2. ensure ${RESET_COLOR}${BACKGROUND_LIGHT_GREEN}.env${RESET_COLOR}${WARNING_COLOR} contains the following variables: \n\n"
fi
# Check if DSV_PROFILE_NAME is set
if [[ -z "${DSV_PROFILE_NAME}" ]]; then
printf "\t\t\t- ${WARNING_COLOR}👉 DSV_PROFILE_NAME not set${RESET_COLOR}\n"
else
printf "✔️ ${INFO_COLOR}DSV_PROFILE_NAME set${RESET_COLOR}\n"
fi
# Check if DSV_TENANT_NAME is set
if [[ -z "${DSV_TENANT_NAME}" ]]; then
printf "\t\t\t- ${WARNING_COLOR}👉 DSV_TENANT_NAME not set${RESET_COLOR}\n"
else
printf "✔️ ${INFO_COLOR}DSV_TENANT_NAME set${RESET_COLOR}\n"
fi