28 lines
556 B
YAML
28 lines
556 B
YAML
# Based on https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Gradle.gitlab-ci.yml
|
|
image: gradle:jdk11
|
|
|
|
variables:
|
|
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
|
|
|
before_script:
|
|
- export GRADLE_USER_HOME=`pwd`/.gradle
|
|
|
|
build:
|
|
stage: build
|
|
script: gradle --build-cache assemble
|
|
cache:
|
|
key: "$CI_COMMIT_REF_NAME"
|
|
policy: push
|
|
paths:
|
|
- build
|
|
- .gradle
|
|
|
|
artifact:
|
|
stage: deploy
|
|
script: gradle publish
|
|
cache:
|
|
key: "$CI_COMMIT_REF_NAME"
|
|
policy: pull-push
|
|
paths:
|
|
- build
|
|
- .gradle
|