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

variables:
  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
11
12
13
14
15
16
17
18
  - deploy

ant:
  stage: build
  script:
    - ant
  artifacts:
    paths:
      - build/*.xar

Mathias Goebel's avatar
Mathias Goebel committed
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
installation:
  stage: test
  script:
    - wget --quite --output-document=${EXIST-DB}.tar.gz https://bintray.com/existdb/releases/download_file?file_path=${EXIST-DB}.tar.gz
    - tar -xzf ${EXIST-DB}.tar.gz
    - cp build/*.xar ${EXIST-DB}/autodeploy
    - bash ${EXIST-DB}/bin/startup.sh | tee output.log &
    # wait for eXist
    - while [ $(curl -I -s http://localhost:8080 | grep -c "200 OK") == 0 ]; do sleep 2s; done
    # shutdown eXist
    - bash ${EXIST-DB}/bin/shutdown.sh
    - mv /tmp/tests-*.xml .
  artifacts:
    paths:
      - output.log
      - tests-*.xml

Mathias Goebel's avatar
Mathias Goebel committed
36
37
38
39
40
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