You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
967 B

  1. #!/bin/bash -x
  2. set -e
  3. OS=$TRAVIS_OS_NAME
  4. # Do not deploy if credentials are not given
  5. if [ "${TRAVIS_SECURE_ENV_VARS}" == "false" ]; then
  6. echo "WARNING: Not deploying as no credentials are given."
  7. exit 0;
  8. fi
  9. # Do not deploy for pull requests
  10. if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
  11. exit 0;
  12. fi
  13. case $OS in
  14. linux)
  15. echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
  16. # Deploy as debug/release
  17. case "$CONFIG" in
  18. *DebugTravis)
  19. docker commit storm movesrwth/storm:travis-debug
  20. docker push movesrwth/storm:travis-debug
  21. ;;
  22. *ReleaseTravis)
  23. docker commit storm movesrwth/storm:travis
  24. docker push movesrwth/storm:travis
  25. ;;
  26. *)
  27. echo "Unrecognized value of CONFIG: $CONFIG"; exit 1
  28. ;;
  29. esac
  30. ;;
  31. osx)
  32. echo "Building Storm on Mac OSX not used."
  33. exit 1
  34. ;;
  35. *)
  36. # Unknown OS
  37. echo "Unsupported OS: $OS"
  38. exit 1
  39. esac