-
Daniel Rainer authored48d94389
This GitLab CI configuration is valid.
Learn more
.gitlab-ci.yml 4.18 KiB
image: jhipster/jhipster:v7.6.0
stages:
- setup
- lint
- build
- test
- analyze
- package
- release
- deploy
before_script:
- export NG_CLI_ANALYTICS="false"
- export MAVEN_USER_HOME=`pwd`/.maven
npm-install:
stage: setup
script:
- npm install
cache:
key:
files:
- package-lock.json
paths:
- node_modules/
policy: pull-push
checkstyle:
stage: lint
script:
- ./mvnw -ntp checkstyle:check -Dmaven.repo.local=$MAVEN_USER_HOME
needs: []
cache:
- key: '$CI_COMMIT_REF_NAME'
paths:
- .maven/
prettier:
stage: lint
script:
- npm run prettier:check
allow_failure: true
needs: [npm-install]
cache:
key:
files:
- package-lock.json
paths:
- node_modules/
policy: pull
eslint:
stage: lint
script:
# eslint exits 0 on warnings, this is a workaround to exit 1 when warnings are present.
- 'npm run lint | tee lint.log'
- "! grep -qE '✖ [0-9]+ problem' lint.log"
allow_failure: true
needs: [npm-install]
cache:
key:
files:
- package-lock.json
paths:
- node_modules/
policy: pull
maven-compile:
stage: build