forked from mozilla/oneanddone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
executable file
·42 lines (34 loc) · 1.19 KB
/
deploy.sh
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
#!/bin/bash
# Name of Stackato executable
if [ -z $STACKATO_EXECUTABLE ]; then
echo "Set environment variable STACKATO_EXECUTABLE to the name of the Stackato command line executable."
exit 1
fi
python manage.py collectstatic
python manage.py compress_assets
echo "Do you want to deploy to Dev, Stage or Prod?"
select env in "Dev" "Stage" "Prod"; do
case $env in
Dev ) $STACKATO_EXECUTABLE target api.paas.allizom.org; cp stackato-dev.yml stackato.yml; break;;
Stage ) $STACKATO_EXECUTABLE target api.paas.allizom.org; cp stackato-stage.yml stackato.yml; break;;
Prod ) $STACKATO_EXECUTABLE target api.paas.mozilla.org; cp stackato-prod.yml stackato.yml; break;;
esac
done
echo "Do you need to log in?"
select yn in "Yes" "No"; do
case $yn in
Yes ) $STACKATO_EXECUTABLE login; $STACKATO_EXECUTABLE group oneanddone; break;;
No ) break;;
esac
done
$STACKATO_EXECUTABLE info
$STACKATO_EXECUTABLE env
echo "Does everything look ok? Are you ready to continue to push?"
select yn in "Yes" "No"; do
case $yn in
Yes ) echo "OK, here goes!"; break;;
No ) exit;;
esac
done
$STACKATO_EXECUTABLE push
cp stackato-plain.yml stackato.yml