.gitlab-ci.yml 1.87 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-jdk10
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 17 18 19
  GRADLE_OPTS: "-Dorg.gradle.daemon=false \
                --add-modules java.xml.bind \
                '-Dorg.gradle.jvmargs=--add-modules java.xml.bind'"
  GIT_SSL_NO_VERIFY: "true"
Alexander Weigl's avatar
Alexander Weigl committed
20 21 22

before_script:
  - export GRADLE_USER_HOME=`pwd`/.gradle
alexander.weigl's avatar
alexander.weigl committed
23
#  - 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
24

25

Alexander Weigl's avatar
Alexander Weigl committed
26 27 28 29 30
stages:
  - build
  - test
  - deploy

Alexander Weigl's avatar
Alexander Weigl committed
31
build:jdk9:
Alexander Weigl's avatar
Alexander Weigl committed
32
  stage: build
Alexander Weigl's avatar
Alexander Weigl committed
33 34 35 36 37 38 39 40 41 42 43
  image: key-dev-jdk9
  script: gradle --build-cache assemble
  allow_failure: true
  cache:
    key: "$CI_COMMIT_REF_NAME"
    policy: push
    paths:
      - build
      - .gradle


alexander.weigl's avatar
alexander.weigl committed
44 45 46 47 48 49 50 51 52 53 54 55 56
build:jdk10:
  stage: build
  image: key-dev-jdk10
  script: gradle --build-cache assemble
  allow_failure: true
  cache:
    key: "$CI_COMMIT_REF_NAME"
    policy: push
    paths:
      - build
      - .gradle


Alexander Weigl's avatar
Alexander Weigl committed
57 58
build:jdk8:
  stage: build
alexander.weigl's avatar
alexander.weigl committed
59 60
  variables:
      GRADLE_OPTS: "-Dorg.gradle.daemon=false"
Alexander Weigl's avatar
Alexander Weigl committed
61 62
  script: gradle --build-cache assemble
  image: key-dev-jdk8
alexander.weigl's avatar
alexander.weigl committed
63

Alexander Weigl's avatar
Alexander Weigl committed
64 65 66 67 68 69
  cache:
    key: "$CI_COMMIT_REF_NAME"
    policy: push
    paths:
      - build
      - .gradle
alexander.weigl's avatar
alexander.weigl committed
70

Alexander Weigl's avatar
Alexander Weigl committed
71 72
test:
  stage: test
Alexander Weigl's avatar
Alexander Weigl committed
73
  script: gradle check
74
  allow_failure: true
Alexander Weigl's avatar
Alexander Weigl committed
75 76 77 78 79 80
  cache:
    key: "$CI_COMMIT_REF_NAME"
    policy: pull
    paths:
      - build
      - .gradle
alexander.weigl's avatar
alexander.weigl committed
81

alexander.weigl's avatar
alexander.weigl committed
82
deploy:
Alexander Weigl's avatar
Alexander Weigl committed
83
  stage: deploy
Alexander Weigl's avatar
Alexander Weigl committed
84 85 86 87
  script: gradle distJar
  cache:
    key: "$CI_COMMIT_REF_NAME"
    policy: pull
alexander.weigl's avatar
alexander.weigl committed
88
    paths:
Alexander Weigl's avatar
Alexander Weigl committed
89 90
      - build
      - .gradle
Alexander Weigl's avatar
Alexander Weigl committed
91 92
  artifacts:
    paths:
Alexander Weigl's avatar
Alexander Weigl committed
93 94
      - "build/libs/*.jar"
  allow_failure: true