.gitlab-ci.yml 1.38 KB
Newer Older
Alexander Weigl's avatar
Alexander Weigl committed
1 2 3 4
# This is the Gradle build system for JVM applications
# https://gradle.org/
# https://github.com/gradle/gradle
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 16 17 18 19
    - .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:
  GRADLE_OPTS: "-Dorg.gradle.daemon=false"

before_script:
  - export GRADLE_USER_HOME=`pwd`/.gradle
alexander.weigl's avatar
alexander.weigl committed
20 21

variables:
22
  GIT_SSL_NO_VERIFY: "true"
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
build:jdk9:
Alexander Weigl's avatar
Alexander Weigl committed
30
  stage: build
Alexander Weigl's avatar
Alexander Weigl committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
  image: key-dev-jdk9
  script: gradle --build-cache assemble
  allow_failure: true
  cache:
    key: "$CI_COMMIT_REF_NAME"
    policy: push
    paths:
      - build
      - .gradle


build:jdk8:
  stage: build
  script: gradle --build-cache assemble
  image: key-dev-jdk8
  cache:
    key: "$CI_COMMIT_REF_NAME"
    policy: push
    paths:
      - build
      - .gradle
alexander.weigl's avatar
alexander.weigl committed
52

Alexander Weigl's avatar
Alexander Weigl committed
53 54
test:
  stage: test
Alexander Weigl's avatar
Alexander Weigl committed
55
  script: gradle check
56
  allow_failure: true
Alexander Weigl's avatar
Alexander Weigl committed
57 58 59 60 61 62
  cache:
    key: "$CI_COMMIT_REF_NAME"
    policy: pull
    paths:
      - build
      - .gradle
alexander.weigl's avatar
alexander.weigl committed
63

alexander.weigl's avatar
alexander.weigl committed
64
deploy:
Alexander Weigl's avatar
Alexander Weigl committed
65
  stage: deploy
Alexander Weigl's avatar
Alexander Weigl committed
66 67 68 69
  script: gradle distJar
  cache:
    key: "$CI_COMMIT_REF_NAME"
    policy: pull
alexander.weigl's avatar
alexander.weigl committed
70
    paths:
Alexander Weigl's avatar
Alexander Weigl committed
71 72
      - build
      - .gradle
Alexander Weigl's avatar
Alexander Weigl committed
73 74
  artifacts:
    paths:
Alexander Weigl's avatar
Alexander Weigl committed
75 76
      - "build/libs/*.jar"
  allow_failure: true