-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
31 lines (26 loc) · 768 Bytes
/
.gitlab-ci.yml
File metadata and controls
31 lines (26 loc) · 768 Bytes
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
image: java:8-jdk
# Exported newe gradlehome so that it is inside the build dir
# and can be cached betweend builds. This speeds up the build because
# it dose not require to download a new instance of the gradle wrapper
# every time
before_script:
- export GRADLE_USER_HOME="$CI_PROJECT_DIR/.gradlehome"
cache:
paths:
- "$CI_PROJECT_DIR/.gradlehome/wrapper/"
run_unit_tests:
stage: test
script: ./gradlew test
dist_zip:
stage: build
script: ./gradlew distZip
artifacts:
paths:
- build/libs/
- build/distributions/
deploy_artifactory:
stage: deploy
only:
- tags
script:
- ./gradlew -DARTIFACTORY_USERNAME="$ARTIFACTORY_USERNAME" -DARTIFACTORY_PASSWORD="$ARTIFACTORY_PASSWORD" -DARTIFACTORY_URL="$ARTIFACTORY_URL" publish