.gitlab-ci.yml 1012 Bytes
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
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
installation:
  stage: test
  script:
Mathias Goebel's avatar
typo    
Mathias Goebel committed
22
    - 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
23
    - tar -xzf ${EXIST_DB}.tar.gz; mkdir ${EXIST_DB}/lib/test
Mathias Goebel's avatar
Mathias Goebel committed
24
    - cp build/*.xar ${EXIST_DB}/autodeploy
Mathias Goebel's avatar
typo    
Mathias Goebel committed
25
    - bash ${EXIST_DB}/bin/startup.sh | tee output.log &
Mathias Goebel's avatar
Mathias Goebel committed
26
27
28
    # 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
29
    - bash ${EXIST_DB}/bin/shutdown.sh
Mathias Goebel's avatar
Mathias Goebel committed
30
    - ls -al /tmp; mv /tmp/tests-* .
Mathias Goebel's avatar
Mathias Goebel committed
31
32
33
34
35
  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