Projekt

Obecné

Profil

Stáhnout (984 Bajtů) 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
    - deploy
8

    
9
unit_tests:
10
    image: php:7.2-alpine
11
    stage: test
12
    tags:
13
        - test
14
    script:
15
        - apk add composer
16
        - cd website
17
        - composer require --dev symfony/phpunit-bridge
18
        - php bin/phpunit
19

    
20
build:
21
    stage: build
22
    tags:
23
        - build
24
    script:
25
        # Test whether container can be build or not
26
        - docker-compose build
27
        # We could also push docker image to some registry or docker hub
28
        
29
deploy_prod:
30
    stage: deploy
31
    tags:
32
        - deploy
33
    variables:
34
        GIT_STRATEGY: none
35
    environment:
36
        name: heatmap
37
        url: https://heatmap.zcu.cz
38
    script:
39
        - ssh root@heatmap.zcu.cz "cd ~ && rm -rf aswi2020sebela && git clone https://gitlab.kiv.zcu.cz/aswi/aswi-2020/aswi2020sebela.git && cd aswi2020sebela && ./build.sh && exit"
40
    # only:
41
    #     - master
42
    when: manual
(2-2/8)