GitLab update scheduled for Friday, January 21th between 08:15 and 08:45 CET. If unpleasant, please contact René or Martin.

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

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

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

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

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

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

René Schöne's avatar
René Schöne committed
44
45
46
47
48
publish:
  image: openjdk:11
  stage: publish
  script:
    - "./gradlew publish"
René Schöne's avatar
René Schöne committed
49
50
  only:
    - master
René Schöne's avatar
René Schöne committed
51

52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
ragdoc_build:
  image:
    name: "git-st.inf.tu-dresden.de:4567/jastadd/ragdoc-builder"
    entrypoint: [""]
  stage: ragdoc_build
  dependencies:
    - build
  script:
    - JAVA_FILES=$(find src/ -name '*.java')
    - /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
  dependencies:
    - ragdoc_build
  script:
    - DATA_DIR=$(pwd -P)/data
    - mkdir -p pages/_static/ragdoc
    - OUTPUT_DIR=$(pwd -P)/pages/_static/ragdoc
    - cd /ragdoc-view
    - ( cd src/ && rm -rf data && ln -s $DATA_DIR )
    - /ragdoc-view/build-view.sh --output-path=$OUTPUT_DIR
    - ls -lah $OUTPUT_DIR
  artifacts:
    paths:
      - "pages/_static/ragdoc"

René Schöne's avatar
René Schöne committed
85
86
pages:
  image: python:3.7-alpine
René Schöne's avatar
René Schöne committed
87
  stage: publish
René Schöne's avatar
René Schöne committed
88
89
90
91
92
93
  script:
  - pip install -U sphinx sphinx-rtd-theme recommonmark sphinxemoji sphinx-markdown-tables
  - sphinx-build -b html pages/ public
  artifacts:
    paths:
    - public