.gitlab-ci.yml 3.43 KB
Newer Older
1
update(144.76.113.134):
Dominik Hebeler's avatar
Dominik Hebeler committed
2 3 4
  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:
13 14 15 16 17 18 19 20 21 22 23 24 25 26
    # 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
    - scp -P 63824 metager@metager3.de:~/.env .
    - scp -P 63824 metager@metager3.de:~/sumas.json config/
    - scp -P 63824 metager@metager3.de:~/sumasEn.json config/
    - scp -P 63824 metager@metager3.de:~/blacklistUrl.txt config/
    - scp -P 63824 metager@metager3.de:~/blacklistDomains.txt config/
    - 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
    - scp -P 63824 metager@metager3.de:~/spam.txt config/
28
    - scp -P 63824 metager@metager3.de:~/UsersSeeder.php database/seeds/
29 30 31 32 33 34 35 36 37
    - touch storage/logs/laravel.log
    - touch storage/logs/worker.log
    - touch database/metager.sqlite
    - chmod 777 config/sumas.json config/sumas.json database/metager.sqlite
    - chmod -R 777 storage
    - chmod -R 777 bootstrap/cache
    - npm install
    - npm run production
    - php artisan migrate --force
38
    - php artisan db:seed --force
39 40 41 42 43 44 45
    - php artisan requests:gather
    - if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi
    - cd ~/
    - while [ -d ~/MetaGer ]; do rm -rf ~/MetaGer;done
    - mv MetaGer_neu MetaGer
    - sudo pkill --signal SIGHUP supervisord
    - php ~/MetaGer/artisan up
Dominik Hebeler's avatar
Dominik Hebeler committed
46
   
47
update(metager2):
Dominik Hebeler's avatar
Dominik Hebeler committed
48 49 50
  tags:
  - metager2
  only:
Dominik Hebeler's avatar
Dominik Hebeler committed
51
    - master@open-source/MetaGer
Dominik Hebeler's avatar
Dominik Hebeler committed
52 53 54 55
  before_script:
    # Abhängigkeiten überprüfen
    - which composer
    - which git
Dominik Hebeler's avatar
Dominik Hebeler committed
56
    - which php
Dominik Hebeler's avatar
Dominik Hebeler committed
57 58
    - which sqlite3
  script:
59 60 61 62 63 64 65 66 67 68 69 70
    # 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
    - scp -P 63824 metager@metager3.de:~/.env .
    - scp -P 63824 metager@metager3.de:~/sumas.json config/
    - scp -P 63824 metager@metager3.de:~/sumasEn.json config/
    - 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
71 72 73
    - scp -P 63824 metager@metager3.de:~/adBlacklistUrl.txt config/
    - scp -P 63824 metager@metager3.de:~/adBlacklistDomains.txt config/
    - scp -P 63824 metager@metager3.de:~/spam.txt config/
74
    - scp -P 63824 metager@metager3.de:~/UsersSeeder.php database/seeds/
75 76 77 78 79 80 81 82 83
    - touch storage/logs/laravel.log
    - touch storage/logs/worker.log
    - touch database/metager.sqlite
    - chmod 777 config/sumas.json config/sumas.json database/metager.sqlite
    - chmod -R 777 storage
    - chmod -R 777 bootstrap/cache
    - npm install
    - npm run production
    - php artisan migrate --force
84
    - php artisan db:seed --force
85 86 87 88 89 90 91
    - php artisan requests:gather
    - if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi
    - cd ~/
    - while [ -d ~/MetaGer ]; do rm -rf ~/MetaGer;done
    - mv MetaGer_neu MetaGer
    - sudo pkill --signal SIGHUP supervisord
    - php ~/MetaGer/artisan up
Dominik Hebeler's avatar
Dominik Hebeler committed
92
    
93
update(metager3.de):
Dominik Hebeler's avatar
Dominik Hebeler committed
94 95
  tags:
  - metager3
Dominik Hebeler's avatar
Dominik Hebeler committed
96
  only:
Dominik Hebeler's avatar
Dominik Hebeler committed
97
    - development@open-source/MetaGer
98
  before_script:
99
    # Abhängigkeiten überprüfen
100 101
    - which composer
    - which git
Dominik Hebeler's avatar
Dominik Hebeler committed
102
    - which php
Dominik Hebeler's avatar
Dominik Hebeler committed
103
    - which sqlite3
Dominik Hebeler's avatar
Dominik Hebeler committed
104
  script:
105
    - sh build.sh