.gitlab-ci.yml 1.32 KB
Newer Older
Mathias Goebel's avatar
Mathias Goebel committed
1
2
3
image: docker.gitlab.gwdg.de/fontane-notizbuecher/build:latest

variables:
Mathias Goebel's avatar
Mathias Goebel committed
4
  EXIST_DB: "eXist-db-4.3.1"
Mathias Goebel's avatar
Mathias Goebel committed
5
6
7

stages:
  - build
Mathias Goebel's avatar
Mathias Goebel committed
8
  - test
Mathias Goebel's avatar
Mathias Goebel committed
9
10
  - deploy

Mathias Goebel's avatar
Mathias Goebel committed
11
12
13
14
build-develop:
  except:
      - master
      - tags
Mathias Goebel's avatar
Mathias Goebel committed
15
16
17
18
19
20
21
  stage: build
  script:
    - ant
  artifacts:
    paths:
      - build/*.xar

Mathias Goebel's avatar
Mathias Goebel committed
22
23
24
25
26
27
28
29
30
31
32
33
build-master:
  only:
      - master
      - tags
  stage: build
  script:
    - echo "project.name=http://textgrid.de/ns/SADE" > local.build.properties
    - ant
  artifacts:
    paths:
      - build/*.xar

Mathias Goebel's avatar
Mathias Goebel committed
34
35
36
installation:
  stage: test
  script:
Mathias Goebel's avatar
typo    
Mathias Goebel committed
37
    - wget --quiet --output-document=${EXIST_DB}.tar.gz https://bintray.com/existdb/releases/download_file?file_path=${EXIST_DB}.tar.gz
Mathias Goebel's avatar
Mathias Goebel committed
38
    - tar -xzf ${EXIST_DB}.tar.gz; mkdir ${EXIST_DB}/lib/test
39
    - ant dependencies
Mathias Goebel's avatar
Mathias Goebel committed
40
    - cp build/*.xar ${EXIST_DB}/autodeploy
Mathias Goebel's avatar
typo    
Mathias Goebel committed
41
    - bash ${EXIST_DB}/bin/startup.sh | tee output.log &
Mathias Goebel's avatar
Mathias Goebel committed
42
43
44
    # wait for eXist
    - while [ $(curl -I -s http://localhost:8080 | grep -c "200 OK") == 0 ]; do sleep 2s; done
    # shutdown eXist
Mathias Goebel's avatar
Mathias Goebel committed
45
    - bash ${EXIST_DB}/bin/shutdown.sh
46
    - ls -al /tmp; mv /tmp/tests-* . || true
Mathias Goebel's avatar
Mathias Goebel committed
47
48
49
50
  artifacts:
    paths:
      - output.log
      - tests-*.xml
51
      - ${EXIST_DB}/webapp/WEB-INF/logs/expath-repo.log
Mathias Goebel's avatar
Mathias Goebel committed
52

Mathias Goebel's avatar
Mathias Goebel committed
53
54
55
56
57
upload:
  stage: deploy
  script:
    - FILENAME=$(ls build/*.xar)
    - curl -u ci:${EXIST_UPLOAD_PW} -X POST -F file=@${FILENAME} https://ci.de.dariah.eu/exist-upload