scenarium-logger/.gitlab-ci.yml

50 lines
848 B
YAML
Raw Normal View History

2020-08-28 14:20:18 +02:00
image: heeroyui/scenarium-gitlabci:latest
2020-08-28 17:25:46 +02:00
variables:
JAVA_TOOL_OPTIONS: "-Dfile.encoding=UTF8"
cache:
paths:
- .m2/repository/
- target/
stages:
- style
2020-08-16 23:24:08 +02:00
- build
- test
2020-08-28 17:25:46 +02:00
- package
2020-08-16 23:43:49 +02:00
style_job:
stage: style
script:
2020-08-28 17:25:46 +02:00
- java -jar ~/checkstyle.jar -c CheckStyle.xml `find src/ -name "*.java"`
- java -jar ~/checkstyle.jar -c CheckStyle.xml `find test/src/ -name "*.java"`
2020-08-16 23:24:08 +02:00
2020-08-16 23:43:49 +02:00
build_job:
2020-08-16 23:24:08 +02:00
stage: build
2020-08-16 23:43:49 +02:00
dependencies:
- style_job
2020-08-16 23:24:08 +02:00
script:
2020-08-28 17:25:46 +02:00
- mvn $MAVEN_CLI_OPTS compile
2020-08-16 23:24:08 +02:00
2020-08-16 23:43:49 +02:00
test_job:
2020-08-16 23:24:08 +02:00
stage: test
2020-08-16 23:43:49 +02:00
dependencies:
- build_job
2020-08-16 23:24:08 +02:00
script:
2020-08-28 17:25:46 +02:00
- mvn $MAVEN_CLI_OPTS test
2020-08-16 23:24:08 +02:00
artifacts:
reports:
junit: junit/TEST-*.xml
2020-08-28 17:25:46 +02:00
package_job:
stage: package
dependencies:
- test_job
script:
- mvn $MAVEN_CLI_OPTS package
artifacts:
when: on_success
expire_in: 1 day
paths:
- target/*.jar