.gitlab-ci.yml 685 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
stages:
Gradl, Tobias's avatar
Gradl, Tobias committed
17
  - test
Gradl, Tobias's avatar
Gradl, Tobias committed
18 19
  - build
  - deploy
20 21 22 23 24 25

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

Gradl, Tobias's avatar
Gradl, Tobias committed
26 27 28
build:
  stage: build
  script: ./gradlew assemble
29 30
  artifacts:
    paths:
Gradl, Tobias's avatar
Gradl, Tobias committed
31 32
      - dariahsp-core/bin/build/libs/*.jar
      - dariahsp-sample-boot/bin/build/libs/*.jar
33

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