-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.gitlab-ci.yml
56 lines (48 loc) · 1.04 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
image: java:8-jdk
stages:
- build
- obfuscate
- test
- deploy
before_script:
# - echo `pwd` # debug
# - echo "$CI_BUILD_NAME, $CI_BUILD_REF_NAME $CI_BUILD_STAGE" # debug
- export GRADLE_USER_HOME=`pwd`/.gradle
- apt-get update -qq && apt-get install -y -qq unzip
- echo $JAVA_HOME
cache:
paths:
- .gradle/wrapper
- .gradle/caches
build:
stage: build
script:
- chmod +x ./gradlew
- ./gradlew jar
artifacts:
paths:
- build/libs/client.jar
expire_in: 1 hour
only:
- master
obfuscate:
stage: obfuscate
script:
- wget https://freefr.dl.sourceforge.net/project/proguard/proguard/5.3/proguard5.3.3.zip -O temp.zip; unzip temp.zip; rm temp.zip
- ls -l
- java -jar proguard5.3.3/lib/proguard.jar @client-config.pro
artifacts:
paths:
- build/libs/eldaria.jar
expire_in: 1 hour
test:
stage: test
script:
- chmod +x ./gradlew
- ./gradlew check
deploy:
stage: deploy
script:
- ./deploy
after_script:
- echo "End CI"