-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Test GeoServer Integration Tests running with Docker Compose
- Loading branch information
afabiani
committed
May 14, 2018
1 parent
02fbe20
commit dbde966
Showing
10 changed files
with
365 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,138 +1,160 @@ | ||
sudo: required | ||
|
||
language: python | ||
|
||
cache: | ||
directories: | ||
- $HOME/.cache/pip | ||
|
||
before_cache: | ||
- rm -f $HOME/.cache/pip/log/debug.log | ||
|
||
python: | ||
- "2.7" | ||
|
||
virtualenv: | ||
system_site_packages: true | ||
|
||
services: | ||
- docker | ||
- postgresql | ||
|
||
addons: | ||
postgresql: 9.6 | ||
apt: | ||
packages: | ||
- postgresql-9.6-postgis-2.3 | ||
|
||
env: | ||
- BACKEND: 'geonode.geoserver' | ||
ON_TRAVIS: 'True' | ||
TEST_RUN_CORE: 'True' | ||
MONITORING_ENABLED: 'False' | ||
- BACKEND: 'geonode.geoserver' | ||
ON_TRAVIS: 'True' | ||
TEST_RUN_INTERNAL_APPS: 'True' | ||
MONITORING_ENABLED: 'False' | ||
- BACKEND: 'geonode.geoserver' | ||
ON_TRAVIS: 'True' | ||
TEST_RUN_INTEGRATION: 'True' | ||
MONITORING_ENABLED: 'False' | ||
- BACKEND: 'geonode.qgis_server' | ||
DOCKER_COMPOSE_VERSION: 1.11.2 | ||
# This is qgis server address | ||
QGIS_SERVER_URL: http://localhost:9000/ | ||
# This is the location of docker network bridge | ||
# So QGIS server can access this address | ||
SITEURL: http://localhost:8000/ | ||
QGIS_SERVER_PORT: 9000 | ||
ON_TRAVIS: 'True' | ||
TEST_RUN_CORE: 'True' | ||
MONITORING_ENABLED: 'False' | ||
CELERY_ALWAYS_EAGER: 'True' | ||
- BACKEND: 'geonode.qgis_server' | ||
DOCKER_COMPOSE_VERSION: 1.11.2 | ||
# This is qgis server address | ||
QGIS_SERVER_URL: http://localhost:9000/ | ||
# This is the location of docker network bridge | ||
# So QGIS server can access this address | ||
SITEURL: http://localhost:8000/ | ||
QGIS_SERVER_PORT: 9000 | ||
ON_TRAVIS: 'True' | ||
TEST_RUN_INTERNAL_APPS: 'True' | ||
MONITORING_ENABLED: 'False' | ||
CELERY_ALWAYS_EAGER: 'True' | ||
- BACKEND: 'geonode.qgis_server' | ||
DOCKER_COMPOSE_VERSION: 1.11.2 | ||
# This is qgis server address | ||
QGIS_SERVER_URL: http://localhost:9000/ | ||
# This is the location of docker network bridge | ||
# So QGIS server can access this address | ||
SITEURL: http://localhost:8000/ | ||
QGIS_SERVER_PORT: 9000 | ||
ON_TRAVIS: 'True' | ||
TEST_RUN_INTEGRATION: 'True' | ||
MONITORING_ENABLED: 'False' | ||
CELERY_ALWAYS_EAGER: 'True' | ||
|
||
branches: | ||
only: | ||
- master | ||
- 2.9.x | ||
- 2.7.x | ||
- 2.6.x | ||
|
||
before_install: | ||
- scripts/misc/qgis_server_setup.sh before_install | ||
- chmod +x scripts/misc/bdd_setup.sh | ||
- scripts/misc/bdd_setup.sh before_install | ||
|
||
install: | ||
- sudo apt-get -qq -y update | ||
- sudo apt-get install -y libgdal1h python-gdal gdal-bin spatialite-bin | ||
- sudo apt-get install -y python-virtualenv python-imaging python-lxml python-pyproj python-shapely python-nose python-httplib2 python-httplib2 gettext | ||
- sudo apt-get install -y python-dev libxml2 libxml2-dev libxslt1-dev zlib1g-dev libjpeg-dev libpq-dev libgdal-dev git default-jdk | ||
- sudo add-apt-repository -y ppa:webupd8team/java | ||
- sudo apt-get update | ||
- sudo apt-get install -y --force-yes oracle-java8-installer ant maven2 --no-install-recommends | ||
- sudo update-java-alternatives --set java-8-oracle | ||
- pip install -r requirements.txt | ||
- pip install -e . | ||
- pip install pygdal==`gdal-config --version` | ||
- pip install codecov | ||
|
||
before_script: | ||
# Initialize DB | ||
# - sudo apt-get install postgresql-9.6-postgis-2.3 -y -q | ||
- psql -U postgres -c "create extension postgis" | ||
- chmod +x scripts/misc/create_dbs_travis.sh | ||
- scripts/misc/create_dbs_travis.sh before_script | ||
# For QGIS Server Travis steps | ||
- scripts/misc/qgis_server_setup.sh before_script | ||
- scripts/misc/bdd_setup.sh before_script | ||
|
||
- paver setup | ||
|
||
script: | ||
- paver run_tests --coverage --local false | ||
|
||
after_script: | ||
# For QGIS Server Travis steps | ||
- scripts/misc/qgis_server_setup.sh after_script | ||
|
||
# Cleanup | ||
- paver reset_hard | ||
|
||
after_success: | ||
- codecov | ||
|
||
notifications: | ||
irc: | ||
channels: | ||
- "irc.freenode.org#geonode" | ||
use_notice: true | ||
email: | ||
- alessio.fabiani@gmail.com | ||
- ingenieroariel@gmail.com | ||
- simone.dalmasso@gmail.com | ||
slack: geonode-sprint:oQylJRkU9feZ8JruGi6czWwe | ||
sudo: required | ||
|
||
language: python | ||
|
||
cache: | ||
directories: | ||
- $HOME/.cache/pip | ||
|
||
before_cache: | ||
- rm -f $HOME/.cache/pip/log/debug.log | ||
|
||
python: | ||
- "2.7" | ||
|
||
virtualenv: | ||
system_site_packages: true | ||
|
||
services: | ||
- docker | ||
- postgresql | ||
|
||
addons: | ||
hosts: | ||
- geonode | ||
postgresql: 9.6 | ||
apt: | ||
packages: | ||
- postgresql-9.6-postgis-2.3 | ||
- nginx | ||
|
||
env: | ||
- BACKEND: 'geonode.geoserver' | ||
ON_TRAVIS: 'True' | ||
TEST_RUN_CORE: 'True' | ||
MONITORING_ENABLED: 'False' | ||
- BACKEND: 'geonode.geoserver' | ||
ON_TRAVIS: 'True' | ||
TEST_RUN_INTERNAL_APPS: 'True' | ||
MONITORING_ENABLED: 'False' | ||
- BACKEND: 'geonode.geoserver' | ||
DOCKER_COMPOSE_VERSION: 1.19.0 | ||
# This is GeoServer server address | ||
GEOSERVER_SERVER_URL: http://localhost:8080/geoserver/ | ||
GEOSERVER_SERVER_PORT: 8080 | ||
ON_TRAVIS: 'True' | ||
TEST_RUN_INTEGRATION: 'True' | ||
MONITORING_ENABLED: 'False' | ||
CELERY_ALWAYS_EAGER: 'True' | ||
- BACKEND: 'geonode.qgis_server' | ||
DOCKER_COMPOSE_VERSION: 1.11.2 | ||
# This is qgis server address | ||
QGIS_SERVER_URL: http://localhost:9000/ | ||
# This is the location of docker network bridge | ||
# So QGIS server can access this address | ||
SITEURL: http://localhost:8000/ | ||
QGIS_SERVER_PORT: 9000 | ||
ON_TRAVIS: 'True' | ||
TEST_RUN_CORE: 'True' | ||
MONITORING_ENABLED: 'False' | ||
CELERY_ALWAYS_EAGER: 'True' | ||
- BACKEND: 'geonode.qgis_server' | ||
DOCKER_COMPOSE_VERSION: 1.11.2 | ||
# This is qgis server address | ||
QGIS_SERVER_URL: http://localhost:9000/ | ||
# This is the location of docker network bridge | ||
# So QGIS server can access this address | ||
SITEURL: http://localhost:8000/ | ||
QGIS_SERVER_PORT: 9000 | ||
ON_TRAVIS: 'True' | ||
TEST_RUN_INTERNAL_APPS: 'True' | ||
MONITORING_ENABLED: 'False' | ||
CELERY_ALWAYS_EAGER: 'True' | ||
- BACKEND: 'geonode.qgis_server' | ||
DOCKER_COMPOSE_VERSION: 1.11.2 | ||
# This is qgis server address | ||
QGIS_SERVER_URL: http://localhost:9000/ | ||
# This is the location of docker network bridge | ||
# So QGIS server can access this address | ||
SITEURL: http://localhost:8000/ | ||
QGIS_SERVER_PORT: 9000 | ||
ON_TRAVIS: 'True' | ||
TEST_RUN_INTEGRATION: 'True' | ||
MONITORING_ENABLED: 'False' | ||
CELERY_ALWAYS_EAGER: 'True' | ||
|
||
branches: | ||
only: | ||
- master | ||
- 2.9.x | ||
- 2.8.0 | ||
- 2.7.x | ||
- 2.6.x | ||
|
||
before_install: | ||
- scripts/misc/geoserver_server_setup.sh before_install | ||
- scripts/misc/qgis_server_setup.sh before_install | ||
- chmod +x scripts/misc/bdd_setup.sh | ||
- scripts/misc/bdd_setup.sh before_install | ||
|
||
install: | ||
- sudo apt-get -qq -y update | ||
- sudo apt-get install -y libgdal1h python-gdal gdal-bin spatialite-bin | ||
- sudo apt-get install -y python-virtualenv python-imaging python-lxml python-pyproj python-shapely python-nose python-httplib2 python-httplib2 gettext | ||
- sudo apt-get install -y python-dev libxml2 libxml2-dev libxslt1-dev zlib1g-dev libjpeg-dev libpq-dev libgdal-dev git default-jdk | ||
- sudo add-apt-repository -y ppa:webupd8team/java | ||
- sudo apt-get update | ||
- sudo apt-get install -y --force-yes oracle-java8-installer ant maven2 --no-install-recommends | ||
- sudo update-java-alternatives --set java-8-oracle | ||
- pip install -r requirements.txt | ||
- pip install -e . | ||
- pip install pygdal==`gdal-config --version` | ||
- pip install codecov | ||
|
||
before_script: | ||
# Initialize DB | ||
# - sudo apt-get install postgresql-9.6-postgis-2.3 -y -q | ||
- psql -U postgres -c "create extension postgis" | ||
- chmod +x scripts/misc/create_dbs_travis.sh | ||
- scripts/misc/create_dbs_travis.sh before_script | ||
# For GeoServer Server Travis steps | ||
- scripts/misc/geoserver_server_setup.sh before_script | ||
# For QGIS Server Travis steps | ||
- scripts/misc/qgis_server_setup.sh before_script | ||
- scripts/misc/bdd_setup.sh before_script | ||
|
||
# Start NGINX server | ||
- sudo nginx -s stop | ||
- sudo nginx -c `pwd`/scripts/misc/nginx_integration.conf | ||
|
||
# Setup GeoNode | ||
- paver setup | ||
|
||
script: | ||
- paver run_tests --coverage --local false | ||
|
||
after_script: | ||
# For GeoServer Server Travis steps | ||
- scripts/misc/geoserver_server_setup.sh after_script | ||
# For QGIS Server Travis steps | ||
- scripts/misc/qgis_server_setup.sh after_script | ||
|
||
# Stop NGINX server | ||
- sudo nginx -c `pwd`/scripts/misc/nginx_integration.conf -s stop | ||
|
||
# Cleanup | ||
- paver reset_hard | ||
|
||
after_success: | ||
- codecov | ||
|
||
notifications: | ||
irc: | ||
channels: | ||
- "irc.freenode.org#geonode" | ||
use_notice: true | ||
email: | ||
- alessio.fabiani@gmail.com | ||
- ingenieroariel@gmail.com | ||
- simone.dalmasso@gmail.com | ||
slack: geonode-sprint:oQylJRkU9feZ8JruGi6czWwe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
version: '2.2' | ||
services: | ||
|
||
data-dir-conf: | ||
image: geonode/geoserver_data:2.13.x | ||
restart: on-failure | ||
container_name: gsconf4${COMPOSE_PROJECT_NAME} | ||
labels: | ||
org.geonode.component: conf | ||
org.geonode.instance.name: geonode | ||
command: /bin/true | ||
volumes: | ||
- geoserver-data-dir:/geoserver_data/data | ||
|
||
geoserver: | ||
image: geonode/geoserver:2.13.x | ||
restart: unless-stopped | ||
container_name: geoserver4${COMPOSE_PROJECT_NAME} | ||
stdin_open: true | ||
# tty: true | ||
labels: | ||
org.geonode.component: geoserver | ||
org.geonode.instance.name: geonode | ||
depends_on: | ||
- data-dir-conf | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- geoserver-data-dir:/geoserver_data/data | ||
env_file: | ||
- ./scripts/docker/env/production/geoserver.env | ||
ports: | ||
- "${GEOSERVER_SERVER_PORT}:8080" | ||
network_mode: "bridge" | ||
|
||
volumes: | ||
geoserver-data-dir: | ||
name: ${COMPOSE_PROJECT_NAME}-gsdatadir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.