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

42 lines
1.1 KiB
YAML
Raw Normal View History

2022-11-25 23:54:43 +05:30
# You can copy and paste this template into a new `.gitlab-ci.yml` file.
# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword.
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
before_script:
2022-05-07 20:08:51 +05:30
- GRADLE_USER_HOME="$(pwd)/.gradle"
- export GRADLE_USER_HOME
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
2022-11-25 23:54:43 +05:30
deploy:
stage: deploy
script: echo "Define your deployment script!"
environment: production