.gitlab-ci.yml 608 Bytes
Newer Older
Gradl, Tobias's avatar
Gradl, Tobias committed
1
image: java:8-jdk
Gradl, Tobias's avatar
Gradl, Tobias committed
2
3

variables:
Gradl, Tobias's avatar
Gradl, Tobias committed
4
5
  GRADLE_OPTS: "-Dorg.gradle.daemon=false"
  NEXUS_CREDENTIALS: "-Pnexususer=$NEXUS_REPO_USER -Pnexuspass=$NEXUS_REPO_PASS"
Gradl, Tobias's avatar
Gradl, Tobias committed
6

Gradl, Tobias's avatar
Gradl, Tobias committed
7
8
before_script:
  - export GRADLE_USER_HOME=`pwd`/.gradle
Gradl, Tobias's avatar
Gradl, Tobias committed
9
  - ./gradlew wrapper --distribution-type=bin
Gradl, Tobias's avatar
Gradl, Tobias committed
10

Gradl, Tobias's avatar
Gradl, Tobias committed
11
12
13
14
cache:
  paths:
    - .gradle/wrapper
    - .gradle/caches
Gradl, Tobias's avatar
Gradl, Tobias committed
15

Gradl, Tobias's avatar
Gradl, Tobias committed
16
17
18
stages:
  - build
  - deploy
19
20
21
22
23
24

test:
  stage: test
  script:
    - ./gradlew check

Gradl, Tobias's avatar
Gradl, Tobias committed
25
26
27
build:
  stage: build
  script: ./gradlew assemble
28
29
30
31
  artifacts:
    paths:
      - build/libs/*.jar

Gradl, Tobias's avatar
Gradl, Tobias committed
32
33
deploy:
  stage: deploy
Gradl, Tobias's avatar
Gradl, Tobias committed
34
35
  script: 
    - ./gradlew publish -x test $NEXUS_CREDENTIALS
Gradl, Tobias's avatar
Gradl, Tobias committed
36
  only:
Gradl, Tobias's avatar
Gradl, Tobias committed
37
    - v2.0