Advertisement
funcelot

log_e2e_web.sh

Jun 16th, 2020
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.61 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. set -e
  3.  
  4. cd "${0%/*}"
  5.  
  6. cd ../acceptance-tests
  7. ping_cancelled=false    # Keep track of whether the loop was cancelled, or succeeded
  8. until docker-compose exec -T test bash -c 'cd /app/e2e-tests; docker ps -f "status=running" | grep -c "e2e-app-runner"' == "1">/dev/null 2>&1; do :; done &    # The "&" backgrounds it
  9. trap "kill $!; ping_cancelled=true" SIGINT
  10. wait $!          # Wait for the loop to exit, one way or another
  11. trap - SIGINT    # Remove the trap, now we're done with it
  12. echo "Done pinging, cancelled=$ping_cancelled"
  13.  
  14. docker-compose exec test bash -c "cd /app/e2e-tests; docker-compose logs -f web"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement