.gitlab-ci.yml 3.89 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/
Dominik Hebeler's avatar
Dominik Hebeler committed
25 26
    - touch storage/logs/laravel.log
    - touch storage/logs/worker.log
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
    - scp -P 63824 metager@metager3.de:~/sumas.json config/
63
    - scp -P 63824 metager@metager3.de:~/sumasEn.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
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
75
    - php artisan requests:gather
Dominik Hebeler's avatar
Dominik Hebeler committed
76
    - if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi
Dominik Hebeler's avatar
Dominik Hebeler committed
77
    - cd ~/
Dominik Hebeler's avatar
Dominik Hebeler committed
78
    - while [ -d ~/MetaGer ]; do rm -rf ~/MetaGer;done
Dominik Hebeler's avatar
Dominik Hebeler committed
79
    - mv MetaGer_neu MetaGer
Dominik Hebeler's avatar
Dominik Hebeler committed
80
    - sudo pkill --signal SIGHUP supervisord
81
    - php ~/MetaGer/artisan up
Dominik Hebeler's avatar
Dominik Hebeler committed
82 83 84 85
    
update(metager3.de):
  tags:
  - metager3
Dominik Hebeler's avatar
Dominik Hebeler committed
86
  only:
Dominik Hebeler's avatar
Dominik Hebeler committed
87
    - development@open-source/MetaGer
88
  before_script:
89
    # Abhängigkeiten überprüfen
90 91
    - which composer
    - which git
Dominik Hebeler's avatar
Dominik Hebeler committed
92
    - which php
Dominik Hebeler's avatar
Dominik Hebeler committed
93
    - which sqlite3
Dominik Hebeler's avatar
Dominik Hebeler committed
94
  script:
95
    # Pfad zum neu geklonten Repo
96
    - path=`pwd`
Dominik Hebeler's avatar
Dominik Hebeler committed
97
    - cd ~/
Dominik Hebeler's avatar
Dominik Hebeler committed
98
    - if [ -d MetaGer_neu ]; then rm -rf MetaGer_neu;fi
Dominik Hebeler's avatar
Dominik Hebeler committed
99 100
    - git clone "$path" MetaGer_neu
    - cd MetaGer_neu
101
    - composer install
Dominik Hebeler's avatar
Dominik Hebeler committed
102
    - scp -P 63824 metager@metager3.de:~/.env .
Dominik Hebeler's avatar
Dominik Hebeler committed
103
    - scp -P 63824 metager@metager3.de:~/sumas.json config/
104
    - scp -P 63824 metager@metager3.de:~/sumasEn.json config/
Dominik Hebeler's avatar
Dominik Hebeler committed
105 106
    - scp -P 63824 metager@metager3.de:~/blacklistUrl.txt config/
    - scp -P 63824 metager@metager3.de:~/blacklistDomains.txt config/
107 108
    - touch storage/logs/laravel.log
    - touch storage/logs/worker.log
109
    - touch database/metager.sqlite
Dominik Hebeler's avatar
Dominik Hebeler committed
110
    - chmod 777 config/sumas.json config/sumas.json database/metager.sqlite
Dominik Hebeler's avatar
Dominik Hebeler committed
111 112
    - chmod -R 777 storage
    - chmod -R 777 bootstrap/cache
Dominik Hebeler's avatar
Dominik Hebeler committed
113
    - npm install
Dominik Hebeler's avatar
Dominik Hebeler committed
114
    - npm run production
115
    - php artisan migrate --force
116
    - php artisan requests:gather
Dominik Hebeler's avatar
Dominik Hebeler committed
117
    - if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi
Dominik Hebeler's avatar
Dominik Hebeler committed
118
    - cd ~/
Dominik Hebeler's avatar
Dominik Hebeler committed
119
    - while [ -d ~/MetaGer ]; do rm -rf ~/MetaGer;done
120
    - mv MetaGer_neu MetaGer
Dominik Hebeler's avatar
Dominik Hebeler committed
121
    - sudo pkill --signal SIGHUP supervisord
122
    - php ~/MetaGer/artisan up