daily pastebin goal
5%
SHARE
TWEET

Teamcity deployment script

quangnhut Nov 19th, 2017 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. array=(`echo %env.SERVICE_NAME_ARRAY% | sed 's/,/\n/g'`)
  3. for i in ${array[@]}; do
  4. if echo $i | egrep -q "db"; then
  5.   stack_name="database"
  6.   service_name=$i
  7. elif echo $i | egrep -q "zuul"; then
  8.   stack_name="loadbalancer"
  9.   service_name=$i
  10. elif echo $i | egrep -q "service"; then
  11. if echo $i | egrep -q "configuration|discovery|schema"; then
  12.   stack_name="infra"
  13.   service_name=$i
  14. else
  15.   stack_name="api"
  16.   service_name=$i
  17. fi
  18. fi
  19. tput setaf 1; echo "DEBUG: ADDING / UPGRADING SERVICE" $service_name "TO STACK" $stack_name
  20. rancher-compose -f ./microservices_config/$stack_name/docker-compose.yml -r ./microservices_config/$stack_name/rancher-compose.yml -p $stack_name --debug up $service_name -d --pull --force-upgrade --confirm-upgrade --batch-size 1
  21. done
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top