Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 3b6394e0

Přidáno uživatelem Jakub Vašta před asi 4 roky(ů)

The final version of the second stage of GitLab pipeline (build and deploy servers are distinct, use of ssh, only shell executor) Re #7748

Zobrazit rozdíly:

.gitlab-ci.yml
6 6
    - build
7 7
    - deploy
8 8

  
9
# Now the runner is on the same server as production environment - which is not good - so ssh is not needed    
10
# before_script:
11
#     - apt-get update -qq
12
#     - apt-get install -qq git
13
#     # Setup SSH deploy keys
14
#     - 'which ssh-agent || ( apt-get install -qq openssh-client )'
15
#     - eval $(ssh-agent -s)
16
#     - ssh-add <(echo "$SSH_PRIVATE_KEY")
17
#     - mkdir -p ~/.ssh
18
#     - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
19
    
20 9
unit_tests:
21
    image: php:7.2-alpine
22 10
    stage: test
11
    tags:
12
        - test
23 13
    script:
24
        - apk add composer
25 14
        - cd website
26 15
        - composer require --dev symfony/phpunit-bridge
27 16
        - php bin/phpunit
......
45 34
        name: heatmap
46 35
        url: https://heatmap.zcu.cz
47 36
    script:
48
        # - ssh root@example.com "cd ~ && rm -rf aswi2020sebela && git clone https://gitlab.kiv.zcu.cz/aswi/aswi-2020/aswi2020sebela.git && cd aswi2020sebela && ./build.sh && exit"
49
        - cd ~
50
        - rm -rf aswi2020sebela
51
        - git clone https://gitlab.kiv.zcu.cz/aswi/aswi-2020/aswi2020sebela.git
52
        - cd aswi2020sebela
53
        - ./build.sh
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"
54 38
    only:
55 39
        - master
56 40
    when: manual

Také k dispozici: Unified diff