Projekt

Obecné

Profil

Stáhnout (1.17 KB) 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 6f6156eb ballakt
    - linter
7 52268d9b vastja
    - build
8 51c818a1 vastja
    - deploy
9 8b6777ff vastja
10 7ba876fd vastja
unit_tests:
11
    stage: test
12 3b6394e0 vastja
    tags:
13
        - test
14 7ba876fd vastja
    script:
15
        - cd website
16
        - composer require --dev symfony/phpunit-bridge
17
        - php bin/phpunit
18 6f6156eb ballakt
php_linter: 
19
    stage: linter
20
    tags:
21
        - linter
22
    script:
23
        - cd website
24
        - composer require --dev squizlabs/php_codesniffer
25
        - ./vendor/bin/php-cs-fixer fix --dry-run --config .php_cs --stop-on-violation --using-cache=no
26 52268d9b vastja
build:
27
    stage: build
28 2ec14ba9 vastja
    tags:
29 2307b018 vastja
        - build
30 27460050 vastja
    script:
31 8b6777ff vastja
        # Test whether container can be build or not
32 908c047b vastja
        - docker-compose build
33 8b6777ff vastja
        # We could also push docker image to some registry or docker hub
34 7ba876fd vastja
        
35 5b102971 vastja
deploy_prod:
36
    stage: deploy
37
    tags:
38
        - deploy
39 6bdf30f4 vastja
    variables:
40
        GIT_STRATEGY: none
41 57b88434 vastja
    environment:
42
        name: heatmap
43
        url: https://heatmap.zcu.cz
44 5b102971 vastja
    script:
45 6f6156eb ballakt
        - ssh root@heatmap.zcu.cz "cd ~ && rm -rf aswi2020sebela && git clone https://gitlab.kiv.zcu.cz/aswi/aswi-2020/aswi2020sebela.git && cd aswi2020sebela && ./scripts/build.sh && exit"
46 b448f1d7 vastja
    only:
47
        - master
48 5b102971 vastja
    when: manual