2021-09-30 23:02:18 +05:30
|
|
|
# To contribute improvements to CI/CD templates, please follow the Development guide at:
|
|
|
|
# https://docs.gitlab.com/ee/development/cicd/templates.html
|
|
|
|
# This specific template is located at:
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Gradle.gitlab-ci.yml
|
|
|
|
|
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
|
2021-09-30 23:02:18 +05:30
|
|
|
|
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
|