debian-mirror-gitlab/lib/gitlab/ci/templates/Gradle.gitlab-ci.yml

35 lines
807 B
YAML
Raw Normal View History

2016-11-03 12:29:30 +05:30
# This is the Gradle build system for JVM applications
# https://gradle.org/
# https://github.com/gradle/gradle
2018-03-17 18:26:18 +05:30
image: gradle:alpine
2016-11-03 12:29:30 +05:30
2017-08-17 22:00:37 +05:30
# Disable the Gradle daemon for Continuous Integration servers as correctness
# is usually a priority over speed in CI environments. Using a fresh
# runtime for each build is more reliable since the runtime is completely
# isolated from any previous builds.
variables:
2018-03-17 18:26:18 +05:30
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
2017-08-17 22:00:37 +05:30
2016-11-03 12:29:30 +05:30
before_script:
2018-03-17 18:26:18 +05:30
- export GRADLE_USER_HOME=`pwd`/.gradle
2016-11-03 12:29:30 +05:30
build:
stage: build
2018-03-17 18:26:18 +05:30
script: gradle --build-cache assemble
cache:
key: "$CI_COMMIT_REF_NAME"
policy: push
paths:
- build
- .gradle
2016-11-03 12:29:30 +05:30
test:
stage: test
2018-03-17 18:26:18 +05:30
script: gradle check
cache:
key: "$CI_COMMIT_REF_NAME"
policy: pull
paths:
- build
- .gradle