An error occurred while loading the file. Please try again.
-
Daniel Rainer authored4bd73dff
This GitLab CI configuration is valid.
Learn more
.gitlab-ci.yml 2.98 KiB
image: jhipster/jhipster:v7.6.0
cache:
key: '$CI_COMMIT_REF_NAME'
paths:
- .maven/
stages:
- check
- build
- test
- analyze
- package
- release
- deploy
before_script:
- export NG_CLI_ANALYTICS="false"
- export MAVEN_USER_HOME=`pwd`/.maven
checkstyle:
stage: check
script:
- ./mvnw -ntp checkstyle:check -Dmaven.repo.local=$MAVEN_USER_HOME
maven-compile:
stage: build
script:
- ./mvnw -ntp compile -P-webapp -Dmaven.repo.local=$MAVEN_USER_HOME
artifacts:
paths:
- target/classes/
- target/generated-sources/
expire_in: 1 day
maven-test:
# DinD service is required for Testcontainers
services:
- docker:20-dind
variables:
# Instruct Testcontainers to use the daemon of DinD.
DOCKER_HOST: 'tcp://docker:2375'
DOCKER_TLS_CERTDIR: ''
# before_script:
# - docker info
stage: test
script:
- ./mvnw -ntp test -P-webapp -Dmaven.repo.local=$MAVEN_USER_HOME -Dspring.profiles.active=testcontainers || FAILED=true
- ./mvnw -ntp integration-test -P-webapp -Dmaven.repo.local=$MAVEN_USER_HOME -Dspring.profiles.active=testcontainers || FAILED=true
artifacts:
reports:
junit:
- target/surefire-reports/TEST-*.xml
- target/failsafe-reports/TEST-*.xml
paths:
- target/surefire-reports
- target/failsafe-reports
- target/site
expire_in: 30 day
allow_failure: true
frontend-test:
stage: test
script:
- npm install
- npm test
artifacts:
reports:
junit: target/test-results/TESTS-results-jest.xml
paths:
- target/test-results