.gitlab-ci.yml 1.9 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
19
  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
    - composer update
Dominik Hebeler's avatar
Dominik Hebeler committed
20
    - php artisan queue:restart
Dominik Hebeler's avatar
Dominik Hebeler committed
21
22
23
    - 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
24
25
    - scp metager@metager3.de:~/blacklistUrl.txt config/
    - scp metager@metager3.de:~/blacklistDomains.txt config/
26
27
    - touch storage/logs/laravel.log
    - touch storage/logs/worker.log
Dominik Hebeler's avatar
Dominik Hebeler committed
28
    - chmod 777 config/sumas.xml config/sumasEn.xml
Dominik Hebeler's avatar
Dominik Hebeler committed
29
30
    - chmod -R 777 storage
    - chmod -R 777 bootstrap/cache
Dominik Hebeler's avatar
Dominik Hebeler committed
31
    - php artisan migrate
Dominik Hebeler's avatar
Dominik Hebeler committed
32
33
34
35
36
37
38
    - cd ~/
    - rm -rf MetaGer
    - mv MetaGer_neu MetaGer
    
update(metager3.de):
  tags:
  - metager3
Dominik Hebeler's avatar
Bugfix  
Dominik Hebeler committed
39
  only:
Dominik Hebeler's avatar
Dominik Hebeler committed
40
    - development
41
  before_script:
42
    # Abhängigkeiten überprüfen
43
44
    - which composer
    - which git
Dominik Hebeler's avatar
Dominik Hebeler committed
45
    - which php7.0
Dominik Hebeler's avatar
Dominik Hebeler committed
46
    - which sqlite3
Dominik Hebeler's avatar
Bugfix  
Dominik Hebeler committed
47
  script:
48
    # Pfad zum neu geklonten Repo
49
    - path=`pwd`
Dominik Hebeler's avatar
Bugfix  
Dominik Hebeler committed
50
    - cd ~/
Dominik Hebeler's avatar
Dominik Hebeler committed
51
    - if [ -d MetaGer_neu ]; then rm -rf MetaGer_neu;fi
Dominik Hebeler's avatar
Dominik Hebeler committed
52
53
54
    - git clone "$path" MetaGer_neu
    - cd MetaGer_neu
    - composer update
Dominik Hebeler's avatar
Dominik Hebeler committed
55
    - php artisan queue:restart
Dominik Hebeler's avatar
Dominik Hebeler committed
56
    - scp metager@metager3.de:~/.env .
Dominik Hebeler's avatar
Dominik Hebeler committed
57
58
    - scp metager@metager3.de:~/sumas.xml config/
    - scp metager@metager3.de:~/sumasEn.xml config/
Dominik Hebeler's avatar
Dominik Hebeler committed
59
60
    - scp metager@metager3.de:~/blacklistUrl.txt config/
    - scp metager@metager3.de:~/blacklistDomains.txt config/
61
62
    - touch storage/logs/laravel.log
    - touch storage/logs/worker.log
Dominik Hebeler's avatar
Dominik Hebeler committed
63
    - chmod 777 config/sumas.xml config/sumasEn.xml
Dominik Hebeler's avatar
Dominik Hebeler committed
64
65
    - chmod -R 777 storage
    - chmod -R 777 bootstrap/cache
Dominik Hebeler's avatar
Dominik Hebeler committed
66
    - php artisan migrate
Dominik Hebeler's avatar
Dominik Hebeler committed
67
68
69
    - cd ~/
    - rm -rf MetaGer
    - mv MetaGer_neu MetaGer