.gitlab-ci.yml 640 Bytes
Newer Older
1
image: docker
therealwa3er's avatar
therealwa3er committed
2

3
services:
4
5
6
#use docker in docker container
    - docker:dind
    
therealwa3er's avatar
therealwa3er committed
7
before_script:
8
9
10
11
#add docker compose into docker in docker image
    - docker info
    - apk update
    - apk upgrade
therealwa3er's avatar
therealwa3er committed
12
13
#The --no-cache option allows to not cache the index locally, which is useful for keeping containers small.
    - apk add --no-cache  py-pip 
14
    - pip install docker-compose
therealwa3er's avatar
therealwa3er committed
15
16

stages:
therealwa3er's avatar
therealwa3er committed
17
18
    - build
    - test
therealwa3er's avatar
therealwa3er committed
19
    
therealwa3er's avatar
therealwa3er committed
20
build:
therealwa3er's avatar
therealwa3er committed
21
    script:
22
    # run docker compose
therealwa3er's avatar
therealwa3er committed
23
24
    - docker-compose -f docker/docker-compose.yml  up -d

therealwa3er's avatar
therealwa3er committed
25
26

test:
therealwa3er's avatar
therealwa3er committed
27
  script:
28
  #run Phpunit test
therealwa3er's avatar
therealwa3er committed
29
  - docker exec  -it -w //var/www/html/alecsia/app docker_alecsia_1   ./../vendor/bin/phpunit