Commit 85fc6211 authored by Sebastian Miller's avatar Sebastian Miller
Browse files

CI add-host workaround

parent 4b7df309
......@@ -55,7 +55,6 @@ build:ensembler:
integration-tests:ensembler:
stage: integration-tests
image: $DOCKER_DIND_IMAGE
#image: python:3.8-slim-buster
only:
- integration
services:
......@@ -67,32 +66,21 @@ integration-tests:ensembler:
variables:
INFLUXDB_ADMIN_USER: admin
INFLUXDB_ADMIN_PASSWORD: admin1234
# entrypoint: ["/bin/bash", "-c", "cp /builds/melodic/zpp-assembler/integration/system-setup/influxdb/influx_init.iql \
# /docker-entrypoint-initdb.d/influx_init.iql/"] # Volume mounting workaround
# - name: $CONTAINER_BASE_TAG:$CI_COMMIT_SHA
# alias: ensembler
# variables:
# PORT: 5000
# entrypoint: ["/bin/bash", "-c", "cp -R /builds/melodic/zpp-assembler/integration/ensembler_flask/tests/config/* \
# /ensembler/config/"] # Volume mounting workaround
script:
- apk add --no-cache curl
#- docker exec -d influxdb 'echo "CREATE DATABASE melodic_ui; CREATE DATABASE morphemic;" | influxdb'
- 'curl --user admin:admin1234 -XPOST "http://influxdb:8086/query" --data-urlencode "q=CREATE DATABASE melodic_ui"'
- 'curl --user admin:admin1234 -XPOST "http://influxdb:8086/query" --data-urlencode "q=CREATE DATABASE morphemic"'
- docker load -i image/ensembler.tar # Load the artifact image
- docker run
-d
--env-file $ENSEMBLER_DIR/tests/config/server_params.env
--network=host
--add-host=activemq:$(getent hosts activemq | awk '{ print $1 }')
--add-host=influxdb:$(getent hosts influxdb | awk '{ print $1 }')
-v $ENSEMBLER_DIR/tests/config/properties.yml:/ensembler/config/properties.yml
ensembler
#TODO add detach to running container
- apk add --no-cache python3 py3-pip
#- pip3 install --no-cache-dir docker-compose
#- docker-compose -v
- cd $SYSTEM_SETUP_DIR
#- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
#- docker pull $CONTAINER_BASE_TAG:$CI_COMMIT_SHA
#- docker-compose --profile gitlab up -d # Run the test environment
- cd influxdb
- chmod u+x ./fill_db.sh
- ./fill_db.sh 'influxdb' 'sample_data_separate_runs' # Upload test data to InfluxDB
......@@ -102,7 +90,6 @@ integration-tests:ensembler:
- poetry install
- ENSEMBLER_HOST_IP='127.0.0.1' poetry run pytest tests/test_requests.py # Run the test
- docker stop ensembler
#- docker-compose stop # Stop the test environment
# Push the built and tested image
deploy:ensembler:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment