.gitlab-ci.yml 1 KB
Newer Older
remy's avatar
remy committed
1
2
stages:
  - build
remy's avatar
remy committed
3
  - test
remy's avatar
remy committed
4
  - deploy
remy's avatar
remy committed
5
  - check
remy's avatar
remy committed
6

remy's avatar
remy committed
7
image: docker:latest
remy's avatar
remy committed
8
9
10
11

services:
  - docker:dind

remy's avatar
remy committed
12
variables:
jlopez's avatar
jlopez committed
13
  #  DOCKER_HOST: tcp://docker:2375
jlopez's avatar
jlopez committed
14
  DOCKER_DRIVER: overlay2
remy's avatar
remy committed
15
16

before_script:
remy's avatar
remy committed
17
18
19
  - cat /etc/hosts
  - cat /etc/resolv.conf
  - docker info
remy's avatar
remy committed
20

remy's avatar
remy committed
21
PrebuildJob:
jlopez's avatar
jlopez committed
22
  stage: build
remy's avatar
remy committed
23
  tags:
jlopez's avatar
jlopez committed
24
    - jimmy
remy's avatar
remy committed
25
  script:
remy's avatar
remy committed
26
    - apk update
remy's avatar
remy committed
27
    - apk add --no-cache py-pip python-dev libffi-dev openssl-dev gcc libc-dev make wget gzip git net-tools
remy's avatar
remy committed
28
29
    - git clone https://gitlab.mbb.univ-montp2.fr/jlopez/wicopa.git
    - cd wicopa
remy's avatar
remy committed
30
    - wget -q http://web.mbb.univ-montp2.fr/download/wicopa.sql.gz
remy's avatar
remy committed
31
32
    - gunzip -d wicopa.sql.gz
    - pip install docker-compose
remy's avatar
remy committed
33
34
    - docker-compose --version
    - docker info
remy's avatar
remy committed
35
36
    - docker-compose build

remy's avatar
remy committed
37
38
TestJob:
  stage: test
remy's avatar
remy committed
39
  tags:
jlopez's avatar
jlopez committed
40
    - jimmy
remy's avatar
remy committed
41
42
43
  script:
    - docker info

remy's avatar
remy committed
44
45
46
RunDeployment:
  stage: deploy
  tags:
jlopez's avatar
jlopez committed
47
    - jimmy
remy's avatar
remy committed
48
49
  script:
    - docker-compose up
remy's avatar
remy committed
50
51
52
53

checking:
  stage: check
  tags:
jlopez's avatar
jlopez committed
54
    - jimmy
remy's avatar
remy committed
55
  script:
remy's avatar
remy committed
56
57
58
    - netstat -naptu |grep -E "80|3306"
    - wget http://127.0.0.1:8000
    - cat index.*