.gitlab-ci.yml 2.2 KB
Newer Older
Dominik Hebeler's avatar
Dominik Hebeler committed
1
2
3
4
update(144.76.113.134):
  tags:
  - 144.76.113.134
  only:
Dominik Hebeler's avatar
Dominik Hebeler committed
5
    - master
Dominik Hebeler's avatar
Dominik Hebeler committed
6
7
8
9
10
  before_script:
    # Abhängigkeiten überprüfen
    - which composer
    - which git
    - which php7.0
Dominik Hebeler's avatar
Dominik Hebeler committed
11
    - which sqlite3
Dominik Hebeler's avatar
Dominik Hebeler committed
12
13
14
15
16
17
18
  script:
    # Pfad zum neu geklonten Repo
    - path=`pwd`
    - cd ~/
    - if [ -d MetaGer_neu ]; then rm -rf MetaGer_neu;fi
    - git clone "$path" MetaGer_neu
    - cd MetaGer_neu
19
    - composer install
Dominik Hebeler's avatar
Dominik Hebeler committed
20
21
22
    - scp metager@metager3.de:~/.env .
    - scp metager@metager3.de:~/sumas.xml config/
    - scp metager@metager3.de:~/sumasEn.xml config/
Dominik Hebeler's avatar
Dominik Hebeler committed
23
24
    - scp metager@metager3.de:~/blacklistUrl.txt config/
    - scp metager@metager3.de:~/blacklistDomains.txt config/
25
26
    - touch storage/logs/laravel.log
    - touch storage/logs/worker.log
27
    - chmod 777 config/sumas.xml config/sumasEn.xml database/metager.sqlite
Dominik Hebeler's avatar
Dominik Hebeler committed
28
29
    - chmod -R 777 storage
    - chmod -R 777 bootstrap/cache
Dominik Hebeler's avatar
Dominik Hebeler committed
30
    - if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi
Dominik Hebeler's avatar
Dominik Hebeler committed
31
32
33
    - cd ~/
    - rm -rf MetaGer
    - mv MetaGer_neu MetaGer
34
35
36
    - php ~/MetaGer/artisan queue:restart
    - php ~/MetaGer/artisan migrate --force
    - php ~/MetaGer/artisan up
Dominik Hebeler's avatar
Dominik Hebeler committed
37
38
39
40
    
update(metager3.de):
  tags:
  - metager3
Dominik Hebeler's avatar
Bugfix    
Dominik Hebeler committed
41
  only:
Dominik Hebeler's avatar
Dominik Hebeler committed
42
    - development
43
  before_script:
44
    # Abhängigkeiten überprüfen
45
46
    - which composer
    - which git
Dominik Hebeler's avatar
Dominik Hebeler committed
47
    - which php7.0
Dominik Hebeler's avatar
Dominik Hebeler committed
48
    - which sqlite3
Dominik Hebeler's avatar
Bugfix    
Dominik Hebeler committed
49
  script:
50
    # Pfad zum neu geklonten Repo
51
    - path=`pwd`
Dominik Hebeler's avatar
Bugfix    
Dominik Hebeler committed
52
    - cd ~/
Dominik Hebeler's avatar
Dominik Hebeler committed
53
    - if [ -d MetaGer_neu ]; then rm -rf MetaGer_neu;fi
Dominik Hebeler's avatar
Dominik Hebeler committed
54
55
    - git clone "$path" MetaGer_neu
    - cd MetaGer_neu
56
    - composer install
Dominik Hebeler's avatar
Dominik Hebeler committed
57
    - scp metager@metager3.de:~/.env .
Dominik Hebeler's avatar
Dominik Hebeler committed
58
59
    - scp metager@metager3.de:~/sumas.xml config/
    - scp metager@metager3.de:~/sumasEn.xml config/
Dominik Hebeler's avatar
Dominik Hebeler committed
60
61
    - scp metager@metager3.de:~/blacklistUrl.txt config/
    - scp metager@metager3.de:~/blacklistDomains.txt config/
62
63
    - touch storage/logs/laravel.log
    - touch storage/logs/worker.log
64
    - chmod 777 config/sumas.xml config/sumasEn.xml database/metager.sqlite
Dominik Hebeler's avatar
Dominik Hebeler committed
65
66
    - chmod -R 777 storage
    - chmod -R 777 bootstrap/cache
Dominik Hebeler's avatar
Dominik Hebeler committed
67
    - if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi
Dominik Hebeler's avatar
Dominik Hebeler committed
68
69
    - cd ~/
    - rm -rf MetaGer
70
71
72
73
    - mv MetaGer_neu MetaGer
    - php ~/MetaGer/artisan queue:restart
    - php ~/MetaGer/artisan migrate --force
    - php ~/MetaGer/artisan up