GitLab update scheduled for Friday, December 10th between 08:15 and 08:45 CEST. If unpleasant, please contact René or Martin.

.gitlab-ci.yml 2 KB
Newer Older
René Schöne's avatar
fix CI    
René Schöne committed
1
variables:
2
  GIT_SUBMODULE_STRATEGY: recursive
3
  GIT_DEPTH: 1000
René Schöne's avatar
fix CI    
René Schöne committed
4

René Schöne's avatar
René Schöne committed
5
stages:
6
7
8
9
10
  - build
  - test
  - ragdoc_build
  - ragdoc_view
  - publish
René Schöne's avatar
René Schöne committed
11
12
13
14
15
16
17
18
19
20

before_script:
  - export GRADLE_USER_HOME=`pwd`/.gradle

cache:
  paths:
    - .gradle/wrapper
    - .gradle/caches

build:
René Schöne's avatar
René Schöne committed
21
  image: openjdk:11
René Schöne's avatar
René Schöne committed
22
23
24
25
26
  stage: build
  script:
    - ./gradlew --console=plain --no-daemon assemble jar
  artifacts:
    paths:
27
      - "ragconnect.base/build/libs/ragconnect-*.jar"
René Schöne's avatar
René Schöne committed
28
      - "ragconnect.base/src/gen"
29
30
31
32
33
34
35
36
    expire_in: 1 week

test:
  image: openjdk:11
  stage: test
  services:
    - name: "eclipse-mosquitto:1.6.9"
      alias: "mqtt"
René Schöne's avatar
René Schöne committed
37
38
  needs:
    - build
39
40
41
  script:
    - ./gradlew --console=plain --no-daemon allTests
  artifacts:
René Schöne's avatar
René Schöne committed
42
    when: always
43
    reports:
René Schöne's avatar
René Schöne committed
44
      junit: "ragconnect.tests/build/test-results/**/TEST-*.xml"
45
    expire_in: 1 week
René Schöne's avatar
René Schöne committed
46

René Schöne's avatar
René Schöne committed
47
48
49
publish:
  image: openjdk:11
  stage: publish
René Schöne's avatar
René Schöne committed
50
51
  needs:
    - test
René Schöne's avatar
René Schöne committed
52
53
  script:
    - "./gradlew publish"
René Schöne's avatar
René Schöne committed
54
55
  only:
    - master
René Schöne's avatar
René Schöne committed
56

57
58
59
60
61
ragdoc_build:
  image:
    name: "git-st.inf.tu-dresden.de:4567/jastadd/ragdoc-builder"
    entrypoint: [""]
  stage: ragdoc_build
René Schöne's avatar
René Schöne committed
62
  needs:
63
64
    - build
  script:
René Schöne's avatar
René Schöne committed
65
    - JAVA_FILES=$(find ragconnect.base/src/ -name '*.java')
66
67
68
69
70
71
72
73
74
75
    - /ragdoc-builder/start-builder.sh -excludeGenerated -d data/ $JAVA_FILES
  artifacts:
    paths:
      - "data/"

ragdoc_view:
  image:
    name: "git-st.inf.tu-dresden.de:4567/jastadd/ragdoc-view:relations"
    entrypoint: [""]
  stage: ragdoc_view
René Schöne's avatar
René Schöne committed
76
  needs:
77
78
79
    - ragdoc_build
  script:
    - DATA_DIR=$(pwd -P)/data
René Schöne's avatar
René Schöne committed
80
81
82
    - mkdir -p pages/docs/ragdoc
    - OUTPUT_DIR=$(pwd -P)/pages/docs/ragdoc
    - cd /ragdoc-view/src/ && rm -rf data && ln -s $DATA_DIR
83
84
85
    - /ragdoc-view/build-view.sh --output-path=$OUTPUT_DIR
  artifacts:
    paths:
René Schöne's avatar
René Schöne committed
86
      - "pages/docs/ragdoc"
87

René Schöne's avatar
René Schöne committed
88
pages:
René Schöne's avatar
René Schöne committed
89
  image: python:3.8-buster
René Schöne's avatar
René Schöne committed
90
  stage: publish
René Schöne's avatar
René Schöne committed
91
92
93
94
  needs:
    - ragdoc_view
    - test
  before_script:
95
    - pip install -U mkdocs mkdocs-macros-plugin mkdocs-git-revision-date-localized-plugin
René Schöne's avatar
René Schöne committed
96
  script:
René Schöne's avatar
René Schöne committed
97
98
99
100
    - cd pages && mkdocs build
  only:
    - dev
    - master
René Schöne's avatar
René Schöne committed
101
102
103
  artifacts:
    paths:
    - public