Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
subugoe
ahiqar
backend
Commits
0d3e4ce0
Commit
0d3e4ce0
authored
Feb 22, 2021
by
mrodzis
💪
Browse files
ci: add env variables
parent
38f30276
Pipeline
#175232
failed with stages
in 58 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
0d3e4ce0
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment