variables:
MODULE:
value: ""
description: "Maven module. Empty = all modules"
TAGS:
value: ""
description: "JUnit tags. Empty = all tests"
CLASS:
value: ""
description: "Test class (e.g. LoginTest). Empty = all classes"
THREADS:
value: "1"
description: "Number of parallel threads"
LOG_LEVEL:
value: "INFO"
description: "Logging level (TRACE, DEBUG, INFO, WARN, ERROR)"
BRANCH:
value: "develop"
description: "Git branch"
build:
stage: build
script:
- |
CMD="mvn clean test"
if [ -n "$MODULE" ]; then
CMD="$CMD -pl $MODULE -am"
fi
if [ -n "$TAGS" ]; then
CMD="$CMD -Dgroups=$TAGS"
fi
if [ -n "$CLASS" ]; then
CMD="$CMD -Dtest=$CLASS"
fi
CMD="$CMD \
-Dthreads=$THREADS \
-Dlog.level=$LOG_LEVEL"
echo "$CMD"
eval "$CMD"
artifacts:
when: always
paths:
- target/allure-results
- target/logs
- target/videos