Commit 0d3e4ce0 authored by mrodzis's avatar mrodzis 💪
Browse files

ci: add env variables

parent 38f30276
Pipeline #175232 failed with stages
in 58 seconds
......@@ -40,6 +40,9 @@ test_exist_app:
- docker:dind
stage: unit_tests
script:
# set environment variables
- *env
# start Docker container
- docker volume create ahikar-existdb_Data-testing
- mkdir -p docker/exist/logs
- ant -f exist-app/build.xml dependencies xar
......@@ -48,12 +51,14 @@ test_exist_app:
- cd docker || exit
- PORT=$(docker-compose ps | grep -E -o "0\.0\.0\.0:[0-9]{5}\->8080" | grep -E -o "0\.0\.0\.0:[0-9]{5}")
- sleep 10
# execute the tests
- header=$(curl --head -s http://localhost:8080/exist/restxq/trigger-tests)
- status=$(echo $header | head -n 1 | cut -d" " -f 2)
- echo "Current HTTP status is $status."
- if [[ "$status" != "200" ]]; then exit 1; fi
- curl http://localhost:8080/exist/restxq/trigger-tests
- sleep 40
# evaluate the tests
- failures=$(./get-unit-test-failures-and-errors.sh)
- echo -e "\033[1;33mThere is/are currently $failures failures or errors.\033[0m"
- if [[ "$failures" -gt 0 || ! -f "exist-app/test/ahikar-test-results.xml" ]]; then exit 1; else exit 0; fi
......
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