java-commons/.gitlab-ci.yml

42 lines
667 B
YAML
Raw Normal View History

2022-04-28 20:52:32 +02:00
image: gradle:alpine
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
before_script:
- GRADLE_USER_HOME="$(pwd)/.gradle"
- export GRADLE_USER_HOME
stages:
- build
- test
- deploy
build:
stage: build
script: gradle --build-cache assemble
cache:
key: "$CI_COMMIT_REF_NAME"
policy: push
paths:
- build
- .gradle
test:
stage: test
script: gradle check
cache:
key: "$CI_COMMIT_REF_NAME"
policy: pull
paths:
- build
- .gradle
deploy:
only:
refs:
- master
stage: deploy
script:
- gradle --build-cache publish -Pmaven="$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/maven"