.gitlab-ci.yml 3.82 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@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
16
17
18
19
    # 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 install
Dominik Hebeler's avatar
Dominik Hebeler committed
20
    - scp -P 63824 metager@metager3.de:~/.env .
Dominik Hebeler's avatar
Dominik Hebeler committed
21
22
    - scp -P 63824 metager@metager3.de:~/sumas.json config/
    - scp -P 63824 metager@metager3.de:~/sumasEn.json config/
Dominik Hebeler's avatar
Dominik Hebeler committed
23
24
    - 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
    - chmod 777 config/sumas.json config/sumas.json database/metager.sqlite
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
    - npm install
Dominik Hebeler's avatar
Dominik Hebeler committed
32
    - npm run prodution
33
    - php artisan migrate --force
34
    - php artisan requests:gather
Dominik Hebeler's avatar
Dominik Hebeler committed
35
36
    - if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi
    - cd ~/
Dominik Hebeler's avatar
Dominik Hebeler committed
37
    - while [ -d ~/MetaGer ]; do rm -rf ~/MetaGer;done
Dominik Hebeler's avatar
Dominik Hebeler committed
38
    - mv MetaGer_neu MetaGer
Dominik Hebeler's avatar
Dominik Hebeler committed
39
    - sudo pkill --signal SIGHUP supervisord
Dominik Hebeler's avatar
Dominik Hebeler committed
40
41
42
43
44
45
    - php ~/MetaGer/artisan up
   
update(metager2):
  tags:
  - metager2
  only:
Dominik Hebeler's avatar
Dominik Hebeler committed
46
    - master@open-source/MetaGer
Dominik Hebeler's avatar
Dominik Hebeler committed
47
48
49
50
  before_script:
    # Abhängigkeiten überprüfen
    - which composer
    - which git
Dominik Hebeler's avatar
Dominik Hebeler committed
51
    - which php
Dominik Hebeler's avatar
Dominik Hebeler committed
52
53
    - which sqlite3
  script:
Dominik Hebeler's avatar
Dominik Hebeler committed
54
55
56
57
58
59
    # 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
60
    - composer install
Dominik Hebeler's avatar
Dominik Hebeler committed
61
    - scp -P 63824 metager@metager3.de:~/.env .
Dominik Hebeler's avatar
Dominik Hebeler committed
62
63
    - scp -P 63824 metager@metager3.de:~/sumas.json config/
    - scp -P 63824 metager@metager3.de:~/sumas.json config/
Dominik Hebeler's avatar
Dominik Hebeler committed
64
65
    - scp -P 63824 metager@metager3.de:~/blacklistUrl.txt config/
    - scp -P 63824 metager@metager3.de:~/blacklistDomains.txt config/
66
67
    - touch storage/logs/laravel.log
    - touch storage/logs/worker.log
Dominik Hebeler's avatar
Dominik Hebeler committed
68
    - touch database/metager.sqlite
Dominik Hebeler's avatar
Dominik Hebeler committed
69
    - chmod 777 config/sumas.json config/sumas.json database/metager.sqlite
Dominik Hebeler's avatar
Dominik Hebeler committed
70
71
    - chmod -R 777 storage
    - chmod -R 777 bootstrap/cache
Dominik Hebeler's avatar
Dominik Hebeler committed
72
    - npm install
Dominik Hebeler's avatar
Dominik Hebeler committed
73
    - npm run prodution
74
    - php artisan migrate --force
Dominik Hebeler's avatar
Dominik Hebeler committed
75
    - if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi
Dominik Hebeler's avatar
Dominik Hebeler committed
76
    - cd ~/
Dominik Hebeler's avatar
Dominik Hebeler committed
77
    - while [ -d ~/MetaGer ]; do rm -rf ~/MetaGer;done
Dominik Hebeler's avatar
Dominik Hebeler committed
78
    - mv MetaGer_neu MetaGer
Dominik Hebeler's avatar
Dominik Hebeler committed
79
    - sudo pkill --signal SIGHUP supervisord
80
    - php ~/MetaGer/artisan up
Dominik Hebeler's avatar
Dominik Hebeler committed
81
82
83
84
    
update(metager3.de):
  tags:
  - metager3
Dominik Hebeler's avatar
Bugfix  
Dominik Hebeler committed
85
  only:
Dominik Hebeler's avatar
Dominik Hebeler committed
86
    - development@open-source/MetaGer
87
  before_script:
88
    # Abhängigkeiten überprüfen
89
90
    - which composer
    - which git
Dominik Hebeler's avatar
Dominik Hebeler committed
91
    - which php
Dominik Hebeler's avatar
Dominik Hebeler committed
92
    - which sqlite3
Dominik Hebeler's avatar
Bugfix  
Dominik Hebeler committed
93
  script:
94
    # Pfad zum neu geklonten Repo
95
    - path=`pwd`
Dominik Hebeler's avatar
Bugfix  
Dominik Hebeler committed
96
    - cd ~/
Dominik Hebeler's avatar
Dominik Hebeler committed
97
    - if [ -d MetaGer_neu ]; then rm -rf MetaGer_neu;fi
Dominik Hebeler's avatar
Dominik Hebeler committed
98
99
    - git clone "$path" MetaGer_neu
    - cd MetaGer_neu
100
    - composer install
Dominik Hebeler's avatar
Dominik Hebeler committed
101
    - scp -P 63824 metager@metager3.de:~/.env .
Dominik Hebeler's avatar
Dominik Hebeler committed
102
103
    - scp -P 63824 metager@metager3.de:~/sumas.json config/
    - scp -P 63824 metager@metager3.de:~/sumas.json config/
Dominik Hebeler's avatar
Dominik Hebeler committed
104
105
    - scp -P 63824 metager@metager3.de:~/blacklistUrl.txt config/
    - scp -P 63824 metager@metager3.de:~/blacklistDomains.txt config/
106
107
    - touch storage/logs/laravel.log
    - touch storage/logs/worker.log
Dominik Hebeler's avatar
Dominik Hebeler committed
108
    - touch database/metager.sqlite
Dominik Hebeler's avatar
Dominik Hebeler committed
109
    - chmod 777 config/sumas.json config/sumas.json database/metager.sqlite
Dominik Hebeler's avatar
Dominik Hebeler committed
110
111
    - chmod -R 777 storage
    - chmod -R 777 bootstrap/cache
Dominik Hebeler's avatar
Dominik Hebeler committed
112
    - npm install
Dominik Hebeler's avatar
Typo  
Dominik Hebeler committed
113
    - npm run production
114
    - php artisan migrate --force
Dominik Hebeler's avatar
Dominik Hebeler committed
115
    - if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi
Dominik Hebeler's avatar
Dominik Hebeler committed
116
    - cd ~/
Dominik Hebeler's avatar
Dominik Hebeler committed
117
    - while [ -d ~/MetaGer ]; do rm -rf ~/MetaGer;done
118
    - mv MetaGer_neu MetaGer
Dominik Hebeler's avatar
Dominik Hebeler committed
119
    - sudo pkill --signal SIGHUP supervisord
120
    - php ~/MetaGer/artisan up