Projekt

Obecné

Profil

Stáhnout (927 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
    stage: test
11
    tags:
12
        - test
13
    script:
14
        - cd website
15
        - composer require --dev symfony/phpunit-bridge
16
        - php bin/phpunit
17

    
18
build:
19
    stage: build
20
    tags:
21
        - build
22
    script:
23
        # Test whether container can be build or not
24
        - docker-compose build
25
        # We could also push docker image to some registry or docker hub
26
        
27
deploy_prod:
28
    stage: deploy
29
    tags:
30
        - deploy
31
    variables:
32
        GIT_STRATEGY: none
33
    environment:
34
        name: heatmap
35
        url: https://heatmap.zcu.cz
36
    script:
37
        - 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"
38
    only:
39
        - master
40
    when: manual
(2-2/8)