Last active
May 13, 2019 13:36
-
-
Save gbirke/62c21601140af1f9c3ceb40c0fe438f1 to your computer and use it in GitHub Desktop.
WMDE Fundraising deployment shell menu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HEIGHT=15 | |
WIDTH=40 | |
CHOICE_HEIGHT=4 | |
TITLE="Deploy fundraising apps" | |
MENU="Choose one of the following options:" | |
OPTIONS=(T "Fundraising Frontend TEST " | |
L "Fundraising Frontend LAIKA SKIN" | |
P "Fundraising Frontend PRODUCTION" | |
X "Backend TEST" | |
B "Backend PRODUCTION") | |
CHOICE=$(dialog --clear \ | |
--title "$TITLE" \ | |
--menu "$MENU" \ | |
$HEIGHT $WIDTH $CHOICE_HEIGHT \ | |
"${OPTIONS[@]}" \ | |
2>&1 >/dev/tty) | |
clear | |
case $CHOICE in | |
T) | |
set -o xtrace | |
ssh -t [email protected] 'ansible-playbook -vi FundraisingFrontend/deployment/inventory/test FundraisingFrontend/deployment/deployment.yml' | |
set +o xtrace | |
;; | |
L) | |
set -o xtrace | |
ssh -t [email protected] 'ansible-playbook -vi FundraisingFrontend/deployment/inventory/laika FundraisingFrontend/deployment/deployment.yml' | |
set +o xtrace | |
;; | |
P) | |
set -o xtrace | |
ssh -t [email protected] 'ansible-playbook -vi FundraisingFrontend/deployment/inventory/production FundraisingFrontend/deployment/deployment.yml' | |
set +o xtrace | |
;; | |
X) | |
set -o xtrace | |
ssh -t [email protected] 'ansible-playbook -vv -i fundraising-backend/deployment/inventory/test fundraising-backend/deployment/deployment.yml' | |
set +o xtrace | |
;; | |
B) | |
set -o xtrace | |
ssh -t [email protected] 'ansible-playbook -vv -i fundraising-backend/deployment/inventory/production fundraising-backend/deployment/deployment.yml' | |
set +o xtrace | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment