.gitlab-ci.yml 1.29 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
build-master:
  only:
      - master
  stage: build
  script:
Mathias Goebel's avatar
Mathias Goebel committed
27
    - cp master.build.properties local.build.properties
Mathias Goebel's avatar
Mathias Goebel committed
28
29
30
31
32
    - ant
  artifacts:
    paths:
      - build/*.xar

Mathias Goebel's avatar
Mathias Goebel committed
33
34
35
installation:
  stage: test
  script:
Mathias Goebel's avatar
typo    
Mathias Goebel committed
36
    - 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
37
    - tar -xzf ${EXIST_DB}.tar.gz; mkdir ${EXIST_DB}/lib/test
38
    - ant dependencies
Mathias Goebel's avatar
Mathias Goebel committed
39
    - cp build/*.xar ${EXIST_DB}/autodeploy
Mathias Goebel's avatar
typo    
Mathias Goebel committed
40
    - bash ${EXIST_DB}/bin/startup.sh | tee output.log &
Mathias Goebel's avatar
Mathias Goebel committed
41
42
43
    # 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
44
    - bash ${EXIST_DB}/bin/shutdown.sh
45
    - ls -al /tmp; mv /tmp/tests-* . || true
Mathias Goebel's avatar
Mathias Goebel committed
46
47
48
49
  artifacts:
    paths:
      - output.log
      - tests-*.xml
50
      - ${EXIST_DB}/webapp/WEB-INF/logs/expath-repo.log
Mathias Goebel's avatar
Mathias Goebel committed
51

Mathias Goebel's avatar
Mathias Goebel committed
52
53
54
55
56
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