Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. declare -a ALL=("domain-config-backend mapping smartdocs-scan/supervisor smartdocs-scan/email-handler")
  2.  
  3. declare -A dependencies=(
  4. [domain-config-backend]="domain-config-backend supervisor email-handler"
  5. [mapping]="mapping supervisor"
  6. [supervisor]="supervisor email-handler"
  7. [services]="supervisor"
  8. [smartdocs-scan-common]="email-handler supervisor"
  9. )
  10.  
  11. echo "Building for PR=$TRAVIS_PULL_REQUEST: travis_branch=$TRAVIS_BRANCH (ci_testing_branch=$CI_TESTING_BRANCH)"
  12.  
  13. #collect changed modules
  14. CHANGES="mapping supervisor smartdocs-scan-common"
  15.  
  16. #find out which services need to be redeployed
  17. if [ "$(echo -ne ${CHANGES} | wc -m)" -eq 0 ]; then
  18. #no changed modules found. doesn't sound right. Let's deploy everything
  19. echo "no changes found"
  20. SERVICES=$ALL
  21. else
  22. for c in $CHANGES; do
  23. SERVICES+=("${dependencies[$c]}")
  24. done
  25. fi
  26.  
  27.  
  28. echo "changes=($CHANGES)"
  29. echo "expecting services=(mapping supervisor)"
  30.  
  31. echo "actual services=($SERVICES)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement