aswi2020sebela-gitlab/.gitlab-ci.yml @ b6277a6b
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 | stage: test |
||
11 | 3b6394e0 | vastja | tags: |
12 | - test |
||
13 | 7ba876fd | vastja | script: |
14 | - cd website |
||
15 | - composer require --dev symfony/phpunit-bridge |
||
16 | - php bin/phpunit |
||
17 | |||
18 | 52268d9b | vastja | build: |
19 | stage: build |
||
20 | 2ec14ba9 | vastja | tags: |
21 | 2307b018 | vastja | - build |
22 | 27460050 | vastja | script: |
23 | 8b6777ff | vastja | # Test whether container can be build or not
|
24 | 908c047b | vastja | - docker-compose build |
25 | 8b6777ff | vastja | # We could also push docker image to some registry or docker hub
|
26 | 7ba876fd | vastja | |
27 | 5b102971 | vastja | deploy_prod: |
28 | stage: deploy |
||
29 | tags: |
||
30 | - deploy |
||
31 | 6bdf30f4 | vastja | variables: |
32 | GIT_STRATEGY: none |
||
33 | 57b88434 | vastja | environment: |
34 | name: heatmap |
||
35 | url: https://heatmap.zcu.cz |
||
36 | 5b102971 | vastja | script: |
37 | 3b6394e0 | 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" |
38 | b448f1d7 | vastja | only: |
39 | - master |
||
40 | 5b102971 | vastja | when: manual |