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