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