Skip to content

Commit 274d643

Browse files
committed
feat: functions to auth and start wrkr
1 parent a8f611e commit 274d643

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.zshenv

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ export VISUAL=nvim
44
export NVIM_TUI_ENABLE_TRUE_COLOR=1
55
export AWS_DEFAULT_OUTPUT=yaml
66

7+
export GITLAB_USERNAME=shawn.macintyre
8+
79
typeset -U path PATH
810
path=(~/.local/bin ~/.jenv/bin ~/.krew/bin /opt/homebrew/opt/postgresql@15/bin $path)
911
export PATH

.zshrc

+18
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,21 @@ alias vi="nvim"
6060
alias cat="bat"
6161

6262
stty -ixon
63+
64+
function auth_wrkr () {
65+
if [ -z "$GITLAB_ACCESS_TOKEN" ]; then
66+
echo authorizing wrkr - gitlab
67+
op signin --account complypath.1password.com
68+
export GITLAB_ACCESS_TOKEN=$(op item get GITLAB_ACCESS_TOKEN --account complypath.1password.com --fields notesPlain)
69+
export TF_TOKEN_gitlab_com=$GITLAB_ACCESS_TOKEN
70+
fi
71+
72+
echo authorizing wrkr - aws nwo
73+
aws-sso-util login https://wrkr.awsapps.com/start ap-southeast-2
74+
export AWS_PROFILE=wrkr.sandbox-shawn-macintyre.AWSAdministratorAccess
75+
}
76+
77+
function start_wrkr () {
78+
auth_wrkr
79+
tmuxinator start wrkr
80+
}

0 commit comments

Comments
 (0)