Skip to content

Commit

Permalink
Check in build deploy script (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkuosixty authored and max-sixty committed Dec 6, 2018
1 parent c658a4a commit dad81a7
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dailydeploy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## `sixty-capital-test` build deploy script

This bash script is on the Trading QA Server, but could be put on any server. To install, clone the repos to the server, then the script in that same directly. Schedule it from crontab. Not fancy, but about as simple as it gets.
73 changes: 73 additions & 0 deletions dailydeploy/build_deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#!/bin/bash

cd /home/ubuntu/build_deploy

cd banks
git reset --hard origin/master
git pull origin master
git push --delete origin daily
git tag --delete daily
git tag -a daily -m "daily build"
git push origin daily

cd ..
cd commodity
git reset --hard origin/master
git pull origin master
git push --delete origin daily
git tag --delete daily
git tag -a daily -m "daily build"
git push origin daily

cd ..
cd conductor
git reset --hard origin/master
git pull origin master
git push --delete origin daily
git tag --delete daily
git tag -a daily -m "daily build"
git push origin daily

cd ..
cd investment
git reset --hard origin/master
git pull origin master
git push --delete origin daily
git tag --delete daily
git tag -a daily -m "daily build"
git push origin daily

cd ..
cd nursery
git reset --hard origin/master
git pull origin master
git push --delete origin daily
git tag --delete daily
git tag -a daily -m "daily build"
git push origin daily

cd ..
cd sector
git reset --hard origin/master
git pull origin master
git push --delete origin daily
git tag --delete daily
git tag -a daily -m "daily build"
git push origin daily

cd ..
cd sixty
git reset --hard origin/master
git pull origin master
git push --delete origin daily
git tag --delete daily
git tag -a daily -m "daily build"
git push origin daily

cd ..

sleep 20m
gcloud container clusters get-credentials --project=sixty-capital-test --zone=us-east4-c sixty-capital-test && kubectl config set-context $(kubectl config current-context) --namespace=airflow
kubectl delete pod -l stack=airflow
sleep 2m
kubectl set image deployments --selector=stack=airflow airflow=gcr.io/sixty-secure/conductor:daily

0 comments on commit dad81a7

Please sign in to comment.