.gitlab-ci.yml 1.35 KB
Newer Older
Alexander Weigl's avatar
Alexander Weigl committed
1 2 3
# This is the Gradle build system for JVM applications
# https://gradle.org/
# https://github.com/gradle/gradle
Alexander Weigl's avatar
Alexander Weigl committed
4
image: key-dev-jdk8
alexander.weigl's avatar
alexander.weigl committed
5

alexander.weigl's avatar
alexander.weigl committed
6 7 8
cache:
  paths:
    - .m2/
Alexander Weigl's avatar
Alexander Weigl committed
9 10 11 12 13 14 15
    - .gradle/

# Disable the Gradle daemon for Continuous Integration servers as correctness
# is usually a priority over speed in CI environments. Using a fresh
# runtime for each build is more reliable since the runtime is completely
# isolated from any previous builds.
variables:
Alexander Weigl's avatar
Alexander Weigl committed
16
  GRADLE_OPTS: "-Dorg.gradle.daemon=false"
alexander.weigl's avatar
alexander.weigl committed
17
  GIT_SSL_NO_VERIFY: "true"
Alexander Weigl's avatar
Alexander Weigl committed
18 19 20

before_script:
  - export GRADLE_USER_HOME=`pwd`/.gradle
alexander.weigl's avatar
alexander.weigl committed
21
#  - export GRADLE_OPTS="-Dorg.gradle.daemon=false --add-modules java.xml.bind '-Dorg.gradle.jvmargs=--add-modules java.xml.bind'"
alexander.weigl's avatar
alexander.weigl committed
22

23

Alexander Weigl's avatar
Alexander Weigl committed
24 25 26 27 28
stages:
  - build
  - test
  - deploy

Alexander Weigl's avatar
Alexander Weigl committed
29 30
build:jdk8:
  stage: build
alexander.weigl's avatar
alexander.weigl committed
31 32
  variables:
      GRADLE_OPTS: "-Dorg.gradle.daemon=false"
Alexander Weigl's avatar
Alexander Weigl committed
33 34
  script: gradle --build-cache assemble
  image: key-dev-jdk8
alexander.weigl's avatar
alexander.weigl committed
35

Alexander Weigl's avatar
Alexander Weigl committed
36 37 38 39 40 41
  cache:
    key: "$CI_COMMIT_REF_NAME"
    policy: push
    paths:
      - build
      - .gradle
alexander.weigl's avatar
alexander.weigl committed
42

Alexander Weigl's avatar
Alexander Weigl committed
43 44
test:
  stage: test
Alexander Weigl's avatar
Alexander Weigl committed
45
  script: gradle check
46
  allow_failure: true
Alexander Weigl's avatar
Alexander Weigl committed
47 48 49 50 51 52
  cache:
    key: "$CI_COMMIT_REF_NAME"
    policy: pull
    paths:
      - build
      - .gradle
alexander.weigl's avatar
alexander.weigl committed
53

alexander.weigl's avatar
alexander.weigl committed
54
deploy:
Alexander Weigl's avatar
Alexander Weigl committed
55
  stage: deploy
Alexander Weigl's avatar
Alexander Weigl committed
56 57 58 59
  script: gradle distJar
  cache:
    key: "$CI_COMMIT_REF_NAME"
    policy: pull
alexander.weigl's avatar
alexander.weigl committed
60
    paths:
Alexander Weigl's avatar
Alexander Weigl committed
61 62
      - build
      - .gradle
Alexander Weigl's avatar
Alexander Weigl committed
63 64
  artifacts:
    paths:
Alexander Weigl's avatar
Alexander Weigl committed
65 66
      - "build/libs/*.jar"
  allow_failure: true