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.

67 lines
1.6 KiB

8 years ago
  1. #!/bin/bash
  2. set -e
  3. source $(dirname $0)/helpers.sh
  4. it_can_get_version_from_artifactory() {
  5. # local local_ip=$(find_docker_host_ip)
  6. #local_ip="localhost"
  7. artifactory_ip=$ART_IP
  8. TMPDIR=/tmp
  9. local src=$(mktemp -d $TMPDIR/in-src.XXXXXX)
  10. local endpoint="http://${artifactory_ip}:8081/artifactory"
  11. local regex="ecd-front-(?<version>.*).tar.gz"
  12. local folder="/generic/ecd-front"
  13. local version="20161109222826"
  14. in_without_credentials_with_version $endpoint $regex $folder $version $src
  15. }
  16. it_cant_get_version_from_artifactory() {
  17. # local local_ip=$(find_docker_host_ip)
  18. #local_ip="localhost"
  19. artifactory_ip=$ART_IP
  20. TMPDIR=/tmp
  21. local src=$(mktemp -d $TMPDIR/in-src.XXXXXX)
  22. local endpoint="http://${artifactory_ip}:8081/artifactory"
  23. local regex="ecd-front-(?<version>.*).tar.gz"
  24. local folder="/generic/ecd-front"
  25. local version="NONE"
  26. in_without_credentials_with_version $endpoint $regex $folder $version $src
  27. }
  28. it_can_get_version_from_artifactory_with_credentials() {
  29. # local local_ip=$(find_docker_host_ip)
  30. #local_ip="localhost"
  31. artifactory_ip=$ART_IP
  32. TMPDIR=/tmp
  33. local src=$(mktemp -d $TMPDIR/in-src.XXXXXX)
  34. local endpoint="http://${artifactory_ip}:8081/artifactory"
  35. local regex="ecd-front-(?<version>.*).tar.gz"
  36. local folder="/generic/ecd-front"
  37. local version="20161109222826"
  38. local username="${ART_USER}"
  39. local password="${ART_PWD}"
  40. in_with_credentials_with_version $endpoint $regex $folder $version $src $username $password
  41. }
  42. #run it_can_get_version_from_artifactory
  43. run it_can_get_version_from_artifactory_with_credentials
  44. # check for exit code > 0
  45. #run it_cant_get_version_from_artifactory