travis-build.bash 1021 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. set -e
  3. echo "This is travis-build.bash..."
  4. echo "Installing the packages that CKAN requires..."
  5. sudo apt-get update -qq
  6. sudo apt-get install postgresql-$PGVERSION solr-jetty libcommons-fileupload-java:amd64=1.2.2-1
  7. echo "Installing CKAN and its Python dependencies..."
  8. git clone https://github.com/ckan/ckan
  9. cd ckan
  10. git checkout release-v2.2
  11. python setup.py develop
  12. pip install -r requirements.txt --allow-all-external
  13. pip install -r dev-requirements.txt --allow-all-external
  14. cd -
  15. echo "Creating the PostgreSQL user and database..."
  16. sudo -u postgres psql -c "CREATE USER ckan_default WITH PASSWORD 'pass';"
  17. sudo -u postgres psql -c 'CREATE DATABASE ckan_test WITH OWNER ckan_default;'
  18. echo "Initialising the database..."
  19. cd ckan
  20. paster db init -c test-core.ini
  21. cd -
  22. echo "Installing ckanext-ckanext-s3multipart and its requirements..."
  23. python setup.py develop
  24. pip install -r dev-requirements.txt
  25. echo "Moving test.ini into a subdir..."
  26. mkdir subdir
  27. mv test.ini subdir
  28. echo "travis-build.bash is done."