tfb-startup.sh 937 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/bash
  2. set -e
  3. while true
  4. do
  5. cd $TFB_REPORTPARENT
  6. ./tfb-shutdown.sh
  7. if [ -d "$TFB_REPOPARENT/$TFB_REPONAME" ]; then
  8. sudo rm -rf $TFB_REPOPARENT/$TFB_REPONAME
  9. fi
  10. git clone \
  11. -b $TFB_REPOBRANCH \
  12. $TFB_REPOURI \
  13. $TFB_REPOPARENT/$TFB_REPONAME \
  14. --depth 1
  15. cd $TFB_REPOPARENT/$TFB_REPONAME
  16. docker run \
  17. --network=host \
  18. --mount type=bind,source=$TFB_REPOPARENT/$TFB_REPONAME,target=/FrameworkBenchmarks \
  19. techempower/tfb \
  20. --server-host $TFB_SERVER_HOST \
  21. --client-host $TFB_CLIENT_HOST \
  22. --database-host $TFB_DATABASE_HOST \
  23. --network-mode host \
  24. --results-name "$TFB_RUN_NAME" \
  25. --results-environment "$TFB_ENVIRONMENT" \
  26. --results-upload-uri "$TFB_UPLOAD_URI" \
  27. --quiet
  28. zip -r results.zip results
  29. curl \
  30. -i -v \
  31. -X POST \
  32. --header "Content-Type: application/zip" \
  33. --data-binary @results.zip \
  34. $TFB_UPLOAD_URI
  35. sleep 5
  36. done