aswi2020merlot-gitlab/.gitlab-ci.yml @ 2f7ecc0e
1 | 656a09a7 | Adam Mištera | image: docker:latest |
---|---|---|---|
2 | 06572e80 | Adam Mištera | services: |
3 | - docker:dind |
||
4 | |||
5 | 45c5ff43 | Adam Mištera | stages: |
6 | e419bd73 | Adam Mištera | - build |
7 | 45c5ff43 | Adam Mištera | - test |
8 | |||
9 | e419bd73 | Adam Mištera | variables: |
10 | f2e3793d | Adam Mištera | CONTAINER_TEST_IMAGE: gitlab.kiv.zcu.cz/aswi/aswi-2020/aswi2020merlot:$CI_BUILD_REF_NAME |
11 | e419bd73 | Adam Mištera | |
12 | before_script: |
||
13 | f2e3793d | Adam Mištera | - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN gitlab.kiv.zcu.cz |
14 | e419bd73 | Adam Mištera | |
15 | build: |
||
16 | stage: build |
||
17 | f2e3793d | Adam Mištera | only: |
18 | refs: |
||
19 | - master |
||
20 | e419bd73 | Adam Mištera | script: |
21 | - docker build -t $CONTAINER_TEST_IMAGE . |
||
22 | - docker push $CONTAINER_TEST_IMAGE |
||
23 | |||
24 | 45c5ff43 | Adam Mištera | unit_test: |
25 | stage: test |
||
26 | f2e3793d | Adam Mištera | only: |
27 | refs: |
||
28 | - master |
||
29 | 45c5ff43 | Adam Mištera | script: |
30 | e419bd73 | Adam Mištera | - cp .env.example .env |
31 | - composer install |
||
32 | - php artisan key:generate |
||
33 | - php artisan migrate |
||
34 | 45c5ff43 | Adam Mištera | - vendor/bin/phpunit |