Projekt

Obecné

Profil

Stáhnout (984 Bajtů) Statistiky
| Větev: | Revize:
1 8b6777ff vastja
# variables:
2
#     IMAGE_NAME: zcu-campus-life-app:$CI_COMMIT_REF_NAME
3 7ba876fd vastja
4 27460050 vastja
stages:
5 7ba876fd vastja
    - test
6 52268d9b vastja
    - build
7 51c818a1 vastja
    - deploy
8 8b6777ff vastja
9 7ba876fd vastja
unit_tests:
10
    image: php:7.2-alpine
11
    stage: test
12 e9b74800 vastja
    tags:
13
        - test
14 7ba876fd vastja
    script:
15
        - apk add composer
16
        - cd website
17
        - composer require --dev symfony/phpunit-bridge
18
        - php bin/phpunit
19
20 52268d9b vastja
build:
21
    stage: build
22 2ec14ba9 vastja
    tags:
23 2307b018 vastja
        - build
24 27460050 vastja
    script:
25 8b6777ff vastja
        # Test whether container can be build or not
26 908c047b vastja
        - docker-compose build
27 8b6777ff vastja
        # We could also push docker image to some registry or docker hub
28 7ba876fd vastja
        
29 5b102971 vastja
deploy_prod:
30
    stage: deploy
31
    tags:
32
        - deploy
33 6bdf30f4 vastja
    variables:
34
        GIT_STRATEGY: none
35 57b88434 vastja
    environment:
36
        name: heatmap
37
        url: https://heatmap.zcu.cz
38 5b102971 vastja
    script:
39 54cf5a59 vastja
        - 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 e9b74800 vastja
    # only:
41
    #     - master
42 5b102971 vastja
    when: manual