-
Notifications
You must be signed in to change notification settings - Fork 0
/
_zshlocal_template
30 lines (25 loc) · 1.18 KB
/
_zshlocal_template
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
#!/bin/zsh -f
# aliases for common projects
alias homed='cd ~/code/deployments'
# run terraform and argocd always in the respective cloud profiles
alias terraform='AWS_PROFILE=... terraform'
alias argocd='AWS_PROFILE=... argocd --kube-context ...'
function ahelm {
application="$1"
argocd_gitops_root_dir="..."
cd "$argocd_gitops_root_dir"
helm template "$(yq .spec.source.path "$argocd_gitops_root_dir/applications/$application.yaml")" \
$(yq '.spec.source.helm.valueFiles[]' "$argocd_gitops_root_dir/applications/$application.yaml" | sed 's#\.\./\.\./##g' | xargs -I{} echo "--values" {} | tr '\n' ' ')
cd - >/dev/null
}
function ahelmd {
application="$1"
argocd_gitops_root_dir="..."
cd "$argocd_gitops_root_dir"
helm template --debug "$(yq .spec.source.path "$argocd_gitops_root_dir/applications/$application.yaml")" \
$(yq '.spec.source.helm.valueFiles[]' "$argocd_gitops_root_dir/applications/$application.yaml" | sed 's#\.\./\.\./##g' | xargs -I{} echo "--values" {} | tr '\n' ' ')
cd - >/dev/null
}
export DOCKER_DEFAULT_PLATFORM=linux/amd64
export PATH="...:$PATH" # modify PATH as needed
export WTF_JIRA_API_KEY="$(cat ~/.jira_token)" # JIRA token for wtfutil