Projekt

Obecné

Profil

Stáhnout (1.28 KB) Statistiky
| Větev: | Revize:
1
variables:
2
    IMAGE_NAME: zcu-campus-life-app:$CI_COMMIT_REF_NAME
3

    
4
stages:
5
    - test
6
    - build
7
    
8
# before_script:
9
#     - apt-get update -qq
10
#     - apt-get install -qq git
11
#     # Setup SSH deploy keys
12
#     - 'which ssh-agent || ( apt-get install -qq openssh-client )'
13
#     - eval $(ssh-agent -s)
14
#     - ssh-add <(echo "$SSH_PRIVATE_KEY")
15
#     - mkdir -p ~/.ssh
16
#     - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
17
    
18
unit_tests:
19
    image: php:7.2-alpine
20
    stage: test
21
    script:
22
        - apk add composer
23
        - cd website
24
        - composer require --dev symfony/phpunit-bridge
25
        - php bin/phpunit
26

    
27
build:
28
    stage: build
29
    tag:
30
        - build
31
    script:
32
        # - docker login -u $USER p $PASSWORD gitlab.kiv.zcu.cz:5000
33
        # Todo propagate image name into docker-compose.yml
34
        - docker-compose build
35
        # - docker-compose push $IMAGE_NAME
36
        
37
# deploy_prod:
38
#     stage: deploy
39
#     tags:
40
#         - deploy
41
#     environmnet:
42
#         name: deploy
43
#         url: http://heatmap.zcu.cz
44
#     script:
45
#         - ssh root@example.com "docker login -u $USER p $PASSWORD gitlab.kiv.zcu.cz:5000 && docker-compose pull $IMAGE_NAME && docker-compose up"
46
#     only:
47
#         - master
48
#     when: manual
(2-2/8)