This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
This GitLab CI configuration is valid. Learn more
.gitlab-ci.yml 2.19 KiB
image: jhipster/jhipster:v6.10.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

nohttp:
  stage: check
  script:
    - ./mvnw -ntp checkstyle:check -Dmaven.repo.local=$MAVEN_USER_HOME

maven-compile:
  stage: build
  script:
    - ./mvnw -ntp compile -P-webpack -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:dind
#
#   variables:
#     # Instruct Testcontainers to use the daemon of DinD.
#     DOCKER_HOST: 'tcp://docker:2375'
#     # Improve performance with overlayfs.
#     DOCKER_DRIVER: overlay2
#
#   stage: test
#   script:
#     - ./mvnw -ntp verify -P-webpack -Dmaven.repo.local=$MAVEN_USER_HOME -Dspring.profiles.active=testcontainers
#   artifacts:
#     reports:
#      junit: target/test-results/**/TEST-*.xml
#    paths:
#      - target/test-results
#      - target/jacoco
#    expire_in: 1 day

frontend-test:
  stage: test
  script:
    - npm install
    - npm test
  artifacts:
    reports:
      junit: target/test-results/TESTS-results-jest.xml
    paths:
      - target/test-results
      - target/jacoco
    expire_in: 1 day

maven-package:
  stage: package