-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
39 lines (38 loc) · 1.15 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
image: gradle:alpine
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
test:
stage: test
script: gradle check
cache:
key: "$CI_COMMIT_REF_NAME"
policy: pull
paths:
- build
- .gradle
# Optional deployment to Heroku
# 1. Signup: https://signup.heroku.com/
# 2. Create an API key: https://dashboard.heroku.com/account
# 3. Create a new app: https://dashboard.heroku.com/new-app
# 4. Configure HEROKU_API_KEY and HEROKU_APP_NAME in GitLab repository: -> Settings -> CI/CD -> Variables (https://docs.gitlab.com/ee/ci/examples/deployment/#storing-api-keys)
# 5. Uncomment the following configuration from "deploy" on
# 6. Enjoy: https://<heroku-app-name>.herokuapp.com/
#deploy:
# image: ruby:latest
# stage: deploy
# script:
# - gem install dpl
# - dpl --provider=heroku --app=$HEROKU_APP_NAME --api_key=$HEROKU_API_KEY
# only:
# - main