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