Commit c7f1436c authored by Sebastian Miller's avatar Sebastian Miller
Browse files

small CI fix

parent 85fc6211
......@@ -44,10 +44,9 @@ build:ensembler:
- docker pull $CONTAINER_RELEASE_IMAGE || true # Attempt to pull previous image as a cache for the below build.
- docker build --cache-from $CONTAINER_RELEASE_IMAGE -t ensembler .
- docker image ls
#- docker push $CONTAINER_BASE_TAG:$CI_COMMIT_SHA # Push the new, not-yet-tested image.
- cd $CI_PROJECT_DIR
- mkdir image
- docker save ensembler > image/ensembler.tar # Save the image as an artifact for furhter stages
- docker save ensembler > image/ensembler.tar # Save the image as an artifact for further stages
artifacts:
paths:
- image
......@@ -70,7 +69,9 @@ integration-tests:ensembler:
- apk add --no-cache curl
- '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
# Load the artifact image
- docker load -i image/ensembler.tar
# Start the ensembler
- docker run
-d
--env-file $ENSEMBLER_DIR/tests/config/server_params.env
......@@ -78,17 +79,20 @@ integration-tests:ensembler:
--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
- cd $SYSTEM_SETUP_DIR
- cd influxdb
- chmod u+x ./fill_db.sh
- ./fill_db.sh 'influxdb' 'sample_data_separate_runs' # Upload test data to InfluxDB
- ls -l
- chmod +x ./fill_db.sh
- ls -l
# Upload test data to InfluxDB
- ./fill_db.sh 'influxdb' 'sample_data_separate_runs'
- cd $ENSEMBLER_DIR
- pip3 install --no-cache-dir --upgrade pip
- pip3 install --no-cache-dir poetry
- poetry install
- ENSEMBLER_HOST_IP='127.0.0.1' poetry run pytest tests/test_requests.py # Run the test
# Run the requests test
- ENSEMBLER_HOST_IP='127.0.0.1' poetry run pytest tests/test_requests.py
- docker stop ensembler
# Push the built and tested image
......@@ -101,8 +105,6 @@ deploy:ensembler:
- $DOCKER_DIND_SERVICE
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
#- docker pull $CONTAINER_TEST_IMAGE
- docker load -i image/ensembler.tar # Load the artifact image
#- echo "$K8S_SECRET_DOCKER_PASSWORD" | docker login $CI_REGISTRY -u $K8S_SECRET_DOCKER_USER --password-stdin
- docker tag ensembler $CONTAINER_RELEASE_IMAGE
- docker push $CONTAINER_RELEASE_IMAGE
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