-
Notifications
You must be signed in to change notification settings - Fork 967
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
626 changed files
with
7,487 additions
and
6,563 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
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,3 @@ | ||
#!/bin/bash | ||
|
||
./run_tests.sh --dockerize --db postgres --external_tmp --clean_pyc -api "$@" |
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,3 @@ | ||
#!/bin/bash | ||
|
||
./run_tests.sh --dockerize --db postgres --external_tmp --clean_pyc --framework "$@" |
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,5 @@ | ||
#!/bin/bash | ||
|
||
./scripts/common_startup.sh --dev-wheels | ||
|
||
nosetests test/integration |
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,24 @@ | ||
FROM toolshed/requirements | ||
MAINTAINER John Chilton, jmchilton@gmail.com | ||
|
||
RUN apt-get -qq update && \ | ||
apt-get install --no-install-recommends -y postgresql-client python-pip && \ | ||
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
ENV GALAXY_ROOT=/galaxy \ | ||
GALAXY_CONFIG_OVERRIDE_ADMIN_USERS=admin@galaxy.org \ | ||
GALAXY_CONFIG_OVERRIDE_ALLOW_USER_DATASET_PURGE=true \ | ||
GALAXY_CONFIG_OVERRIDE_ALLOW_LIBRARY_PATH_PASTE=true \ | ||
GALAXY_CONFIG_OVERRIDE_ENABLE_BETA_WORKFLOW_MODULES=true \ | ||
GALAXY_CONFIG_OVERRIDE_ALLOW_USER_DELETION=true \ | ||
GALAXY_CONFIG_OVERRIDE_DATABASE_CONNECTION=postgresql://postgres@postgres/galaxy \ | ||
GALAXY_CONFIG_OVERRIDE_MASTER_API_KEY=94a548bea347a35e457a804bf75bec53 \ | ||
GALAXY_CONFIG_OVERRIDE_JOB_CONFIG_FILE=/galaxy/config/job_conf.xml.sample_basic \ | ||
GALAXY_CONFIG_OVERRIDE_DATATYPES_CONFIG_FILE=/galaxy/test/functional/tools/sample_datatypes_conf.xml \ | ||
GALAXY_CONFIG_OVERRIDE_TOOL_CONFIG_FILE=/galaxy/test/functional/tools/samples_tool_conf.xml \ | ||
GALAXY_CONFIG_FILE=/galaxy/.ci/jenkins/selenium/galaxy.ini \ | ||
GALAXY_VIRTUAL_ENV=/galaxy_env | ||
|
||
ADD run_galaxy.bash /run_galaxy.bash | ||
EXPOSE 8080 | ||
CMD /run_galaxy.bash |
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,19 @@ | ||
version: '2' | ||
services: | ||
postgres: | ||
image: postgres | ||
galaxy: | ||
build: . | ||
image: ubuntu | ||
volumes: | ||
- "${TARGET_ROOT}:${TARGET_PATH}" | ||
links: | ||
- postgres | ||
ports: | ||
- "${GALAXY_PORT}:8080" | ||
selenium: | ||
image: selenium/standalone-chrome:3.0.1-aluminum | ||
ports: | ||
- "${SELENIUM_PORT}:4444" | ||
links: | ||
- galaxy |
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,11 @@ | ||
[server:main] | ||
|
||
use = egg:Paste#http | ||
port = 8080 | ||
host = 0.0.0.0 | ||
use_threadpool = True | ||
threadpool_kill_thread_limit = 10800 | ||
|
||
[app:main] | ||
|
||
paste.app_factory = galaxy.web.buildapp:app_factory |
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,16 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
sleep 30 # TODO: wait on something instead of just sleeping... | ||
|
||
echo `df` | ||
|
||
echo "Creating postgres database for Galaxy" | ||
createdb -w -U postgres -h postgres galaxy | ||
|
||
echo "Starting and waiting for Galaxy daemon(s)" | ||
GALAXY_RUN_ALL=1 bash "$GALAXY_ROOT/run.sh" --daemon --wait | ||
|
||
echo "Galaxy daemon ready, monitoring Galaxy logs" | ||
tail -f "$GALAXY_ROOT/main.log" |
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,110 @@ | ||
#!/bin/bash | ||
|
||
TEST_DIRECTORY=`dirname $0` | ||
|
||
DEFAULT_COMPOSE_PROJECT_NAME=`basename $TEST_DIRECTORY` | ||
COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME:-$DEFAULT_COMPOSE_PROJECT_NAME} | ||
# If in Jenkins environment, append ${BUILD_NUMBER} to project so builds don't interfer. | ||
if [ ! -z "$BUILD_NUMBER" ]; | ||
then | ||
COMPOSE_PROJECT_NAME="${COMPOSE_PROJECT_NAME}${BUILD_NUMBER}" | ||
fi | ||
export COMPOSE_PROJECT_NAME | ||
|
||
echo "Running Jenkins test from $TEST_DIRECTORY with compose project name $COMPOSE_PROJECT_NAME" | ||
|
||
find lib -iname '*pyc' -exec rm -rf {} \; | ||
find test -iname '*pyc' -exec rm -rf {} \; | ||
|
||
./scripts/common_startup.sh --dev-wheels | ||
|
||
. .venv/bin/activate | ||
|
||
pip install docker-compose | ||
|
||
# TODO: Let docker-compose pick these at random. | ||
export GALAXY_PORT=`python -c 'import socket; s=socket.socket(); s.bind(("", 0)); print(s.getsockname()[1]); s.close()'` | ||
export SELENIUM_PORT=`python -c 'import socket; s=socket.socket(); s.bind(("", 0)); print(s.getsockname()[1]); s.close()'` | ||
|
||
export TARGET_ROOT=`pwd` | ||
export TARGET_PATH=/galaxy | ||
|
||
cd $TEST_DIRECTORY | ||
|
||
echo "Cleaning up previous executions if needed." | ||
docker-compose down | true | ||
docker-compose build galaxy | ||
docker-compose up -d | ||
|
||
for service_name in postgres galaxy selenium | ||
do | ||
echo "Waiting on service ${service_name}" | ||
while true | ||
do | ||
if docker ps | grep -q "${COMPOSE_PROJECT_NAME}_${service_name}" | ||
then | ||
container_id=`docker ps | grep "${COMPOSE_PROJECT_NAME}_${service_name}" | cut -d " " -f 1` | ||
eval "${service_name}_container_id=${container_id}" | ||
echo "Service ${service_name} ready - with container ID ${container_id}" | ||
break | ||
fi | ||
printf "." | ||
sleep 1; | ||
done | ||
done | ||
|
||
|
||
if [ "$1" = "--debug-running-containers" ]; | ||
then | ||
env | ||
exit 0 | ||
fi | ||
|
||
export GALAXY_TEST_EXTERNAL="http://localhost:$GALAXY_PORT/" | ||
|
||
echo "Waiting on docker-compose managed Galaxy server - $GALAXY_TEST_EXTERNAL." | ||
while ! curl -s "$GALAXY_TEST_EXTERNAL"; | ||
do | ||
for service_name in postgres galaxy selenium | ||
do | ||
if ! docker ps | grep -q "${COMPOSE_PROJECT_NAME}_${service_name}" | ||
then | ||
echo "Service ${service_name} stopped before Galaxy came up, exiting and halting containers." | ||
for service_name in postgres galaxy selenium | ||
do | ||
container_id_var="${service_name}_container_id" | ||
container_id="${!container_id_var}" | ||
echo "Dumping logs for $service_name container (${container_id})..." | ||
echo "---" | ||
docker logs "${container_id}" | ||
echo "---" | ||
done | ||
docker-compose down | true | ||
exit 1 | ||
fi | ||
done | ||
|
||
printf "." | ||
sleep 4; | ||
done; | ||
|
||
# Access Selenium on localhost via port $SELENIUM_PORT | ||
export GALAXY_TEST_SELENIUM_REMOTE=1 | ||
export GALAXY_TEST_SELENIUM_REMOTE_PORT="${SELENIUM_PORT}" | ||
|
||
# Access Galaxy on localhost via port $GALAXY_PORT | ||
export GALAXY_TEST_PORT="${GALAXY_PORT}" | ||
|
||
# Have Selenium access Galaxy at this URL | ||
export GALAXY_TEST_EXTERNAL_FROM_SELENIUM="http://galaxy:8080" | ||
|
||
cd ../../.. | ||
|
||
./run_tests.sh --selenium "$@" | ||
exit_code=$? | ||
|
||
cd $TEST_DIRECTORY | ||
|
||
docker-compose down | ||
|
||
exit $exit_code |
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,3 @@ | ||
#!/bin/bash | ||
|
||
./run_tests.sh --dockerize --db postgres --external_tmp --clean_pyc --toolshed "$@" |
Oops, something went wrong.