.gitlab-ci.yml 1.31 KB
Newer Older
Dominik Hebeler's avatar
Dominik Hebeler committed
1
update(MetaGer Preredesign):
Dominik Hebeler's avatar
Dominik Hebeler committed
2
  tags:
Dominik Hebeler's avatar
Dominik Hebeler committed
3
  - 144.76.113.134
Dominik Hebeler's avatar
Dominik Hebeler committed
4
  only:
Dominik Hebeler's avatar
Dominik Hebeler committed
5
    - Preredesign@open-source/MetaGer
Dominik Hebeler's avatar
Dominik Hebeler committed
6 7 8 9
  before_script:
    # Abhängigkeiten überprüfen
    - which composer
    - which git
Dominik Hebeler's avatar
Dominik Hebeler committed
10
    - which php
Dominik Hebeler's avatar
Dominik Hebeler committed
11
    - which sqlite3
Dominik Hebeler's avatar
Dominik Hebeler committed
12
  script:
Dominik Hebeler's avatar
Dominik Hebeler committed
13 14 15
    # Pfad zum neu geklonten Repo
    - path=`pwd`
    - cd ~/
Dominik Hebeler's avatar
Dominik Hebeler committed
16 17 18
    - if [ -d .MetaGer_alt ]; then rm -rf .MetaGer_alt;fi
    - git clone "$path" .MetaGer_alt
    - cd .MetaGer_alt
Dominik Hebeler's avatar
Dominik Hebeler committed
19
    - composer install
Dominik Hebeler's avatar
Dominik Hebeler committed
20
    - scp -P 63824 metager@metager3.de:~/.env.preredesign .env
Dominik Hebeler's avatar
Dominik Hebeler committed
21 22 23 24
    - scp -P 63824 metager@metager3.de:~/sumas.xml config/
    - scp -P 63824 metager@metager3.de:~/sumasEn.xml config/
    - scp -P 63824 metager@metager3.de:~/blacklistUrl.txt config/
    - scp -P 63824 metager@metager3.de:~/blacklistDomains.txt config/
Dominik Hebeler's avatar
Dominik Hebeler committed
25 26
    - touch storage/logs/laravel.log
    - touch storage/logs/worker.log
Dominik Hebeler's avatar
Dominik Hebeler committed
27
    - touch database/metager.sqlite
Dominik Hebeler's avatar
Dominik Hebeler committed
28 29 30
    - chmod 777 config/sumas.xml config/sumasEn.xml database/metager.sqlite
    - chmod -R 777 storage
    - chmod -R 777 bootstrap/cache
Dominik Hebeler's avatar
Dominik Hebeler committed
31
    - npm install
32
    - php artisan migrate --force
33
    - npm run prod
Dominik Hebeler's avatar
Dominik Hebeler committed
34
    - if [ -f ~/MetaGer_alt/artisan ]; then php ~/MetaGer_alt/artisan down;fi
Dominik Hebeler's avatar
Dominik Hebeler committed
35
    - cd ~/
Dominik Hebeler's avatar
Dominik Hebeler committed
36 37
    - while [ -d ~/MetaGer_alt ]; do rm -rf ~/MetaGer_alt;done
    - mv .MetaGer_alt MetaGer_alt
Dominik Hebeler's avatar
Dominik Hebeler committed
38
    - sudo pkill --signal SIGHUP supervisord
Dominik Hebeler's avatar
Dominik Hebeler committed
39
    - php ~/MetaGer_alt/artisan up