diff options
author | Rémy Coutable <remy@rymai.me> | 2017-09-05 14:32:43 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-09-05 14:32:43 +0000 |
commit | 2967f8b67cccc4ab24a21dff4be3cb6de712dc65 (patch) | |
tree | 47cb319845bbf797ff793c2c62c283176e4bf87c /vendor/gitlab-ci-yml/Gradle.gitlab-ci.yml | |
parent | 845b5db69ee7dba12e7d54d555f85438789eaf38 (diff) | |
parent | 0cb88374cea8d7b907b40ae223b34f5b946d0100 (diff) | |
download | gitlab-ce-2967f8b67cccc4ab24a21dff4be3cb6de712dc65.tar.gz |
Merge branch 'update-gitignore-9-5' into 'master'
update gitignores and licenses
See merge request !13423
Diffstat (limited to 'vendor/gitlab-ci-yml/Gradle.gitlab-ci.yml')
-rw-r--r-- | vendor/gitlab-ci-yml/Gradle.gitlab-ci.yml | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/vendor/gitlab-ci-yml/Gradle.gitlab-ci.yml b/vendor/gitlab-ci-yml/Gradle.gitlab-ci.yml index a65e48a3389..48d98dddfad 100644 --- a/vendor/gitlab-ci-yml/Gradle.gitlab-ci.yml +++ b/vendor/gitlab-ci-yml/Gradle.gitlab-ci.yml @@ -1,41 +1,36 @@ -# This template uses the java:8 docker image because there isn't any -# official Gradle image at this moment -# # This is the Gradle build system for JVM applications # https://gradle.org/ # https://github.com/gradle/gradle -image: java:8 +image: gradle:alpine # 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: - GRADLE_OPTS: "-Dorg.gradle.daemon=false" + GRADLE_OPTS: "-Dorg.gradle.daemon=false" -# Make the gradle wrapper executable. This essentially downloads a copy of -# Gradle to build the project with. -# https://docs.gradle.org/current/userguide/gradle_wrapper.html -# It is expected that any modern gradle project has a wrapper before_script: - - chmod +x gradlew + - export GRADLE_USER_HOME=`pwd`/.gradle -# We redirect the gradle user home using -g so that it caches the -# wrapper and dependencies. -# https://docs.gradle.org/current/userguide/gradle_command_line.html -# -# Unfortunately it also caches the build output so -# cleaning removes reminants of any cached builds. -# The assemble task actually builds the project. -# If it fails here, the tests can't run. build: stage: build - script: - - ./gradlew -g /cache/.gradle clean assemble - allow_failure: false + script: gradle --build-cache assemble + cache: + key: "$CI_COMMIT_REF_NAME" + policy: push + paths: + - build + - .gradle + -# Use the generated build output to run the tests. test: stage: test - script: - - ./gradlew -g /cache/.gradle check + script: gradle check + cache: + key: "$CI_COMMIT_REF_NAME" + policy: pull + paths: + - build + - .gradle + |